Using automatic client reconnection in Java EE environments
The IBM® MQ resource adapter, which can be deployed into Java EE (Java Platform, Enterprise Edition) environments, and the WebSphere® Application Server IBM MQ messaging provider use the IBM MQ classes for JMS to communicate with IBM MQ queue managers. The IBM MQ resource adapter and the WebSphere Application Server IBM MQ messaging provider provide a number of mechanisms to allow activation specifications, WebSphere Application Server listener ports and applications running inside client containers to automatically reconnect to a queue manager. Enterprise JavaBeans (EJBs) and web-based applications need to implement their own reconnection logic.
The mechanism that the resource adapter provides is controlled by:
- The IBM MQ resource adapter property reconnectionRetryCount.
- The IBM MQ resource adapter property reconnectionRetryInterval.
- The activation specification property connectionNameList.
For more information on these properties, see Configuration for ResourceAdapter object properties.
The use of automatic client reconnection within a message-driven bean application's onMessage() method, or any other application that is running within the Java Platform, Enterprise Edition environment is not supported. The application needs to implement its own reconnection logic if the queue manager it was connecting to becomes unavailable. For more information, see Implementing reconnection logic in a Java EE application.