[
https://issues.apache.org/jira/browse/SMX4-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501923#comment-13501923
]
Claus Ibsen commented on SMX4-1281:
-----------------------------------
You should use the IoC of blueprint to inject CamelContext; that is much better.
In the <prodBean> you can add a property and refer to the id of <camelContext>.
{code:xml}
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0"
default-availability="optional">
<camelContext id="test-route-context"
xmlns="http://camel.apache.org/schema/blueprint">
<routeBuilder ref="test-route"/>
</camelContext>
<bean id="test-route"
class="it.test.HelloRoute">
<property name="producerBean" ref="prodBean" />
</bean>
<bean id="prodBean" class="it.test.ProducerBean">
<property name="camelContext" ref="test-route-context" />
</bean>
</blueprint>
{code}
> CamelContextAware interface not catched correctly on blueprint bundle
> ---------------------------------------------------------------------
>
> Key: SMX4-1281
> URL: https://issues.apache.org/jira/browse/SMX4-1281
> Project: ServiceMix 4
> Issue Type: Bug
> Affects Versions: 4.5.0
> Environment: Linux, java-1.7.0.7
> Reporter: Ge@@ru
> Attachments: test-blueprint.tar.bz2
>
>
> setCamelContext method of a class that implement CamelContextAware interface
> it isn't called when object is defined on blueprint.xml file.
> On previous version 4.4.x this issue is not reproducible.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira