[ https://issues.apache.org/jira/browse/CAMEL-7229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13912773#comment-13912773 ]
Sergey Beryozkin edited comment on CAMEL-7229 at 2/26/14 11:17 AM: ------------------------------------------------------------------- Hi Willem, can we just remove this call where the custom producer bus is lost ? If this may be done for a reason to take care of some scenarios (where using the thread default bus is not OK), can we, in CxfRsProducer do something like: {code:java} private static class ProducerJAXRSClientFactoryBean extends JAXRSClientFactoryBean { public isBusSet() { return super.bus != null; } } {code} and use ProducerJAXRSClientFactoryBean instead of JAXRSClientFactoryBean within the producer code and then {code:java} if (!cfb.isBusSet()) { cfb.setBus(((CxfRsEndpoint)getEndpoint()).getBus()); } {code} Introducing the custom bean may be the safest bet... What do you think ? Sergey was (Author: sergey_beryozkin): Hi Willem, can we just remove this call where the custom producer bus is lost ? If this may be done for a reason to take care of some scenarios (where using the thread default bus is not OK), can we, in CxfRsProducer do something like: {code:java} private static class ProducerJAXRSClientFactoryBean extends JAXRSClientFactoryBean { public isBusSet() { return super.bus != null; } } {code} and use ProducerJAXRSClientFactoryBean instead of JAXRSClientFactoryBean within the producer code and then {code:java} if (!cfb.isBusSet()) { cfb.setBus(((CxfRsEndpoint)getEndpoint()).getBus()); } {code} What do you think ? Sergey > [cxfrs] Producer override bean bus > ---------------------------------- > > Key: CAMEL-7229 > URL: https://issues.apache.org/jira/browse/CAMEL-7229 > Project: Camel > Issue Type: Bug > Components: camel-cxf > Affects Versions: 2.12.1 > Reporter: Alexey Markevich > Priority: Minor > > Bean configuration: > org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean cf_cCXFRS_1 = new > org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean(); > cf_cCXFRS_1.setBus(customBus); > Route: > .to("cxfrs://bean://cCXFRS_1") > But at > org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeHttpClient(Exchange) > cfb.setBus(((CxfRsEndpoint)getEndpoint()).getBus()); -- This message was sent by Atlassian JIRA (v6.1.5#6160)