camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (CAMEL-2083) Delayed start of spring camel context does not work with "shouldStartContext=false"
Date Thu, 22 Oct 2009 04:59:52 GMT

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

Claus Ibsen reassigned CAMEL-2083:
----------------------------------

    Assignee: Claus Ibsen

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


Mime
View raw message