List Info

Thread: Dynamic CBR with camel




Dynamic CBR with camel
country flaguser name
United States
2007-10-16 16:09:33
I have been successfully using camel to perform routing
between jbi,  
jms, logs, etc. However, all of the routing has been static
as  
defined in the camel-context.xml. What is the best way to
acquire the  
NMR's CamelContext object to add routes dynamically from
other services?

Thanks!
Aaron

Re: Dynamic CBR with camel
user name
2007-10-16 16:23:54
Sounds cooll..
Could you please highlight  at highlevel the procedure that
you followed.

cheers.


On 10/16/07, Aaron Nielsen <aaron_nielsenraytheon.com> wrote:
>
> I have been successfully using camel to perform routing
between jbi,
> jms, logs, etc. However, all of the routing has been
static as
> defined in the camel-context.xml. What is the best way
to acquire the
> NMR's CamelContext object to add routes dynamically
from other services?
>
> Thanks!
> Aaron
>
Re: Dynamic CBR with camel
country flaguser name
United States
2007-10-18 11:48:14
Sure, here is the basic idea:

- Create a camel service unit based on the example. Within
the  
RouteBuilder class, use DSL to create routes between
endpoints . I'm  
using xpath predicates etc. I'm also using camel JBI
endpoints to  
serve as proxies to other services in a clustering
environment.
- Create several lightweight components for the application.
Provide  
the static wiring between POJOs within the component
servicemix.xml  
file (including defaults etc)
- Create a plain service assembly that contains the above
service units
- Deploy the service assembly

At some point during normal operation, a new route needs to
be  
created. Is the camel context available through JNDI or
something  
similar? I'm thinking the right answer may be to deploy
another camel  
SU that has the capability for dynamic configuration. This
suggests a  
better design since the routing logic is separate from the
application.

Just thinking out loud... comments are welcome.

Aaron


On Oct 16, 2007, at 2:23 PM, d.santosh wrote:

> Sounds cooll..
> Could you please highlight  at highlevel the procedure
that you  
> followed.
>
> cheers.
>
>
> On 10/16/07, Aaron Nielsen <aaron_nielsenraytheon.com> wrote:
>>
>> I have been successfully using camel to perform
routing between jbi,
>> jms, logs, etc. However, all of the routing has
been static as
>> defined in the camel-context.xml. What is the best
way to acquire the
>> NMR's CamelContext object to add routes dynamically
from other  
>> services?
>>
>> Thanks!
>> Aaron
>>


Re: Dynamic CBR with camel
user name
2007-10-18 12:40:40
There is no global camel context.  When you deploy a SU to
the Camel
SE, a context will be created for this SU.   Though, you
should be
able to create a new Camel context and add JBI routes to it;
you just
need to feed it with a ComponentContext at some point.

On 10/18/07, Aaron Nielsen <aaron_nielsenraytheon.com> wrote:
> Sure, here is the basic idea:
>
> - Create a camel service unit based on the example.
Within the
> RouteBuilder class, use DSL to create routes between
endpoints . I'm
> using xpath predicates etc. I'm also using camel JBI
endpoints to
> serve as proxies to other services in a clustering
environment.
> - Create several lightweight components for the
application. Provide
> the static wiring between POJOs within the component
servicemix.xml
> file (including defaults etc)
> - Create a plain service assembly that contains the
above service units
> - Deploy the service assembly
>
> At some point during normal operation, a new route
needs to be
> created. Is the camel context available through JNDI or
something
> similar? I'm thinking the right answer may be to deploy
another camel
> SU that has the capability for dynamic configuration.
This suggests a
> better design since the routing logic is separate from
the application.
>
> Just thinking out loud... comments are welcome.
>
> Aaron
>
>
> On Oct 16, 2007, at 2:23 PM, d.santosh wrote:
>
> > Sounds cooll..
> > Could you please highlight  at highlevel the
procedure that you
> > followed.
> >
> > cheers.
> >
> >
> > On 10/16/07, Aaron Nielsen <aaron_nielsenraytheon.com> wrote:
> >>
> >> I have been successfully using camel to
perform routing between jbi,
> >> jms, logs, etc. However, all of the routing
has been static as
> >> defined in the camel-context.xml. What is the
best way to acquire the
> >> NMR's CamelContext object to add routes
dynamically from other
> >> services?
> >>
> >> Thanks!
> >> Aaron
> >>
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.co
m/

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )