servicemix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james.strac...@gmail.com>
Subject Re: [Spring] Multiple Camel Route in separate bundles
Date Thu, 07 Oct 2010 12:16:17 GMT
On 7 October 2010 13:10, Olivier.Roger <olivier.roger@bsb.com> wrote:
>
> If I understand correctly, this method can only be applied when using bean
> from another bundle.
>
> In my case the problem is a bit different as each route is self-sufficient.
> But when I deploy them together, bean declared in the same spring context as
> the route cannot be found.
>
> At the moment my route are using vm: protocol to exchange messages.
>
> A simple version can be summarize to
>
> Route 1 : jms:A -> vm:B
> Route 2 : vm:B -> bean:C
>
> Each route has its own Spring context (which contains a CamelContext). Bean
> C is declared in Route 2 Spring context.
>
> Did I miss something ?

The vm transport in Camel only works with other vm endpoints within
the exact same class loader. Are you reusing the same underlying Camel
bundles across your route bundles?

Depending on your class loader setup, different bundles may not be
able to communicate over vm transport. Try replacing the "vm"
endpoints with the "nmr" endpoints which are designed to work across
any version of Camel (or use "jms" endpoints to span both class loader
and JVM boundaries).

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Mime
View raw message