Fuse/A-MQ Generic JMS connection pool does not reconnect on failure

Solution Verified - Updated -

Issue

Fuse/A-MQ contains a generic JMS connection pool that can be used to define connections to message brokers other than ActiveMQ. It is commonly used in situations where a Camel route bridges heterogeneous message brokers. The classes that comprise the implementation are in the package org.apache.activemq.jms.pool. For example, in a Blueprint XML file, a connection factory for a IBM WebSphere MQ broker might be defined like this:

   <bean id="unpooledConnectionFactory" class="com.ibm.mq.jms.MQXAConnectionFactory">
        <property name="hostName" value="wmq-host" />
        <property name="port" value="1414" />
        <property name="queueManager" value="MY.QUEUE.MANAGER" />
        <property name="channel" value="SYSTEM.DEF.SVRCONN" />
        <property name="transportType" value="1" />
        <property name="shareConvAllowed" value="0" />
    </bean>

  <bean id="pooledConnectionFactory" class="org.apache.activemq.jms.pool.JcaPooledConnectionFactory" init-method="start" destroy-method="stop">
        <property name="connectionFactory" ref="unpooledConnectionFactory"/>
        <property name="transactionManager" ref="transactionManager"/>
        <property name="maxConnections" value="5"/>
        <property name="maximumActiveSessionPerConnection" value="20"/>
        <property name="name" value="Fuse.MQSeries_XA_RMI" />
    </bean>

However, this generic pool does not have any logic to detect a failure at the network transport layer. This means that if the message broker crashes or the network is disconnected, the pooled connection simply becomes stale, and will never be reconnected.

Environment

  • Red Hat JBoss Fuse
    • 6.1 Rollup 2 and earlier
  • Red Hat JBoss A-MQ
    • 6.1 Rollup 2 and earlier

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.