Hi Yeah you can use @WebListener or whatever the servlet container supports.
Or for example use a spring xml file and a spring servlet listener that bootstrap spring and reads the xml file, where you can have <camelContext> to start Camel. Such as shown in this example https://github.com/apache/camel/tree/master/examples/camel-example-servlet-tomcat On Thu, Nov 21, 2019 at 10:41 PM Markus Punnar <markus.pun...@gmail.com> wrote: > > Hello! > > As I understand the ServletListener component which was used to bootstrap > Camel is deprecated and removed in Camel 3. From the docs I did not find > what should be done instead when using Camel 3? For Servlet 3.x contains > the @WebListener annotation-driven configuration can be used. Is this the > recommended way to go now and drop the web.xml entirely? > > The same question also goes for implementing a custom lifecycle. On Camel > 2.x it was done by > implementing org.apache.camel.component.servletlistener.CamelContextLifecycle > which is now removed as well as far as I understand. > > If somebody can answer these questions or point me towards the correct > documentation or examples on how to do this on Camel 3, it would be > appreciated. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2