Where I work they use the AppletContext.showDocument(URL)
method when a user logs off our application, which is an applet, providing the desired logoff JSP. But they also have code that says if for some reason they are unable to get an AppletContext
to simply call the Applet.destroy()
method.
We are using a thin client architecture which means that we essentially have a bunch of dumb terminals connected to a server. I mention this because we will often have dozens if not 100's of instances of JVMs running - one for each applet.
Inside the destroy()
method they dispose of all resources they acquired and then get a reference to Runtime
and call runFinalization()
and gc()
- but it does not do a System.exit()
or equivalent.
Questions
- I understand that frees up resources and leaves you on the same web page but what does it do to the JVM that was running the applet?
- If I add a call to
System.exit()
at the end of thedestroy()
what will it do to the other JVMs that are running on the thin client server?