[
https://issues.apache.org/jira/browse/CAMEL-7327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen reassigned CAMEL-7327:
----------------------------------
Assignee: Claus Ibsen
> Improve Container.Instance API to deal with setting a Container after
> CamelContexts have been created. There is a big risk CamelContext's won't get
> managed right now
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-7327
> URL: https://issues.apache.org/jira/browse/CAMEL-7327
> Project: Camel
> Issue Type: Improvement
> Components: camel-core, osgi
> Affects Versions: 2.12.3
> Reporter: james strachan
> Assignee: Claus Ibsen
> Fix For: 2.12.4, 2.13.1, 2.14.0
>
>
> In environments like OSGi startup ordering is kinda random. Right now
> CamelContexts's can startup and call
> {code}
> Container.Instance.manage(CamelContext)
> {code}
> https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/spi/Container.java#L64
> before any Container has called Container.Instance.set(). These
> CamelContexts's will then not be managed.
> A neater solution would be, if there is no container currently set:
> https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/spi/Container.java#L66
> then keep a track of the CamelContext objects in a Set<CamelContext> - until
> Container.Instance.unmanage() is called when they are stopped; then when
> Container.Instance.set(Container) is called; all the previously registered
> CamelContext's can be passed into the Container (and removed from the Set).
--
This message was sent by Atlassian JIRA
(v6.2#6252)