0 Replies Latest reply: Sep 9, 2011 1:05 PM by 880601 RSS

    How to make browser to wait till the destroy method in applet is completed

    880601
      Hi All,

      I have created a secure applet and its running on browser. In the destroy method i am processing something but browser do not give enough time to complete the process and it throws the following exception.

      java.lang.ThreadDeath
           at java.lang.Thread.stop(Unknown Source)
           at java.lang.ThreadGroup.stopOrSuspend(Unknown Source)
           at java.lang.ThreadGroup.stop(Unknown Source)
           at sun.awt.AppContext.dispose(Unknown Source)
           at sun.plugin2.applet.Plugin2Manager$AppContextDisposer.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
      java.lang.InterruptedException
           at java.lang.Object.wait(Native Method)
           at java.lang.Object.wait(Object.java:485)
           at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(Unknown Source)
           at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
           at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
      basic: Finished applet teardown

      Is there any way to make the browser to wait till the process in destroy method is completed?

      Any help will be highly appreciated.

      thanks