Oracle GlassFish Server 3.0.1 Application Deployment Guide

ProcedureTo Reload Changes to Applications or Modules Dynamically

Dynamic reloading enables you to change the code or deployment descriptors of an application or module without needing to perform an explicit redeployment. Instead, you can copy the changed class files or descriptors into the deployment directory for the application or module. The server checks for changes periodically and automatically redeploys the changes if the timestamp of the .reload file in the root directory for the application or module has changed.

Dynamic reloading is enabled by default, and is available only on the default server instance.

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

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

    Note –

    Deployment directories might change between GlassFish Server releases.


  2. Update the timestamp of the .reload file to load the changes.

    In UNIX: touch .reload

See Also

Another method for updating an application or module is to use the sun-appserv-update task with the GlassFish Server Ant tasks. See Chapter 3, Using Ant with GlassFish Server, in Oracle GlassFish Server 3.0.1 Application Development Guide.