You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2012/09/06 09:27:08 UTC

[jira] [Work started] (SMXCOMP-945) OsgiJbiComponent should use camel ServiceSupport to manage the lifecycle

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

Work on SMXCOMP-945 started by Freeman Fang.

> OsgiJbiComponent should use camel ServiceSupport to manage the lifecycle
> ------------------------------------------------------------------------
>
>                 Key: SMXCOMP-945
>                 URL: https://issues.apache.org/jira/browse/SMXCOMP-945
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>
> currently it implements spring InitializingBean/DisposableBean to do init/cleanup, so that with blueprint configuration will get exception like
> Caused by: java.lang.NullPointerException
>     at org.apache.servicemix.camel.JbiEndpoint$JbiProducer.start(JbiEndpoint.java:94)
>     at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
>     at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:378)
>     ... 82 more
> it's because 
> org.apache.servicemix.camel.osgi.OsgiJbiComponent.afterPropertiesSet() method
> was called when using Spring so the camelJbiComponent was set to a non-null value. When using blueprint, this method was never called therefore the camelJbiComponent was always null and it caused NPE in JbiEndpoint$JbiProducer.start() function later on since jbiComponent.getCamelJbiComponent() return a null value:
> We should leverage Camel ServiceSupport start|stop method to take care of the lifecycle to make it IOC container independent.

--
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