|
From: Leif M. <le...@ta...> - 2008-09-07 13:25:08
|
Laurent, In your setup, JVM A is being launched by the Wrapper and protected from the logout signal using its JNI native library. JVM B is just a standalone JVM and will thus exit when it gets the logout signal. Would it be possible for you to create a second Service for JVM B running under the Wrapper which is setup to launch manually? Then when the timing is correct, JVM A can start or stop the JVM B service using the WrapperManager.sendServiceControlCode method. http://wrapper.tanukisoftware.org/doc/english/javadocs.html You would also want to make JVM B dependent on JVM A so it would always be stopped if JVM A was stopped. Does this sound like it would work? Another option would be to simply launch JVM B under the wrapper rather than launching JVM B directly. If you do this, you will want to set the following property which was added for this specific case where the Wrapper was launched from another service but is not a service itself. http://wrapper.tanukisoftware.org/doc/english/prop-ignore-user-logoffs.html Cheers, Leif On Sat, Sep 6, 2008 at 10:05 PM, Laurent Cohen <Lau...@jp...> wrote: > Hello, > > I am having an issue with a windows service stopping when the user logs out. > > I'm using Java Service Wrapper 3.3.1 (CE) on Windows XP sp2, Sun JDK 1.6_u4 > Here's what happens: > - my app is made in fact of 2 Java processes A and B > - process A launches process B when it starts > - process A starts a ServerSocket, accepts a connection from process B, > then reads from that connection. > this tells A when B is killed using Ctrl-C or the task manager, it also > tells B when A is killed as well. In either case the other process stops > - if B exits "normally", using a System.exit(x), A gets the exit code, > if the code is 2 it restarts B, otherwise it exits as well. The goal of > this is to enable a remote restart of process B from a JMX-enabled GUI > - what I have noticed is that when I logout, then login again, the > service is stopped, and I see a connection reset exception in the log of > process A, which means that process B died somehow, thus getting process > A to exit. > > Do you have any hints as to why the process B is killed when login out, > and are there any configuration options I can use to prevent it? > > Thanks for your time, > -Laurent > > --------------------------------- > Laurent Cohen > Visit JPPF at http://www.jppf.org > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |