|
From: Laurent C. <Lau...@jp...> - 2008-09-13 08:09:00
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Hi Leif,<br> <br> I apologize for the late answer.<br> The second option (launching the second process under the wrapper) is the one that works best for me.<br> I really appreciate your help, thanks a lot!<br> <br> -Laurent<br> <br> Leif Mortenson wrote: <blockquote cite="mid:c0a...@ma..." type="cite"> <pre wrap="">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. <a class="moz-txt-link-freetext" href="http://wrapper.tanukisoftware.org/doc/english/javadocs.html">http://wrapper.tanukisoftware.org/doc/english/javadocs.html</a> 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. <a class="moz-txt-link-freetext" href="http://wrapper.tanukisoftware.org/doc/english/prop-ignore-user-logoffs.html">http://wrapper.tanukisoftware.org/doc/english/prop-ignore-user-logoffs.html</a> Cheers, Leif On Sat, Sep 6, 2008 at 10:05 PM, Laurent Cohen <a class="moz-txt-link-rfc2396E" href="mailto:Lau...@jp..."><Lau...@jp...></a> wrote: </pre> <blockquote type="cite"> <pre wrap="">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 <a class="moz-txt-link-freetext" href="http://www.jppf.org">http://www.jppf.org</a> ------------------------------------------------------------------------- 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 <a class="moz-txt-link-freetext" href="http://moblin-contest.org/redirect.php?banner_id=100&url=/">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a> _______________________________________________ Wrapper-user mailing list <a class="moz-txt-link-abbreviated" href="mailto:Wra...@li...">Wra...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/wrapper-user">https://lists.sourceforge.net/lists/listinfo/wrapper-user</a> </pre> </blockquote> <pre wrap=""><!----> ------------------------------------------------------------------------- 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 <a class="moz-txt-link-freetext" href="http://moblin-contest.org/redirect.php?banner_id=100&url=/">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a> _______________________________________________ Wrapper-user mailing list <a class="moz-txt-link-abbreviated" href="mailto:Wra...@li...">Wra...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/wrapper-user">https://lists.sourceforge.net/lists/listinfo/wrapper-user</a> </pre> </blockquote> </body> </html> |