[
https://issues.apache.org/activemq/browse/CAMEL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61923#action_61923
]
Dmitry Drozdov commented on CAMEL-3136:
---------------------------------------
I use Spring 3.0.3
As far as I could understand, for some reason CXF uses SingletonFactory to get
(create) the bean, but should use SpringBeanFactory.
> cxfbean creates another instance of the class instead of directly using the
> referenced bean
> -------------------------------------------------------------------------------------------
>
> Key: CAMEL-3136
> URL: https://issues.apache.org/activemq/browse/CAMEL-3136
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.4.0
> Reporter: Dmitry Drozdov
>
> ... this makes it impossible to inject properties to the @WebService class
> <camelContext>
> <route>
> <from uri="...." />
> <to uri="cxfbean:handler" />
> </route>
> </camelContext>
> <bean id="handler" class="a.b.c.Handler">
> <property name="prop1" value="5" />
> </bean>
> when "handler" is created by Spring, its 'prop1' is set to '5'
> when the cxfbean:handler is triggered, the 'prop1' is null, because CXF
> created another instance of Handler instead of using the one created by Spring
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.