Tomcat has a force shutdown option. Make sure you set CATALINA_PID variable to point to a file name, for example in
setenv.sh put CATALINA_PID=$CATALINA_BASE/logs/tomcat.pid Then, call './shutdown.sh -force' This will use unix kill and kill -9 as opposed to trying to connect into the JVM. Tomcat first issues a regular 'kill' and then gives the JVM some time to exit, if the jvm doesn't exit, it terminates the process. This is the preferred way to shutdown, since a OutofMemoryError in your application may leave the JVM hanging. Filip > -----Original Message----- > From: Romain Manni-Bucau [mailto:[email protected]] > Sent: Thursday, May 31, 2012 11:31 AM > To: [email protected] > Subject: Re: How do you shut down ActiveMQ transport? > > Hi, > > Dont have it in head but i think AMQ has some url options to shutdown > quickly > > Maybe try to add daemon option to true > > - Romain > Le 31 mai 2012 18:55, "Bjorn Danielsson" <bjorn- > [email protected]> > a écrit : > > > Hi guys, > > > > I just noticed that TomEE-plus takes a very long time > > to shutdown if a remote ActiveMQ broker is being used. > > Has anyone else seen this behaviour? Or could I be doing > > something strange that causes this? > > > > When running "shutdown.sh" Tomcat stops all webapps as > > usual, but it takes somewhere between 10-30 minutes before > > the JVM terminates. During that time two TCP connections > > to the remote broker are kept open. > > > > The same application using a "tcp://localhost:61616" broker > > hosted within TomEE shuts down immediately as expected. > > > > Version info: > > > > apache-tomee-1.1.0-20120531.144231-5-plus > > apache-activemq-5.6.0 (on the remote host, using default conf) > > > > -- > > Björn Danielsson > > Cuspy Code AB > >
