Use 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 support for automatic client reconnection.
The options available to provide automatic client reconnection in a Java EE environment are:- Activation specification
- WebSphere Application Server listener ports
- Enterprise JavaBeans and web-based applications
- Applications running inside client containers
Note: Automatic client reconnection with activation specifications using the functionality provided by IBM MQ classes for JMS is not supported. The IBM MQ resource adapter provides its own mechanism for reconnecting activation specifications if the queue manager that the activation specification was connecting to becomes unavailable.
This mechanism 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.
- Support for automatic client reconnection in Java EE environments
Within Java EE environments, such as WebSphere Application Server, the IBM MQ resource adapter and the WebSphere Application Server IBM MQ messaging provider provide support for automatic client reconnection. However, in some cases, restrictions apply to this support. - Activation specifications
For activation specifications, the CONNECTIONNAMELIST and CCDTURL properties are supported with restrictions and the CLIENTRECONNECTOPTIONS property is not supported. - WebSphere Application Server listener ports
Message-driven bean (MDB) applications that are installed in WebSphere Application Server can also use listener ports to process messages on an IBM MQ system. - Enterprise JavaBeans and web-based applications
Enterprise JavaBean (EJB) applications and applications that run within the web container, such as Servlets, use a JMS connection factory to create a connection to an IBM MQ queue manager. - Applications running inside client containers
Some Java EE environments, such as WebSphere Application Server, provide a client container that can be used to run Java SE applications. - Use CONNECTIONNAMELIST or CCDT in a connection pool
Some Java EE environments, for example, WebSphere Application Server, provide a JMS connection pool. container that can be used to run Java SE applications. - Implement reconnection logic in a Java EE application
Enterprise JavaBeans and web-based applications that want to automatically reconnect if a queue manager fails, need to implement their own reconnection logic.
Parent topic: Use automatic client reconnection in Java SE and Java EE environments