camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boday <>
Subject Re: Enpoint associated to a RouteContext
Date Thu, 01 Sep 2011 16:44:07 GMT
In theory, you can register/reuse a spring context within a container
(service registry, etc).  But, I don't recommend it given the complexity
involved and the best practice of decoupling application lifecycles from
each other...

Instead, I'd recommend each deployed application having its own spring/camel
context and use JMS, NMR, VM, SOAP, REST or the OSGi service registry for
inter-context communication.

here are my notes on the options with regards to OSGi and multiple apps...

GAILLARD Baptiste wrote:
> Hi,
> On our project we have intergrated Camel routes using multiple
> CamelContext.
> As explained on the Apache Camel Web Site multiple CamelContext are used
> when an application is based on multiple WARs where each WAR expose one
> CamelContext for example.
> But our project have specific needs :
>  - We have one "Global" CamelContext for the application
>  - We have several "Sub" CamelContext where each "Sub" CamelContext is a
> "component" for our application. Each "component" (or "Sub" CamelContext)
> can define the endpoints it needs, this is because those "components" (or
> "Sub" CamelContext) can define "workflows" which have multiple execution
> paths and provides "parallel processing", etc...
> (Everything is declare using Spring XML Apache Camel DSL.)
> What we would like to know is if it is possible to refactor our solution
> to have :
>  - Only one "Global" CamelContext
>  - Having Several RouteContext where each RouteContext is a "component"
> for our application.
> I know this is possible but what we want to provide is the possibility for
> a RouteContext to declare their own EndPoints (this is because the
> implementor of those RouteContext must be free to choose how they
> implement the "component", for example they can decide to have their ony
> JMS queue to make their "component" work)...
> We have looked in the Camel XSD file but the "routeContext" element seems
> to no being able to declare it's own Endpoint.
> Is it possible to declare Camel Endpoints which are RouteContext scoped
> and not CamelContext scoped ?
> Thanks,
> Baptiste Gaillard

Ben O'Day
IT Consultant -

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message