|
From: Leif M. <le...@ta...> - 2007-12-19 11:26:54
|
Markus, Looking at your log, the Wrapper is not doing anything special like killing the jvm process. In that case, the JVM is handling the shutdown of the JVM. The Wrapper simply calls System.exit in this case and runs its own shutdown hook to clean up after itself. The JVM should be waiting for all normal shutdown hooks to complete before the JVM exits. Are you certain that your JVM is not exiting due to an exception of some kind? try adding a Try finally block and see if that code is getting run. Cheers, Leif Markus Schlegel wrote: > Hi > We have encountered a problem with service wrapper (3.2 and 3.3). > We use the WrapperSimpleApp as integration method. We have registred > our own Shutdown hook. > When we stop the service using the service mgmt console, some parts of > the Shutdown hook runs, but the vm is being terminated before the > shutdownhook is finished. > See the logfile using the debug-option: > > wrapper | 2007/12/19 10:49:49 | SERVICE_CONTROL_STOP > wrapper | 2007/12/19 10:49:49 | wrapperStopProcess(0) called. > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Received a > packet SERVICE_CONTROL_CODE : 1 > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: > ServiceControlCode from Wrapper with code 1 > wrapper | 2007/12/19 10:49:49 | Sending stop signal to JVM > wrapperp | 2007/12/19 10:49:49 | send a packet STOP : NULL > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Received a > packet STOP : > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Thread, > Wrapper-Connection, handling the shutdown process. > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: calling > listener.stop() > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Waiting for > WrapperListener.stop runner thread to complete. > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: > WrapperListener.stop runner thread started. > jvm 1 | 2007/12/19 10:49:49 | WrapperSimpleApp Debug: stop(0) > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: > WrapperListener.stop runner thread stopped. > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: returned from > listener.stop() -> 0 > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: shutdownJVM(0) > Thread:Wrapper-Connection > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Send a packet > STOPPED : 0 > wrapperp | 2007/12/19 10:49:49 | read a packet STOPPED : 0 > wrapper | 2007/12/19 10:49:49 | JVM signalled that it was stopped. > jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Closing socket. > wrapperp | 2007/12/19 10:49:49 | socket read no code (closed?). > wrapperp | 2007/12/19 10:49:49 | server listening on port 32001. > jvm 1 | 2007/12/19 10:49:50 | WrapperManager Debug: calling > System.exit(0) > > -->this is our shutdown hook now > > jvm 1 | 2007/12/19 10:49:50 | (Log INFO): Shutdown hook called > jvm 1 | 2007/12/19 10:49:50 | (Log INFO): Stop Server > jvm 1 | 2007/12/19 10:49:50 | (Log INFO): Wenn der Server eine > grosse Anzahl Daten sichern muss, kann dies eine Weile dauern... > jvm 1 | 2007/12/19 10:49:50 | (Log INFO): All cabinets closed. > jvm 1 | 2007/12/19 10:49:50 | (Log INFO): Stop services... > > -->this was the last message of our shutdown hook, but there shuld > come more than that... > > wrapper | 2007/12/19 10:49:50 | JVM process exited with a code of 0, > leaving the wrapper exit code set to 0. > wrapper | 2007/12/19 10:49:50 | JVM exited normally. > wrapper | 2007/12/19 10:49:50 | <-- Wrapper Stopped > > > > > It seems to me, that our Shutdown hook is interrupted by the exit of > the VM. Also the log is not always exactly the same, sometimes our > shutdown hook has no time to start running at all. > Is this exit of the VM caused by the wrapper? > Is this a bug? > I think the documentation on the website for integration method 1 is > wrong when you look at the behavior above. > > > > Thanks > Markus > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > ------------------------------------------------------------------------ > > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |