You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Billy Buzzard <bi...@live.com> on 2014/12/23 17:16:56 UTC

Multiple camel routes create multiple camel context with the same name, but different start times

Would someone please explain to me why multiple camel routes create multiple
camel context with the same name, but different start times?  I created a
camel route (file) and assigned it to camel context1 and then created a
second camel route (file) and again I assigned it to context1.  When I
perform a camel:context-list I see context1 listed twice with different
times.  I would have assumed that there would have been only one instance of
context1.  Why are two context1 instances created and is there a way to add
subsequent routes (independent route files) to only one camel context?

I'm using Apache-Karaf-3.01 and  Java 1.7.0_60.



--
View this message in context: http://karaf.922171.n3.nabble.com/Multiple-camel-routes-create-multiple-camel-context-with-the-same-name-but-different-start-times-tp4037394.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Multiple camel routes create multiple camel context with the same name, but different start times

Posted by Billy Buzzard <bi...@live.com>.
I'm user ActiveMQ-5.10.0 and Camel-2.13.2.

I have several routes that I can individually start and stop, but there are
times when I watch to start or stop a group of routes.  Some of these routes
may not exist initially.  For example, six months from now I may want to add
a new route to an existing context.

I created Route1.xml file and attached the route to Camel Context
"context1".  Next, I created Route2.xml and attached that route to the same
Camel Context "context1".  I was hoping that both routes would be a part of
the same context, but it looks like two instances of the same context name
were created.



--
View this message in context: http://karaf.922171.n3.nabble.com/Multiple-camel-routes-create-multiple-camel-context-with-the-same-name-but-different-start-times-tp4037394p4037396.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Multiple camel routes create multiple camel context with the same name, but different start times

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

When you create routes like:

<camelContext xmlns="http://camel.apache.org/schema/blueprint">
   <route>
     <from uri="..."/><to uri="..."/>...
   </route>
   <route>
     <from uri="..."/><to uri="..."/>...
   </route>
</camelContext>

you have only one CamelContext containing two routes.

I think that the problem is just about the display of the 
camel:context-list command where it uses the route properties.

If you take a look on the MBeans, using jconsole for instance, you 
should see the right/expected values.

Let me take a look on the Camel commands. By the way, what's the Camel 
version that you use ?

Regards
JB

On 12/23/2014 05:16 PM, Billy Buzzard wrote:
> Would someone please explain to me why multiple camel routes create multiple
> camel context with the same name, but different start times?  I created a
> camel route (file) and assigned it to camel context1 and then created a
> second camel route (file) and again I assigned it to context1.  When I
> perform a camel:context-list I see context1 listed twice with different
> times.  I would have assumed that there would have been only one instance of
> context1.  Why are two context1 instances created and is there a way to add
> subsequent routes (independent route files) to only one camel context?
>
> I'm using Apache-Karaf-3.01 and  Java 1.7.0_60.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Multiple-camel-routes-create-multiple-camel-context-with-the-same-name-but-different-start-times-tp4037394.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com