camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PeterJNelson <>
Subject Access CamelContext from a plain-old Servlet
Date Wed, 02 Nov 2016 16:16:52 GMT
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

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message