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.

The following restrictions apply to EJBs and web-based applications:

  • CONNECTIONNAMELIST and CCDTURL are supported with restrictions
  • CLIENTRECONNECTOPTIONS is not supported


CONNECTIONNAMELIST property

If the Java EE environment provides a connection pool for JMS connections, see Use CONNECTIONNAMELIST or CCDT in a connection pool for information on how this affects the behavior of the CONNECTIONNAMELIST property.

If the Java EE environment does not provide a JMS connection pool. the application uses the CONNECTIONNAMELIST property in the same way as Java SE applications.

If the applications 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 applications are being used with stand-alone queue managers, the CONNECTIONNAMELIST property must contain a single entry, to ensure that the application always reconnects to the same queue manager, running on the same system, following a failure.


CCDTURL property

If the Java EE environment provides a connection pool for JMS connections, see Use CONNECTIONNAMELIST or CCDT in a connection pool for information on how this affects the behavior of the CCDTURL property.

If the Java EE environment does not provide a JMS connection pool. the application uses the CCDTURL property in the same way as Java SE applications.

If the applications 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 applications 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.


CLIENTRECONNECTOPTIONS property

We must set the CLIENTRECONNECTOPTIONS property to DISABLED for all JMS connection factories used by EJBs, or applications, that run in the web container.

Applications that require to automatically reconnect to a new queue manager, if the queue manager they are using fails, need to implement their own reconnection logic. See Implement reconnection logic in a Java EE application for more information.

Parent topic: Use automatic client reconnection in Java EE environments