|
From: Leif M. <le...@ta...> - 2005-04-12 14:04:26
|
Nicholas,
As Nick pointed out. The shutdown hooks are only run if a JVM is
shutdown cleanly.
Killing the process from the task manager immediately kills the
process. It is like running
kill -9 on UNIX.
In this case you should get a message in the log from the Wrapper
about the Wrapper
having shutdown unexpectedly. It will then be restarted within a few
seconds.
To figure out why your original application is shutting down, try
setting wrapper.debug=true to try to capture such an event with debug
output enabled. I might be able to give you some clues as to what is
happing if I could see that output.
Cheers,
Leif
nic...@uk... wrote:
>I would have thought that this is expected behaviour.
>Killing a process from the Task Manager is akin to a kill -9 on unix. Its
>not a graceful shutdown by any means. So I wouldnt expect your shutdown
>hook to get called.
>
>In this situation, I would expect the wrapper to restart it though....
>
>-Nick
>
>
>
>
>
>
>
>Internet
>NCC...@We...@lists.sourceforge.net - 07/04/2005 15:23
>
>
>Please respond to wra...@li...
>
>Sent by: wra...@li...
>
>
>
>To: wrapper-user
>
>cc:
>
>
>Subject: [Wrapper-user] Shutdown hook not triggered when jvm is
> unexpectedly killed
>
>
>Hello,
>
>
>
>I am using integration method 1 to wrap an in house developed java
>server app with the Java Service Wrapper 3.1.2. On both my development
>server Win 2k3 and my PC Win XP SP2, when I kill (via Task Manager) the
>JVM that is monitored by the Wrapper, my shutdown hook does NOT get
>executed. Not that I like to go around killing java processes, but this
>app's JVM has been disappearing on its own on our production servers,
>and I was hoping to employ both the Wrapper and some extra logging in my
>shutdown hook thread to help figure out why. My hook DOES get executed
>when I shut the wrapper down normally and when I kill the wrapper
>process and let the JVM die from lack of wrapper pings. My question to
>anyone kind enough to read this is: is this normal expected behavior and
>if so why?
>
>
>
>Thanks in advance,
>
>
>
>P.S.
>
>This product is very cool; sure beats what we have used in the past to
>run java apps as Windows Services.
>
>
|