Sun Java System Application Server Enterprise Edition 8.2 Developer's Guide

Dynamic Reloading

If dynamic reloading is enabled (it is by default), you do not have to redeploy an application or module when you change its code or deployment descriptors. All you have to do is copy the changed JSP or class files into the deployment directory for the application or module. The server checks for changes periodically and redeploys the application, automatically and dynamically, with the changes. This feature is available only on the default server instance.

This is useful in a development environment, because it allows code changes to be tested quickly. In a production environment, however, dynamic reloading might degrade performance. In addition, whenever a reload is done, the sessions at that transit time become invalid. The client must restart the session.

ProcedureTo enable dynamic reloading in the Administration Console

  1. Select the Stand-Alone Instances component.

  2. Select the instance named server in the table.

    This is the Admin Server.

  3. Select the Advanced tab.

  4. Check the Reload Enabled box to enable dynamic reloading.

  5. Enter a number of seconds in the Reload Poll Interval field.

    This sets the interval at which applications and modules are checked for code changes and dynamically reloaded. The default is 2.

See Also

For details, see the Sun Java System Application Server Enterprise Edition 8.2 Administration Guide.

ProcedureTo reload code or deployment descriptor changes

  1. Create an empty file named .reload at the root of the deployed application or module.

    For an application:

    domain-dir/applications/j2ee-apps/app-name/.reload

    For an individually deployed module:

    domain-dir/applications/j2ee-modules/module-name/.reload
  2. Explicitly update the .reload file’s timestamp (touch .reload in UNIX) each time you make changes.