camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomohisa Igarashi <>
Subject Re: Access CamelContext from a plain-old Servlet
Date Thu, 03 Nov 2016 01:07:22 GMT

Did you try this one? It seems to be providing CamelContext as a ServletContext attribute.


On 11/03/2016 01:16 AM, PeterJNelson wrote:
> I have a web application that uses Camel.  I do not use the camel servlet,
> but I do use the Spring ContextLoaderListener to start my CamelContext.
> I've tried creating a POJO that implements CamelContextAware, and added that
> POJO as a bean in my camel config file.  My servlet then accesses that bean
> to get the CamelContext.  Unfortunately, that CamelContext is always null.
> Meanwhile, all my routes run just fine. I have beans that operate on
> Exchange objects, and they can access CamelContext without issue, but my
> POJO always has a null CamelContext.
> How do I access an existing CamelContext from a Servlet in the same
> environment?
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

View raw message