Re: Camel crashes upon ActiveMQ shutdown

2012-03-06 Thread Christian Schneider
Absolutely. The camel-example-servlet-tomcat shows how to setup camel in a war and how to start it using the spring application context loader listener. This is the supported way of running camel in a servlet container. Christian Am 06.03.2012 11:55, schrieb Claus Ibsen: Hi You should use

Re: Camel crashes upon ActiveMQ shutdown

2012-03-06 Thread Claus Ibsen
Hi You should use a servlet this is how web apps is supposed to be deployed and have your apps lifecycle handled by the container. On Mon, Mar 5, 2012 at 4:00 PM, ShlomiJ wrote: > Tomcat > > A servlet, which is set to be initialized on startup using Tomcat's > 1 in web.xml, initiates a singleto

Re: Camel crashes upon ActiveMQ shutdown

2012-03-05 Thread ShlomiJ
Tomcat A servlet, which is set to be initialized on startup using Tomcat's 1 in web.xml, initiates a singleton. That singleton holds a CamelContext member. This context is initialized exactly as described in my previous post, except for the try/catch (this is simply because that the method in the

Re: Camel crashes upon ActiveMQ shutdown

2012-03-05 Thread Claus Ibsen
Hi Can you tell a bit more about the difference in Tomcat, that works, and the other that does not work. I assume you deploy a WAR to Tomcat, and have a spring servlet/listener to pickup and start the app, from the spring XML file. And then there is some difference in how you boot up Camel? Or ho

Re: Camel crashes upon ActiveMQ shutdown

2012-03-04 Thread ShlomiJ
Claus Ibsen-2 wrote > Is Camel embedded in the same JVM as the ActiveMQ The broker service is not embedded in the same JVM. Christian Schneider wrote > You could try to set maxReconnectAttempts to e.g. 2. Then activemq will > try two times and then return to camel. Camel will then also try to >

Re: Camel crashes upon ActiveMQ shutdown

2012-03-04 Thread Christian Schneider
As far as I know the failover transport makes a route seem to "hang" if no server is available as the connect call waits till a broker is available again. Typically this should only halt the route and not the whole process. You could try to set maxReconnectAttempts to e.g. 2. Then activemq will

Re: Camel crashes upon ActiveMQ shutdown

2012-03-04 Thread Claus Ibsen
Hi Is Camel embedded in the same JVM as the ActiveMQ. Or do you use a remote ActiveMQ broker running on another box/JVM? If its embedded you can take a look at this example, where you need to use depends-on attribute in Spring XML to specify ordering https://svn.apache.org/repos/asf/camel/trunk/e