|
From: Leif M. <lei...@ta...> - 2009-01-29 13:46:36
|
Riyaz, What happens if you run your GatewayWrapper class without the Wrapper present? Java decides that it is time to shutdown when there are no more non-daemon threads running in the application. It works the same way when running within the Wrapper. When all non-daemon threads have completed, the JVM will exit and the shutdown hooks will be fired. Once of those shutdown hooks controls the shutdown process of the Wrapper. My guess is that each of your beans either do not launch threads or they launch daemon threads. Just to make sure, could you set the wrapper.debug=true property then reply with the resulting log? The solution to this is to have the main method never return by going into a loop containing a wait, Another non-daemon thread will work as well. Cheers, Leif On Thu, Jan 29, 2009 at 9:26 PM, Riyaz Saiyed <Riy...@mi...> wrote: > > > Hi, > > I'm trying to start my java class as service. In that class, i'm loading > spring beans and starting a jms listener (around 8-10 listener). > > Here all the beans are loaded and all the listeners are started. But soon > after that, main method completes execution and service wrapper stops with > code 0. > > Here is my config: > wrapper.java.command=%JAVA_HOME%/bin/java > wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp > wrapper.java.classpath.1=../lib/*.jar > wrapper.java.classpath.2=%JAVA_HOME%/lib/tools.jar > wrapper.java.library.path.1=../lib > wrapper.app.parameter.1=aero.sita.csp.esb2.GatewayWrapper > > ----- > Regards, > Riyaz.. > |