You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by rajivbandaru <ra...@gmail.com> on 2012/09/24 20:49:17 UTC

Global Camel Context

Hi, we are dealing with this situation and any clue on this would be helpful.
here is the problem statement:

We route several jms messages to various jms endpoints, and each endpoint
could be a different jms provider, such as tibco, weblogic, activemq etc. in
addition, we have several routes using the same jms providers to route jms
messages. so the same list of jms providers need to be listed in every
camel-context in every route. is there a global camel context that we could
list all the jms providers and refer to that global camel context in all the
routes?

Thank you very much. 




--
View this message in context: http://camel.465427.n5.nabble.com/Global-Camel-Context-tp5719870.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Global Camel Context

Posted by Willem jiang <wi...@gmail.com>.
Hi,
Current we don't have the Globle Camel Context that you want.

It looks like your routes don't share the same camel context.

If you are using Spring it could be easy to let all the camel contexts share the same jms endpoint configuration by import the resource like this

 <import resource="classpath:/com/example/jms/JMSComponents" />

If you are using the Java DSL, you can add the customer method to setup the jms components for you before you setup the routes. 

-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang




On Tuesday, September 25, 2012 at 2:49 AM, rajivbandaru wrote:

> Hi, we are dealing with this situation and any clue on this would be helpful.
> here is the problem statement:
> 
> We route several jms messages to various jms endpoints, and each endpoint
> could be a different jms provider, such as tibco, weblogic, activemq etc. in
> addition, we have several routes using the same jms providers to route jms
> messages. so the same list of jms providers need to be listed in every
> camel-context in every route. is there a global camel context that we could
> list all the jms providers and refer to that global camel context in all the
> routes?
> 
> Thank you very much. 
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Global-Camel-Context-tp5719870.html
> Sent from the Camel Development mailing list archive at Nabble.com (http://Nabble.com).




Re: Global Camel Context

Posted by Raul Kripalani <ra...@evosent.com>.
It depends on if you are on an OSGi container or not.

If you are, you could initialise your JmsComponents on a single bundle and
export them as an OSGi Service. Then import them into the route bundles
with an ID that matches the prefix you want to use for the endpoints.

If you're not on OSGi, take a look at Camel Contexts and RouteBuilderRef.
It might be what you're after [1].

[1] http://camel.apache.org/spring.html

P. S.: Please continue responding on users@ only. (remove dev@).

Thanks.
Sent from a mobile device
On Sep 25, 2012 8:29 AM, "Claus Ibsen" <cl...@gmail.com> wrote:

> Hi
>
> Please use the @user mailing list for this kind of questions.
>
> See the blue box on this page about that
> http://camel.apache.org/mailing-lists.html
>
>
>
> On Mon, Sep 24, 2012 at 8:49 PM, rajivbandaru <ra...@gmail.com>
> wrote:
> > Hi, we are dealing with this situation and any clue on this would be
> helpful.
> > here is the problem statement:
> >
> > We route several jms messages to various jms endpoints, and each endpoint
> > could be a different jms provider, such as tibco, weblogic, activemq
> etc. in
> > addition, we have several routes using the same jms providers to route
> jms
> > messages. so the same list of jms providers need to be listed in every
> > camel-context in every route. is there a global camel context that we
> could
> > list all the jms providers and refer to that global camel context in all
> the
> > routes?
> >
> > Thank you very much.
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Global-Camel-Context-tp5719870.html
> > Sent from the Camel Development mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Re: Global Camel Context

Posted by Raul Kripalani <ra...@evosent.com>.
It depends on if you are on an OSGi container or not.

If you are, you could initialise your JmsComponents on a single bundle and
export them as an OSGi Service. Then import them into the route bundles
with an ID that matches the prefix you want to use for the endpoints.

If you're not on OSGi, take a look at Camel Contexts and RouteBuilderRef.
It might be what you're after [1].

[1] http://camel.apache.org/spring.html

P. S.: Please continue responding on users@ only. (remove dev@).

Thanks.
Sent from a mobile device
On Sep 25, 2012 8:29 AM, "Claus Ibsen" <cl...@gmail.com> wrote:

> Hi
>
> Please use the @user mailing list for this kind of questions.
>
> See the blue box on this page about that
> http://camel.apache.org/mailing-lists.html
>
>
>
> On Mon, Sep 24, 2012 at 8:49 PM, rajivbandaru <ra...@gmail.com>
> wrote:
> > Hi, we are dealing with this situation and any clue on this would be
> helpful.
> > here is the problem statement:
> >
> > We route several jms messages to various jms endpoints, and each endpoint
> > could be a different jms provider, such as tibco, weblogic, activemq
> etc. in
> > addition, we have several routes using the same jms providers to route
> jms
> > messages. so the same list of jms providers need to be listed in every
> > camel-context in every route. is there a global camel context that we
> could
> > list all the jms providers and refer to that global camel context in all
> the
> > routes?
> >
> > Thank you very much.
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Global-Camel-Context-tp5719870.html
> > Sent from the Camel Development mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Re: Global Camel Context

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Please use the @user mailing list for this kind of questions.

See the blue box on this page about that
http://camel.apache.org/mailing-lists.html



On Mon, Sep 24, 2012 at 8:49 PM, rajivbandaru <ra...@gmail.com> wrote:
> Hi, we are dealing with this situation and any clue on this would be helpful.
> here is the problem statement:
>
> We route several jms messages to various jms endpoints, and each endpoint
> could be a different jms provider, such as tibco, weblogic, activemq etc. in
> addition, we have several routes using the same jms providers to route jms
> messages. so the same list of jms providers need to be listed in every
> camel-context in every route. is there a global camel context that we could
> list all the jms providers and refer to that global camel context in all the
> routes?
>
> Thank you very much.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Global-Camel-Context-tp5719870.html
> Sent from the Camel Development mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen