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:
Parse and validate the bridge's XML configuration file.
Initialize all links and DMQs that have their enabled attribute set to true.
If any enabled links have their transacted attribute set to true:
Initialize the built-in XA transaction coordinator.
Register resource managers (RMs) for all potential XA connection factories.
Perform XA recovery for available RMs.
Create connection pools and shared connections as needed.
Ensure that all DMQs are ready.
Start all enabled links.
When a JMS bridge is stopped, the JMS bridge manager performs these tasks:
Stop all started and paused links.
Wait until all pooled connections are returned to their respective pools and until all references to shared connections are returned.
Close all connection pools and shared connections. This effectively causes all physical connections to JMS providers to close.
Follow these steps to configure a JMS bridge so that it starts automatically when the broker hosting it is started.
Confirm that the bridge service manager is enabled.
See To Enable the Bridge Service Manager for instructions.
Add the name of the bridge to the imq.bridge.activelist broker property.
Confirm that the imq.bridge.bridgeName.autostart broker property is set to true.
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