|
From: Riyaz S. <Riy...@mi...> - 2009-01-29 14:44:39
|
Hi Leif,
Thanks for your inputs. Actually my understanding about the wrapper was: wrapper will create a thread in which my main class will keep running.
But this is not the case (as u explained). So some how I tried to keep my main class running (by adding while (true) {}) and it worked.
Thanks and regards,
Riyaz..
-----Original Message-----
From: Leif Mortenson [mailto:lei...@ta...]
Sent: Thursday, January 29, 2009 7:17 PM
To: wra...@li...
Subject: Re: [Wrapper-user] Wrapper Stopped with JVM exited normally
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..
>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
http://www.mindtree.com/email/disclaimer.html
|