Sun GlassFish Message Queue 4.4 Administration Guide

Starting and Stopping JMS Bridges

JMS bridges can be started automatically when the broker hosting the bridge starts, or manually using the imqbridgemgr utility. Similarly, JMS bridges are stopped automatically when the broker hosting the bridge is shut down, or manually using the imqbridgemgr utility.

When a JMS bridge is started, the JMS bridge manager performs these tasks:

  1. Parse and validate the bridge's XML configuration file.

  2. Initialize all links and DMQs that have their enabled attribute set to true.

  3. If any enabled links have their transacted attribute set to true:

    1. Initialize the built-in XA transaction coordinator.

    2. Register resource managers (RMs) for all potential XA connection factories.

    3. Perform XA recovery for available RMs.

  4. Create connection pools and shared connections as needed.

  5. Ensure that all DMQs are ready.

  6. Start all enabled links.

When a JMS bridge is stopped, the JMS bridge manager performs these tasks:

  1. Stop all started and paused links.

  2. Wait until all pooled connections are returned to their respective pools and until all references to shared connections are returned.

  3. Close all connection pools and shared connections. This effectively causes all physical connections to JMS providers to close.

ProcedureTo Configure a JMS Bridge to Start at Broker Startup

Follow these steps to configure a JMS bridge so that it starts automatically when the broker hosting it is started.

  1. Confirm that the bridge service manager is enabled.

    See To Enable the Bridge Service Manager for instructions.

  2. Add the name of the bridge to the imq.bridge.activelist broker property.

  3. Confirm that the imq.bridge.bridgeName.autostart broker property is set to true.

ProcedureTo Start a JMS Bridge Manually

  1. Enter the imqbridgemgr start bridge command, specifying the bridge name and the broker.

    For example, to start the bridge mq2external hosted by the broker running on myhost:8886, enter this command:


    imqbridgemgr start bridge -bn mq2external -b myhost:8886

ProcedureTo Stop a JMS Bridge Manually

  1. Enter the imqbridgemgr stop bridge command, specifying the bridge name and the broker.

    For example, to stop the bridge mq2external hosted by the broker running on myhost:8886, enter this command:


    imqbridgemgr stop bridge -bn mq2external -b myhost:8886