camel-users mailing list archives

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

Did you try this one? It seems to be providing CamelContext as a ServletContext attribute.
http://camel.apache.org/servletlistener-component.html

Thanks,
Tomo

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: http://camel.465427.n5.nabble.com/Access-CamelContext-from-a-plain-old-Servlet-tp5789659.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
View raw message