Claus,

I was thinking to use ServletContextListener and create/start
DefaultCamelContext when contextInitialized is called. The route I want to
use is quite simple, so I can create it straightforward.

Then stop camelContext when contextDestroyed is called.

Similar to running camel as standalone app with Main class.

Do you see any issues with this approach?

Thanks
Bilgin

On 25 June 2012 16:55, Claus Ibsen <[email protected]> wrote:

> Hi
>
> How would you bootstrap Camel in the web app?
>
> For example using a servlet or context listener?
> But then how would it know which routes / and whatnot to include?
>
> I guess either some new fancy CDI or you would have to refer to a
> config file / java class or whatnot?
>
>
> On Mon, Jun 25, 2012 at 4:41 PM, Bilgin Ibryam <[email protected]> wrote:
> > Hi,
> >
> > is there any example or a helper class for running (starting/stopping)
> > Camel in a web-app without using Spring xml?
> >
> > There is an example servlet app [1] and a tutorial [2] for running Camel
> in
> > a web-app, but both are using Spring
> >
> > [1] http://camel.apache.org/servlet-tomcat-example.html
> > [2]
> >
> http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html
> >
> >
> > Bilgin
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [email protected]
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Reply via email to