Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
2.0.0
-
None
-
unit test, jdk 1.5, spring 2.5.6
Description
I set "shouldStartContext" to false and want to start the context later by calling start() on the context.from the code.
The routes do not start.
I found a workaround, setting shouldStartContext manually before starting the context from the code:
((SpringCamelContext)camelContext).setShouldStartContext(true); camelContext.start();
Example context:
<camel:camelContext id="ids.camel.context" shouldStartContext="false"> <!-- Queue endpoints. --> <camel:endpoint id="defaultInQueue" uri="jms:queue:${default.in.queue.name}"/> <camel:endpoint id="defaultOutQueue" uri="jms:queue:${default.out.queue.name}"/> <!-- Route to send messages to IDS --> <camel:route id="out" trace="true"> <camel:from uri="direct:sender"/> <!-- Do not expect answer (fire and forget) --> <camel:setExchangePattern pattern="InOnly"/> <camel:to ref="defaultOutQueue"/> </camel:route> <!-- Route to receive --> <camel:route id ="in" trace="true"> <camel:from ref="defaultInQueue"/> <camel:to uri="bean:defaultTextAdapter?method=onMessage"/> </camel:route> </camel:camelContext>
Attachments
Issue Links
- is superceded by
-
CAMEL-2094 CamelContext should support autoStartup
- Closed