You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Chris Geer <ch...@cxtsoftware.com> on 2012/12/19 15:08:28 UTC

Dynamically Creating/Deploying Camel Routes

We are building a system running on top of Karaf and have a need for one of
our OSGI services to be able to dynamically create new camel contexts and
routes. I thought I could get away with just creating a new
DefaultCamelContext but I'm running into a lot of problems with component
resolution (among other things). After some research I came across the
OSGIDefaultCamelContext however that seems to be embedded in the
camel-blueprint and camel-spring bundles and not directly accessible. We
are using blueprint but I didn't think manually creating blueprint contexts
was the right solution either.

If I create my context/route in a blueprint file it all works fine, I just
need to figure out how to create them dynamically.

Camel 2.10.3

Thanks,
Chris

Re: Dynamically Creating/Deploying Camel Routes

Posted by rodgersh <hu...@lmco.com>.
Hello -

We are doing something very similar, except we have a single camel context
per OSGi bundle, which can have multiple camel routes dynamically created
and added to the camel context. Did you ever figure out how to create a new
camel context for each dynamically created route?

Thanks -

Hugh



--
View this message in context: http://camel.465427.n5.nabble.com/Dynamically-Creating-Deploying-Camel-Routes-tp5724370p5739691.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Dynamically Creating/Deploying Camel Routes

Posted by Chris Geer <ch...@cxtsoftware.com>.
I'd prefer to create new contexts because it's a multi-tenant app and I'd
like a little separation between the routes of each client. If it's not
possible, I can work within a single context, it's just not ideal.

Chris

On Wed, Dec 19, 2012 at 10:59 AM, Christian Müller <
christian.mueller@gmail.com> wrote:

> Do you really need to create new Camel context's?
> Why it's not enough to "only" create new routes?
>
> Best,
> Christian
>
> On Wed, Dec 19, 2012 at 3:08 PM, Chris Geer <ch...@cxtsoftware.com> wrote:
>
> > We are building a system running on top of Karaf and have a need for one
> of
> > our OSGI services to be able to dynamically create new camel contexts and
> > routes. I thought I could get away with just creating a new
> > DefaultCamelContext but I'm running into a lot of problems with component
> > resolution (among other things). After some research I came across the
> > OSGIDefaultCamelContext however that seems to be embedded in the
> > camel-blueprint and camel-spring bundles and not directly accessible. We
> > are using blueprint but I didn't think manually creating blueprint
> contexts
> > was the right solution either.
> >
> > If I create my context/route in a blueprint file it all works fine, I
> just
> > need to figure out how to create them dynamically.
> >
> > Camel 2.10.3
> >
> > Thanks,
> > Chris
> >
>
>
>
> --
>

Re: Dynamically Creating/Deploying Camel Routes

Posted by Christian Müller <ch...@gmail.com>.
Do you really need to create new Camel context's?
Why it's not enough to "only" create new routes?

Best,
Christian

On Wed, Dec 19, 2012 at 3:08 PM, Chris Geer <ch...@cxtsoftware.com> wrote:

> We are building a system running on top of Karaf and have a need for one of
> our OSGI services to be able to dynamically create new camel contexts and
> routes. I thought I could get away with just creating a new
> DefaultCamelContext but I'm running into a lot of problems with component
> resolution (among other things). After some research I came across the
> OSGIDefaultCamelContext however that seems to be embedded in the
> camel-blueprint and camel-spring bundles and not directly accessible. We
> are using blueprint but I didn't think manually creating blueprint contexts
> was the right solution either.
>
> If I create my context/route in a blueprint file it all works fine, I just
> need to figure out how to create them dynamically.
>
> Camel 2.10.3
>
> Thanks,
> Chris
>



--