[jira] [Created] (CXF-8365) LoggingInInterceptor could not be extended / logs only once
Lars Uffmann created CXF-8365: - Summary: LoggingInInterceptor could not be extended / logs only once Key: CXF-8365 URL: https://issues.apache.org/jira/browse/CXF-8365 Project: CXF Issue Type: Bug Components: JAX-WS Runtime, logging Affects Versions: 3.4.0 Reporter: Lars Uffmann Coming with CXF-8257 {{org.apache.cxf.ext.logging.LoggingInInterceptor }}will log a given message only once: {code:java} public void handleMessage(Message message) throws Fault { if (isLoggingDisabledNow(message)) { return; } else { //ensure only logging once for a certain message //this can prevent message logging again when fault //happen after PRE_INVOKE phase(rewind calls into LoggingInFaultInterceptor) message.put(LIVE_LOGGING_PROP, Boolean.FALSE); } {code} Filtering is done per message, not per Interceptor instance. We use a custom {{MyLoggingInInterceptor}} which subclasses the {{LoggingInInterceptor}}. (We Subclass in order to use different {{LogEventSender).}} So two distinct interceptor instances are applied to the Endpoint/Bus/Client but the message is logged only in the first invocation. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (CXF-8365) LoggingInInterceptor could not be extended / logs only once
[ https://issues.apache.org/jira/browse/CXF-8365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lars Uffmann updated CXF-8365: -- Description: Coming with CXF-8257 {{org.apache.cxf.ext.logging.LoggingInInterceptor}} will log a given message only once: {code:java} public void handleMessage(Message message) throws Fault { if (isLoggingDisabledNow(message)) { return; } else { //ensure only logging once for a certain message //this can prevent message logging again when fault //happen after PRE_INVOKE phase(rewind calls into LoggingInFaultInterceptor) message.put(LIVE_LOGGING_PROP, Boolean.FALSE); } {code} Filtering is done per message, not per Interceptor instance. We use a custom {{MyLoggingInInterceptor}} which subclasses the {{LoggingInInterceptor}}. (We Subclass in order to use different {{LogEventSender).}} So two distinct interceptor instances are applied to the Endpoint/Bus/Client but the message is logged only in the first invocation. was: Coming with CXF-8257 {{org.apache.cxf.ext.logging.LoggingInInterceptor }}will log a given message only once: {code:java} public void handleMessage(Message message) throws Fault { if (isLoggingDisabledNow(message)) { return; } else { //ensure only logging once for a certain message //this can prevent message logging again when fault //happen after PRE_INVOKE phase(rewind calls into LoggingInFaultInterceptor) message.put(LIVE_LOGGING_PROP, Boolean.FALSE); } {code} Filtering is done per message, not per Interceptor instance. We use a custom {{MyLoggingInInterceptor}} which subclasses the {{LoggingInInterceptor}}. (We Subclass in order to use different {{LogEventSender).}} So two distinct interceptor instances are applied to the Endpoint/Bus/Client but the message is logged only in the first invocation. > LoggingInInterceptor could not be extended / logs only once > --- > > Key: CXF-8365 > URL: https://issues.apache.org/jira/browse/CXF-8365 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime, logging >Affects Versions: 3.4.0 >Reporter: Lars Uffmann >Priority: Major > > Coming with CXF-8257 {{org.apache.cxf.ext.logging.LoggingInInterceptor}} will > log a given message only once: > {code:java} > public void handleMessage(Message message) throws Fault { > if (isLoggingDisabledNow(message)) { > return; > } else { > //ensure only logging once for a certain message > //this can prevent message logging again when fault > //happen after PRE_INVOKE phase(rewind calls into > LoggingInFaultInterceptor) > message.put(LIVE_LOGGING_PROP, Boolean.FALSE); > } > {code} > Filtering is done per message, not per Interceptor instance. We use a custom > {{MyLoggingInInterceptor}} which subclasses the {{LoggingInInterceptor}}. (We > Subclass in order to use different {{LogEventSender).}} So two distinct > interceptor instances are applied to the Endpoint/Bus/Client but the message > is logged only in the first invocation. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (CXF-8366) allow to disable asmhelper generation
olivier dufour created CXF-8366: --- Summary: 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 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 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[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> 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> 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 pur