Oracle GlassFish Server 3.0.1 Application Deployment Guide

Lifecycle Module Deployment Guidelines

A lifecycle module, also called a lifecycle listener module, provides a means of running long or short Java-based tasks within the GlassFish Server environment, such as instantiation of singletons or RMI servers. Lifecycle modules are automatically initiated at server startup and are notified at various phases of the server life cycle. All lifecycle module interfaces are in the as-install/modules/glassfish-api.jar file.

For general information about lifecycle modules, see Chapter 13, Developing Lifecycle Listeners, in Oracle GlassFish Server 3.0.1 Application Development Guide.

You can deploy a lifecycle module using the create-lifecycle-module subcommand. Do not use asadmin deploy or related commands.

After you deploy a lifecycle module, you must restart the server. During server initialization, the server instantiates the module and registers it as a lifecycle event listener.

Note –

If the --failurefatal option of create-lifecycle-module is set to true (the default is false), lifecycle module failure prevents server initialization or startup, but not shutdown or termination.