Sun GlassFish Message Queue 4.4 Administration Guide

Automatic Broker Startup on the Solaris Platforms

The method for enabling automatic startup on the Solaris 10 platforms is different from that for Solaris 9. Both are described below.

Automatic Broker Startup on the Solaris 9 Platform

On Solaris 9 operating system, scripts that enable automatic startup are placed in the /etc/rc* directory tree during Message Queue installation. To enable the use of these scripts, you must edit the configuration file imqbrokerd.conf (located in IMQ_HOME/etc/ for installations from IPS packages and in /etc/imq/ for installations from SVR4 packages) as follows:

To disable automatic broker startup at system startup, edit the configuration file /etc/imq/imqbrokerd.conf and set the AUTOSTART property to NO.

Automatic Broker Startup on the Solaris 10 Platform

Rather than using an rc file to implement automatic broker startup when a computer reboots, the following procedure makes use of the Solaris 10 Service Management Facility (SMF).

For more information on using the Service Management Facility, please refer to Solaris 10 documentation.

ProcedureTo Implement Automatic Broker Startup on Solaris 10 OS

  1. Copy and change permissions on the mqbroker startup script.

    # cp /var/svc/manifest/application/sun/mq/mqbroker /lib/svc/method

    # chmod 555 /lib/svc/method/mqbroker

  2. Import the mqbroker service into the SMF repository.

    # svccfg import /var/svc/manifest/application/sun/mq/mqbroker.xml

  3. Verify that the import was successful by checking the state of the mqbroker service.

    # svcs mqbroker

    Output resembles the following:

    disabled 16:22:50 svc:/application/sun/mq/mqbroker:default

    The service is initially shown as disabled.

  4. Eanable the mqbroker service.

    # svcadm enable svc:/application/sun/mq/mqbroker:default

    Enabling the mqbroker service will start the imqbrokerd process. A reboot will subsequently restart the broker.

  5. Configure the mqbroker service to pass any desired arguments to the imqbrokerd command.

    The options/broker_args property is used to pass arguments toimqbrokerd. For example to add -loglevel DEBUGHIGH, do the following:

    # svccfg
    svc:> select svc:/application/sun/mq/mqbroker
    svc:/application/sun/mq/mqbroker> setprop options/broker_args="-loglevel DEBUGHIGH"
    svc:/application/sun/mq/mqbroker> exit

ProcedureTo Disable Automatic Broker Startup on Solaris 10 OS

  1. Disable the mqbroker service.

    # svcadm disable svc:/application/sun/mq/mqbroker:default

    A subsequent reboot will not restart the broker.