bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Administration Console Online Help

Startup and Shutdown Classes

You can configure a WebLogic Server to run Java programs when it starts or shuts down gracefully. A startup class is automatically loaded and executed when a WebLogic Server is started or restarted. A shutdown class is automatically loaded and executed when a WebLogic Server is shut down either from the Administration Console or using the weblogic.admin shutdown command.

To use startup or shutdown classes, you must configure and assign them to servers or clusters.

For more information, see "Configuring Startup and Shutdown Classes" in the Administration Guide.

Tasks

Create a Configuration for a Startup or Shutdown Class

1. In the left pane, click the Startup & Shutdown node.

   The Administration Console displays the Startup & Shutdown page. This page includes a list of the configurations that already exist in this domain. If any existing configuration is similar to the one that you want to create, consider cloning it. For more information, refer to Clone a Configuration of a Startup or Shutdown Class.

2. On the Startup & Shutdown page, do one of the following:

   - To configure a startup class, click the Configure a New Startup Class text link.

   - To configure a shutdown class, click the Configure a New Shutdown Class text link.

   The Administration Console displays the set of tabs that you use to configure a startup or shutdown class.

3. Enter values in the Name, Class Name, Deployment Order, and Arguments attribute fields.

   In the Arguments field, separate multiple arguments with a comma. For example,
   firstname=MyFirst,lastname=MyLast

   Do not use spaces to separate the arguments; use only a comma.

4. Select any other configuration options.

5. Click Create.

   The Administration Console adds your new configuration under the Startup & Shutdown node in the left pane.

6. If you want to add a note that describes your configuration, click the Notes tab. Enter a note and click Apply.

When you are ready to make the configured class available to one or more servers, refer to Assign a Startup or Shutdown Configuration to Servers or Clusters.

Clone a Configuration of a Startup or Shutdown Class

1. In the left pane, click the Startup & Shutdown node.

   The Administration Console displays the Startup & Shutdown page. This page displays a list of the configurations that already exist in this domain.

2. On the Startup & Shutdown page, click the Clone icon in the row of the class you want to clone.

   The Administration Console displays the set of tabs that you use to configure a startup or shutdown class.

3. Enter a value in the Name field.

4. You can modify any of the values in the Class Name, Deployment Order, and Arguments attribute fields. You can also change the setting for the Abort Startup on Failure checkbox.

5. Click Clone to create a configuration with the name that you specified in the Name field.

   The Administration Console adds your new configuration under the Startup & Shutdown node in the left pane.

6. If you want to add or modify a note that describes your configuration, click the Notes tab. Enter a note and click Apply.

When you are ready to make the new configuration class available to one or more servers, refer to Assign a Startup or Shutdown Configuration to Servers or Clusters.

Assign a Startup or Shutdown Configuration to Servers or Clusters

1. In the left pane, expand the Startup & Shutdown node and click a configuration.

   The Administration Console displays the configuration in the right pane.

2. Click the Targets tab.

3. To assign the configuration to all servers within a cluster, do the following:

   1. Click the Clusters tab.

   2. Select one or more clusters in the Available column.

   3. Click the mover control to move the clusters to the Chosen column.

   4. Click Apply.

4. To assign the configuration to specific servers, do the following:

   1. Click the Servers tab.

   2. Select one or more servers in the Available column.

   3. Click the mover control to move the servers to the Chosen column.

   4. Click Apply.

      Note that clicking Apply sets the value of the Server—>myServer—>Deployments—>Startup/Shutdown list for each server that you placed in the Chosen list.

Modify an Existing Startup or Shutdown Configuration

1. In the left pane, expand the Startup & Shutdown node and click a configuration.

   The Administration Console displays the configuration in the right pane.

2. On the Configuration tab, modify any of the values in the Class Name, Deployment Order, and Arguments attribute fields. You can also change the settings for the Failure is fatal or Run before application deployments checkboxes.

3. Click Apply to save any changes.

4. On the Notes tab, modify or add a note.

5. Click Apply to save any changes.

6. On the Targets tab reassign the configuration to different clusters or servers. To remove the configuration from a target, select the target in the Chosen column and click the mover control to move it to the Available column.

7. Click Apply to save any changes.

Delete a Startup or Shutdown Class Configuration

1. In the left pane, click the Startup & Shutdown node.

   The Administration Console displays the Startup & Shutdown page. This page displays a list of the configurations that already exist in this domain.

2. On the Startup & Shutdown page, click the Delete icon in the row of a configuration.

   A dialog displays in the right pane asking you to confirm your deletion request.

3. Click Yes to delete the configuration.