Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4630924

JPI(JVM) aborts without shutting down cleanly when browser is closed

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.3.1_01
    • hotspot
    • None
    • x86
    • windows_nt

      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.

            acorn Karen Kinnear (Inactive)
            cprasadsunw Ck Prasad (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: