You can deploy a lifecycle module using the following tools:
In the Admin Console, open the Applications component and go to the Lifecycle Modules page. For details, click the Help button in the Admin Console.
Use the asadmin create-lifecycle-module command. For details, see the Sun GlassFish Enterprise Server 2.1 Reference Manual.
You do not need to specify a classpath for the lifecycle module if you place it in the domain-dir/lib or domain-dir/lib/classes directory for the Domain Administration Server. Do not place it in the lib directory for a particular instance, or it will be deleted when that instance synchronizes with the Domain Administration Server.
After you deploy a lifecycle module, you must restart the server to activate it. The server instantiates it and registers it as a lifecycle event listener at server initialization.
If the is-failure-fatal setting is set to true (the default is false), lifecycle module failure prevents server initialization or startup, but not shutdown or termination.