Ben,
When you kill the JVM with the task manager, it is killed immediately.
If you shutdown normally then the Wrapper and your application
will have a chance to run any registered shutdown hooks. My guess
is that one of those is the cause of what you are seeing.
Shutdown hooks are launched by the JVM, not the Wrapper so I am
not able to give you info to debug them.
One idea is to run in a console, press CTRL-C and then immediately
press CTRL-BREAK to cause a thread dump and see what is running.
That might take a few attempts to see what you want to see.
If you are using the WrapperStartStopApp integration method then
another difference would be the execution of the registered stop
method.
Cheers,
Leif
Ben O'Keeffe wrote:
>
> Hi,
>
>
>
> I have inherited a java application that is deployed on a Windows 2003
> server as a service using Java Service Wrapper, and am having some
> problems that occur when the service is stopped halfway through a
> database transaction.
>
>
>
> If I stop the application by terminating the JVM directly (through
> Windows Task Manager), everything works fine and the database
> transaction is rolled back. If I stop the Windows service halfway
> through the process, the transaction is not rolled back and partial
> updates are committed to the database.
>
>
>
> Is there any way I can find out what the Wrapper is doing when
> shutdown nicely, and how this differs to the more brutal termination
> of the JVM?
>
>
>
> Thanks,
>
> Ben
>
|