You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "olivier dufour (Jira)" <ji...@apache.org> on 2020/11/06 06:30:00 UTC

[jira] [Updated] (CXF-8366) allow to disable asmhelper generation

     [ https://issues.apache.org/jira/browse/CXF-8366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

olivier dufour updated CXF-8366:
--------------------------------
    Description: 
Hello,

I have succeed to make cxf running on quarkus in native. Goal of quarkus is to reduce memory footprint and speed up run time. 

So, we have to move asm generation to build time.

I have sucessfully done it on native part by doing susbstitution but it is not possible on jvm for all asmhelper usage. Because some asm generation are done from static method so it can not been overriden or substitute on parent class easily.

Goal is to be able to override some class and inject the new instance to inject the class generated by quarkus on compile time directly to cxf and avoid asm generation during runtime.

SOLUTION 1:

I need that we have a factory class with singleton pattern wherer we can set instance and override and which can be set on CXFNonSpringServlet and JaxWsProxyFactoryBean.

SOLUTION 2:

 add static method to add method to ASMHelper tocache class ever generated.

Map<String, Class<?>> cache;

and proxy this method in JAXBExtensionHelper/JAXBUtils /WrapperHelperCompiler with addGeneratedClass method and before generating class check if already in cache.

JAXBContextInitializer is not static and use a pure ASMHelper. I propose to use JAXBUtils cache and check it before generating code.

 

List of main class with asm generation:
 - org.apache.cxf.wsdl.JAXBExtensionHelper.createExtensionClass is a static method.

So it can not been override and I can not change the class instance and inject it.

Can you change that to a factory and an instance.  (best is to have the factory

- org.apache.cxf.common.jaxb.JAXBUtils .createNamespaceWrapper
 - org.apache.cxf.endpoint.dynamic.TypeClassInitializer$ExceptionCreator. createExceptionClass

- org.apache.cxf.jaxb.JAXBDataBinding.compileWrapperHelper or WrapperHelperCompiler 

- org.apache.cxf.jaxb.JAXBContextInitializer.createFactory

  was:
Hello,

I have succeed to make cxf running on quarkus in native. Goal of quarkus is to reduce memory footprint and speed up run time. 

So, we have to move asm generation to build time.

I have sucessfully done it on native part by doing susbstitution but it is not possible on jvm for all asmhelper usage. Because some asm generation are done from static method so it can not been overriden or substitute on parent class easily.

Goal is to be able to override some class and inject the new instance to inject the class generated by quarkus on compile time directly to cxf and avoid asm generation during runtime.

PROPOSITION:

I need that we have a factory class with singleton pattern wherer we can set instance and override and which can be set on CXFNonSpringServlet and JaxWsProxyFactoryBean.

 

List of main class with asm generation:

- org.apache.cxf.wsdl.JAXBExtensionHelper.createExtensionClass is a static method.

So it can not been override and I can not change the class instance and inject it.

Can you change that to a factory and an instance.  (best is to have the factory

- org.apache.cxf.common.jaxb.JAXBUtils .createNamespaceWrapper

- org.apache.cxf.endpoint.dynamic.TypeClassInitializer$ExceptionCreator. createExceptionClass

- org.apache.cxf.jaxb.JAXBDataBinding.compileWrapperHelper

- org.apache.cxf.jaxb.JAXBContextInitializer.createFactory


> allow to disable asmhelper generation
> -------------------------------------
>
>                 Key: CXF-8366
>                 URL: https://issues.apache.org/jira/browse/CXF-8366
>             Project: CXF
>          Issue Type: Sub-task
>          Components: Core
>    Affects Versions: 3.4.0
>         Environment: all env. Win 10 on my laptor.
>            Reporter: olivier dufour
>            Priority: Major
>
> Hello,
> I have succeed to make cxf running on quarkus in native. Goal of quarkus is to reduce memory footprint and speed up run time. 
> So, we have to move asm generation to build time.
> I have sucessfully done it on native part by doing susbstitution but it is not possible on jvm for all asmhelper usage. Because some asm generation are done from static method so it can not been overriden or substitute on parent class easily.
> Goal is to be able to override some class and inject the new instance to inject the class generated by quarkus on compile time directly to cxf and avoid asm generation during runtime.
> SOLUTION 1:
> I need that we have a factory class with singleton pattern wherer we can set instance and override and which can be set on CXFNonSpringServlet and JaxWsProxyFactoryBean.
> SOLUTION 2:
>  add static method to add method to ASMHelper tocache class ever generated.
> Map<String, Class<?>> cache;
> and proxy this method in JAXBExtensionHelper/JAXBUtils /WrapperHelperCompiler with addGeneratedClass method and before generating class check if already in cache.
> JAXBContextInitializer is not static and use a pure ASMHelper. I propose to use JAXBUtils cache and check it before generating code.
>  
> List of main class with asm generation:
>  - org.apache.cxf.wsdl.JAXBExtensionHelper.createExtensionClass is a static method.
> So it can not been override and I can not change the class instance and inject it.
> Can you change that to a factory and an instance.  (best is to have the factory
> - org.apache.cxf.common.jaxb.JAXBUtils .createNamespaceWrapper
>  - org.apache.cxf.endpoint.dynamic.TypeClassInitializer$ExceptionCreator. createExceptionClass
> - org.apache.cxf.jaxb.JAXBDataBinding.compileWrapperHelper or WrapperHelperCompiler 
> - org.apache.cxf.jaxb.JAXBContextInitializer.createFactory



--
This message was sent by Atlassian Jira
(v8.3.4#803005)