Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide

Ensuring Automatic Restart of the Management Agent

In a production deployment, configure the management agent to restart automatically. Doing so ensures the availability of the management agent in case the ma process fails or the operating system reboots.

On Windows platforms, once you have started the management agent as a service, use the Windows administrative tools to set the service Startup type to “Automatic,” and then set desired Recovery options.

On Solaris and Linux platforms, use the procedures in this section, to configure automatic restart of the management agent. These procedures ensure the management agent starts only when the system enters:

Entering other runlevels stops the management agent.

ProcedureTo Configure Automatic Restart with Java Enterprise System on Solaris or Linux

Before You Begin

This section assumes you have a basic understanding of operating system initialization and runlevels. For information on these topics, see your operating system documentation.

  1. Ensure that your system has a default runlevel of 3 or 5.

    To check the default runlevel of your system, inspect the file /etc/inittab , and look for a line near the top similar to this:

    id:5:initdefault:

    This example shows a default runlevel of 5.

  2. Create soft links to the file /etc/init.d/ma-initd, as described in Creating soft links.

  3. Reboot the machine.

Next Steps

To deactivate automatic start and stop of the agent, remove the links or change the letters K and S in the link names to lowercase.

ProcedureTo Configure Automatic Restart with Standalone Application Server on Solaris or Linux

  1. In a shell, change your current directory to HADB_install_dir /bin.

  2. Edit the shell script ma-initd.

    Make sure the default values of HADB_ROOT and HADB_MA_CFG in the script to reflect your installation:

  3. Copy ma-initd to the directory /etc/init.d

  4. Create soft links to the file /etc/init.d/ma-initd, as described in Creating soft links.

Next Steps

To deactivate automatic start and stop of the agent, remove the links or change the letters K and S in the link names to lowercase.

Creating soft links

On Solaris, create the following softlinks:

/etc/rc0.d/K20ma-initd
/etc/rc1.d/K20ma-initd
/etc/rc2.d/K20ma-initd
/etc/rc3.d/S99ma-initd
/etc/rc5.d/K20ma-initd (only for Sun 4m and 4u architecture)
/etc/rc6.d/K20ma-initd
/etc/rcS.d/K20ma-initd

On Linux, create the following softlinks:

/etc/rc0.d/K20ma-initd
/etc/rc1.d/K20ma-initd
/etc/rc3.d/S99ma-initd
/etc/rc5.d/S99ma-initd
/etc/rc6.d/K20ma-initd