This content has been marked as final.
Show 1 reply
-
1. Re: Singleton in OSGI container
davsclaus Dec 8, 2011 4:13 AM (in response to eric.bender)You want to deploy the singleton bean in another bundle? And refer to this bean from another bundle that has a Camel route?
Instead you could just use a bean in the same bundle as the Camel route, and just define it as a in the XML file. The scope is by default singleton AFAIR.
You may also want to check out RoutePolicy in Camel
http://camel.apache.org/routepolicy.html
In Camel 2.9 onwards, we are adding many more lifecycle callbacks to the RoutePolicy such as
- onStart
- onStop
etc.