Sun GlassFish Enterprise Server v3 Prelude Application Deployment Guide

Dynamic Reloading

If dynamic reloading is enabled (it is by default), you do not have to redeploy a module when you change its code or deployment descriptors. Simply copy the changed class files or descriptors into the deployment directory for the module. Then update the timestamp of a file named .reload as described in To Reload Code or Deployment Descriptor Changes. The server checks for changes periodically and redeploys the module, automatically and dynamically, with the changes. Deployment directories are as follows:

domain-dir/applications/module-name

Note –

Deployment directories may change between Enterprise Server releases.


Dynamic reloading 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. JSP file changes don't need to be dynamically reloaded. Modified JSP files are automatically recompiled and reloaded when they are accessed.

ProcedureTo Enable Dynamic Reloading in the Administration Console

  1. Select the Application Server component.

  2. Select the Advanced tab.

  3. Select the Applications Configuration 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 modules are checked for code changes and dynamically reloaded. The default is 2.

See Also

For details, click the Help button in the Administration Console.

ProcedureTo Reload Code or Deployment Descriptor Changes

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

    domain-dir/applications/module-name/.reload

    Note –

    Deployment directories may change between Enterprise Server releases.


  2. Explicitly update the .reload file’s timestamp (touch .reload in UNIX) each time you make changes.