Activation specifications
For activation specifications, the CONNECTIONNAMELIST and CCDTURL properties are supported with restrictions and the CLIENTRECONNECTOPTIONS property is not supported.
Message-driven bean (MDB) applications that are installed in a Java EE environment, such as WebSphere Application Server, can use activation specifications to process messages on a IBM MQ system.
Activation specifications are used to detect messages arriving on an IBM MQ system, and then deliver them to MDBs for processing. This section deals with how activation specification monitors the IBM MQ system.
MDBs can also make additional connections to IBM MQ systems from inside their onMessage() method.
Details about how these connections can use automatic client reconnection can be found in Enterprise JavaBeans and web-based applications.
CONNECTIONNAMELIST property
When starting, the activation specification attempts to connect to the queue manager using the:- One specified in the QMANAGER property
- Channel mentioned in the CHANNEL property
- Host name and port information from the first entry in the CONNECTIONNAMELIST
If the activation specification is unable to connect to the queue manager using the first entry in the list, the activation specification moves on to the second entry, and so on, until either a connection to the queue manager has been made, or the end of the list has been reached.
If the activation specification is unable to connect to the specified queue manager, using any of the entries in the CONNECTIONNAMELIST, the activation specification stops and must be restarted.
Once the activation specification is running, the activation specification gets messages from the IBM MQ system, and delivers the messages to an MDB for processing.
If the queue manager fails while a message is being processed, the Java EE environment detects the failure and attempts to reconnect the activation specification.
The activation specification uses the information in the CONNECTIONNAMELIST property as before, when the activation specification performs the reconnection attempts.
If the activation specification tries all of the entries in the CONNECTIONNAMELIST and is still unable to connect to the queue manager, then the activation specification waits for the period of time specified by the IBM MQ resource adapter property reconnectionRetryInterval before trying again.
The IBM MQ resource adapter property reconnectionRetryCount defines the number of consecutive reconnection attempts that are be made before an activation specification is stopped,, and requires a manual restart
Once the activation specification has reconnected to an IBM MQ system, the Java EE environment performs any transactional cleanup that is required, and resumes delivering messages to MDBs for processing.
In order for the transactional cleanup to work correctly, the Java EE environment must be able to access the logs for the queue manager that failed.
If the activation specifications are being used with transactional MDBs that participate in XA transactions, and are connecting to a multi-instance queue manager, the CONNECTIONNAMELIST must contain an entry for both the active and standby queue manager instance.
This means that the Java EE environment can access the queue manager logs if the environment needs to perform transaction recovery, regardless of which queue manager the environment reconnects to following a failure.
If the transactional MDBs are being used with stand-alone queue managers, the CONNECTIONNAMELIST property must contain a single entry, to ensure that the activation specification always reconnects to the same queue manager running on the same system following a failure.
CCDTURL property
When starting, the activation specification tries to connect to the queue manager specified in the QMANAGER property using the first entry in the client channel definition table (CCDT).
If the activation specification is unable to connect to the queue manager using the first entry in the table, the activation specification moves on to the second entry, and so on, until either a connection to the queue manager has been made, or the end of the table has been reached.
If the activation specification is unable to connect to the specified queue manager, using any of the entries in the CCDT, the activation specification stops and must be restarted.
Once the activation specification is running, the activation specification gets messages from the IBM MQ system, and delivers the messages to an MDB for processing.
If the queue manager fails while a message is being processed, the Java EE environment detects the failure and attempts to reconnect the activation specification.
The activation specification uses the information in the CCDT property as before, when the activation specification performs the reconnection attempts.
If the activation specification tries all of the entries in the CCDT and is still unable to connect to the queue manager, the activation specification waits for the period of time specified by the IBM MQ resource adapter property reconnectionRetryInterval before trying again.
The IBM MQ resource adapter property reconnectionRetryCount defines the number of consecutive reconnection attempts that are be made before an activation specification is stopped,, and requires a manual restart
Once the activation specification has reconnected to an IBM MQ system, the Java EE environment performs any transactional cleanup that is required, and resumes delivering messages to MDBs for processing.
In order for the transactional cleanup to work correctly, the Java EE environment must be able to access the logs for the queue manager that failed.
If the activation specifications are being used with transactional MDBs that participate in XA transactions, and are connecting to a multi-instance queue manager, the CCDT must contain an entry for both the active and standby queue manager instance.
This means that the Java EE environment can access the queue manager logs if the environment needs to perform transaction recovery, regardless of which queue manager the environment reconnects to following a failure.
If the transactional MDBs are being used with stand-alone queue managers, the CCDT must contain a single entry, to ensure that the activation specification always reconnects to the same queue manager running on the same system following a failure.
Ensure that we have set the default value of PREFERRED for the AFFINITY property on the CCDTs, used with activation specifications, so that connections are made to the same active queue manager.
CLIENTRECONNECTOPTIONS property
Activation specifications provide their own reconnection functionality. The provided functionality allows the specifications to automatically reconnect to an IBM MQ system if the queue manager they were connected to fails.
Because of this, the automatic client reconnection functionality provided by the IBM MQ classes for JMS is not supported.
We must set the CLIENTRECONNECTOPTIONS property to DISABLED for all activation specifications that are used in the Java EE.
Parent topic: Use automatic client reconnection in Java EE environments