Customer Problem Description:
-----------------------------
We are using the JRE 1.3.1_01 JPI for our applet.
We are only concerned with what happens in an applet since we want to
"clean up" in the situation where the user just closes the browser without gracefully terminating.
We want to send a user "logout" message back to our server via a servlet
request.
I've implemented a shutdown hook - and it works fine when I trigger a
System.exit().
However, when I close the browser window, I have the same problem we've
been having with the applet destroy() method - processing just gets
abruptly terminated. I don't even get to see the "start" message that my
shutdown hook thread prints - I DO see an "interrupt" message - and then
that's it!
The sample code is attached in the comments section.
It appears that when the browser is closed, JVM aborts without
shutting down cleanly. We would like to be able to run the
shutdown hooks completely in the case of browser close situation.
-----------------------------
We are using the JRE 1.3.1_01 JPI for our applet.
We are only concerned with what happens in an applet since we want to
"clean up" in the situation where the user just closes the browser without gracefully terminating.
We want to send a user "logout" message back to our server via a servlet
request.
I've implemented a shutdown hook - and it works fine when I trigger a
System.exit().
However, when I close the browser window, I have the same problem we've
been having with the applet destroy() method - processing just gets
abruptly terminated. I don't even get to see the "start" message that my
shutdown hook thread prints - I DO see an "interrupt" message - and then
that's it!
The sample code is attached in the comments section.
It appears that when the browser is closed, JVM aborts without
shutting down cleanly. We would like to be able to run the
shutdown hooks completely in the case of browser close situation.
- duplicates
-
JDK-4529808 JApplet destroy is destroyed
-
- Closed
-