Lengthy destroy/stop event causes ThreadDeath in JRE6u10
I have an signed applet compiled against JDK1.5. It connects to a database (SQL Server) and when the user leaves the page it needs to save the data automatically. Because the amount of data is rather large the operation takes a while. I've placed the save code in the applet's "destroy" method (although i've tried the "stop" event too). This worked fine until I upgraded to JDK1.6 Update 10. I now get a "ThreadDeath" exception and my save code never continues running. I've disabled all the save code and just places a 10second thread delay to simulate a lengthy save operation and I still get a "ThreadDeath" exception. If i turn off the "Enable the next generation Java plug-in" in the Java Control Panel, my applet works perfect. Unfortunately this is not really an option as my applet will be used by a number of people over the web and it would not be nice to first ask them to mess around in the Java Control Panel to get the applet to work. Does anybody have any suggestions? It seems that the new plugin just zaps the lengthy code, not allowing the destroy or stop events to continue. I can understand if the code took a couple of minutes to run, but not a few seconds?