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... http://www.consulting-notes.com/2010/08/osgi-bundle-communication-options.html 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 > > [@@THALES GROUP RESTRICTED@@] > ----- Ben O'Day IT Consultant -http://consulting-notes.com -- View this message in context: http://camel.465427.n5.nabble.com/Enpoint-associated-to-a-RouteContext-tp4757615p4759110.html Sent from the Camel - Users mailing list archive at Nabble.com.