-
1. Re: Cannot shutdown webapp with embedded hornetq
clebert.suconic Nov 24, 2012 6:13 PM (in response to aruffie)Since you have it embedded, you have to call server.stop before you stop your application, otherwise HornetQ will have threads running.
You could add a shutdow hook maybe? just a simple server.stop() on the shutdown hook (look on the javadoc for more information)
-
2. Re: Cannot shutdown webapp with embedded hornetq
aruffie Nov 25, 2012 3:08 AM (in response to clebert.suconic)Yes I know the server must be stop, this is what I do in my LoaderServlet (its initialize and destroy my webapp).
I have attached this class, but I think it's a problem of locking the hornetq-configuration.xml file, because when
I try to delete my webapp directory under tomcat/webapps/ only this file is present while all others were deleted.
A configuration that was used to load the server, it must be unloaded?
I also try to kill threaddump but nothing, 2, 3 thread remains active ... (look threaddump.log)
Adrien
-
LoaderServlet.java.zip 1.3 KB
-
threaddump.log.zip 2.8 KB
-
-
3. Re: Cannot shutdown webapp with embedded hornetq
yong_ouyang Nov 28, 2012 1:58 AM (in response to aruffie)You don't need to use xml file to configurate your hornetq. You can try whether this helps.
-
4. Re: Cannot shutdown webapp with embedded hornetq
aruffie Nov 28, 2012 2:18 AM (in response to yong_ouyang)No sorry I need to use xml file, because our configuration is here.
-
5. Re: Cannot shutdown webapp with embedded hornetq
clebert.suconic Nov 28, 2012 9:47 AM (in response to aruffie)These two Threads belong to the globalThreadPool created for the clients. You can configure the ServerLocator to not use a global Thread pool through the propery useGlobalPools = false, however these threads are daemon threads and they shouldn't block the shutdown of your server. It must be something else.
Look at the thread dump from the VM instead. That method you used is meant to be used within the application when crashes are about to happen.