JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Administration Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of GlassFish Server Administration

Default Settings and Locations

Configuration Tasks

Administration Tools

Instructions for Administering GlassFish Server

Part I Runtime Administration

2.  General Administration

3.  Administering Domains

4.  Administering the Virtual Machine for the Java Platform

5.  Administering Thread Pools

6.  Administering Web Applications

7.  Administering the Logging Service

8.  Administering the Monitoring Service

9.  Writing and Running JavaScript Clients to Monitor GlassFish Server

10.  Administering Life Cycle Modules

About Life Cycle Modules

Configuring Life Cycle Modules

To Create a Life Cycle Module

To List Life Cycle Modules

To Update a Life Cycle Module

To Delete a Life Cycle Module

11.  Extending and Updating GlassFish Server

Part II Resources and Services Administration

12.  Administering Database Connectivity

13.  Administering EIS Connectivity

14.  Administering Internet Connectivity

15.  Administering the Object Request Broker (ORB)

16.  Administering the JavaMail Service

17.  Administering the Java Message Service (JMS)

18.  Administering the Java Naming and Directory Interface (JNDI) Service

19.  Administering Transactions

Part III Appendixes

A.  Subcommands for the asadmin Utility

Index

Configuring Life Cycle Modules

The following topics are addressed here:

To Create a Life Cycle Module

Use the create-lifecycle-module subcommand in remote mode to create a life cycle module.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Create a new life cycle modules by using the create-lifecycle-module(1) subcommand.

    Information about options and properties for the subcommand are included in this help page.

  3. Restart the server for your changes to take effect.

    See To Restart a Domain.

Example 10-1 Creating a Life Cycle Module

This example creates the customSetup life cycle module :

asadmin> create-lifecycle-module --classname "com.acme.CustomSetup" 
--classpath "/export/customSetup" --loadorder 1 --failurefatal=true 
--description "this is a sample customSetup" --property rmi="Server\=acme1\:7070":timeout=30 customSetup
Command create-lifecycle-module executed successfully

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-lifecycle-module at the command line.

To List Life Cycle Modules

Use the list-lifecycle-modules subcommand in remote mode to list the existing life cycle modules.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List life cycle modules by using the list-lifecycle-modules(1) subcommand.

Example 10-2 Listing Life Cycle Modules

This example lists the existing life cycle modules.

asadmin> list-lifecycle-modules
WSTCPConnectorLCModule
Command list-lifecycle-modules executed successfully

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-lifecycle-modules at the command line.

To Update a Life Cycle Module

Use the set subcommand to update an existing life cycle module.

  1. List the properties that can be updated for a life cycle module by using the get(1) subcommand.

    For example (single mode):

    asadmin get "*" | grep sampleLCM
    applications.application.sampleLCMmodule.availability-enabled=false
    applications.application.sampleLCMmodule.directory-deployed=false
    applications.application.sampleLCMmodule.enabled=true
    applications.application.sampleLCMmodule.name=sampleLCMmodule
    applications.application.sampleLCMmodule.object-type=user
    applications.application.sampleLCMmodule.property.class-name=example.lc.SampleModule
    applications.application.sampleLCMmodule.property.classpath=/build/lcm.jar
    applications.application.sampleLCMmodule.property.is-failure-fatal=false
    applications.application.sampleLCMmodule.property.isLifecycle=true
  2. Update a life cycle module by using the set(1) subcommand.
  3. Restart the server for your changes to take effect.

    See To Restart a Domain.

Example 10-3 Updating a Life Cycle Module

This example updates the classpath property.

sadmin> set applications.application.sampleLCMmodule.
property.classpath=/build/lcm_new.jarapplications.application.
sampleLCMmodule.property.classpath=/build/lcm_new.jar
Command set executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help set at the command line.

To Delete a Life Cycle Module

Use the delete-lifecycle-module subcommand in remote mode to delete a life cycle module.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List the current life cycle modules by using the list-lifecycle-modules(1) subcommand.
  3. Delete a life cycle module by using the delete-lifecycle-module(1) subcommand.

Example 10-4 Deleting a Life Cycle Module

This example deletes the customSetup life cycle module.

asadmin> delete-lifecycle-module customSetup
Command delete-lifecycle-module executed successfully

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help delete-lifecycle-module at the command line.