You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/10/22 08:03:52 UTC

[jira] Resolved: (CAMEL-2083) Delayed start of spring camel context does not work with "shouldStartContext=false"

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

Claus Ibsen resolved CAMEL-2083.
--------------------------------

       Resolution: Won't Fix
    Fix Version/s: 2.1.0

shouldStartContext option will be removed and replaced with autoStartup in Camel 2.1

> Delayed start of spring camel context does not work with "shouldStartContext=false"
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-2083
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2083
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 2.0.0
>         Environment: unit test, jdk 1.5, spring 2.5.6
>            Reporter: Laurent Bovet
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> 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:
> {noformat}
>             ((SpringCamelContext)camelContext).setShouldStartContext(true);
>             camelContext.start();
> {noformat}
> Example context:
> {noformat}
> 	<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>	
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.