Top
Interstage Studio J Business Kit User's Guide
FUJITSU Software

2.5 How JBK Plugin Works to Destroy Applets

This section describes the processing at the termination of an applet executed with JBK Plugin.

An applet executed on a browser terminates on the following occasions:

At the termination of an applet, the stop() method and destroy() method of the applet class are invoked.

When closing the browser window, JBK Plugin terminates an applet on the window, and then closes the browser window. This ensures that the processing for terminating the applet is invoked before the browser terminates.

If the applet termination processing takes time, JBK Plugin displays a message box as shown below when the browser window is closed:

Figure 2.3 Message box indicating that the applet termination processing is in progress

The message box indicates that the termination processing for the applet shown in the message box is in progress. When the applet termination processing is completed, the message box automatically disappears.

[End the applet now] button

Clicking the [End the applet now] button shown above halts the sequence for terminating the applet and forcibly terminates the applet. Forced termination does not assure successful completion of the stop() method and destroy() method.

Use the [End the applet now] button only to quit an applet when an error makes it impossible to quit it any other way.

How to disable the message box

You can disable the message box shown above so that the browser window can be closed immediately. To do so, modify the following line in jbkplugin.properties:

jbk.plugin.sw.applet.delay=<wait-for-termination-of-applet>

For <wait-for-termination-of-applet>, specify either of the following:

true

To allow the browser window to wait until the applet termination sequence has been completed.

false

To force the browser window to close immediately without waiting for termination of the applet.

The jbk.plugin.sw.applet.delay default value is true. Setting it to "false" does not assure successful completion of the stop() method and destroy() method for the applet.