Confusion about Camel routing in SMX 4

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Confusion about Camel routing in SMX 4

Samuel Cox-2
Hi,

I am deploying JBI components into the ServiceMix 4 environment.  In my
code I have created a few extensions of RouteBuilder.  In my beans.xml,
I have the following:

    <osgi:camelContext
xmlns="http://activemq.apache.org/camel/schema/spring">
         <package>org.samuel.controller</package>
     </osgi:camelContext>

I can see my routes getting used.  However, I'm concerned that I'm
somehow mucking with something more far reaching.  In other words, I'm
guessing my RouteBuilders are affecting some CamelContext that reaches
across all of SMX.

Mostly, I'm worried about what happens if I do something incorrectly.
For example, if my Processor code throws an NPE or I route to a
non-existant JBI endpoint, will I be screwing up the CamelContext for
all other routes?

My overarching question is: does what I've described sound reasonable or
  am I going way off course?

Thanks.

--
crankydillo
Reply | Threaded
Open this post in threaded view
|

Re: Confusion about Camel routing in SMX 4

Willem.Jiang
Administrator
No, your bad processor and route will not affect other routes of the
same camel context.

As each route will not see other routes in the same camel context, and
camel context holds some resources like components, endpoints, etc for
route to use.

Willem


crankydillo wrote:

> Hi,
>
> I am deploying JBI components into the ServiceMix 4 environment.  In my
> code I have created a few extensions of RouteBuilder.  In my beans.xml,
> I have the following:
>
>    <osgi:camelContext
> xmlns="http://activemq.apache.org/camel/schema/spring">
>         <package>org.samuel.controller</package>
>     </osgi:camelContext>
>
> I can see my routes getting used.  However, I'm concerned that I'm
> somehow mucking with something more far reaching.  In other words, I'm
> guessing my RouteBuilders are affecting some CamelContext that reaches
> across all of SMX.
>
> Mostly, I'm worried about what happens if I do something incorrectly.
> For example, if my Processor code throws an NPE or I route to a
> non-existant JBI endpoint, will I be screwing up the CamelContext for
> all other routes?
>
> My overarching question is: does what I've described sound reasonable or
>  am I going way off course?
>
> Thanks.
>