Chapter 8. JBoss Messaging XA Recovery Configuration

This section describes how to configure JBoss Transactions in JBoss AS 4.2.0 to handle XA recovery for JBoss Messaging resources.

JBoss Transactions recovery manager can easily be configured to continually poll for and recover JBoss Messaging XA resources, this provides an extremely high level of durability of transactions.

Enabling JBoss Transactions Recovery Manager to recover JBoss Messaging resources is a very simple matter and involves adding a line to the file ${JBOSS_CONFIG}/conf/jbossjta-properties.xml

Here's an example section of a jbossjta-properties.xml file with the line added (note the whole file is not shown)

     <properties depends="arjuna" name="jta">
        Support subtransactions in the JTA layer?
        Default is NO.
        <property name="com.arjuna.ats.jta.supportSubtransactions" value="NO"/>
        <property name="com.arjuna.ats.jta.jtaTMImplementation"
        <property name="com.arjuna.ats.jta.jtaUTImplementation"
           *** Add this line to enable recovery for JMS resources using DefaultJMSProvider ***
        <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1"


In the above example the recovery manager will attempt to recover JMS resources using the JMSProviderLoader "DefaultJMSProvider"

DefaultJMSProvider is the default JMS provider loader that ships with JBoss AS and is defined in jms-ds.xml (or hajndi-jms-ds.xml in a clustered configuration). If you want to recovery using a different JMS provider loader - e.g. one corresponding to a remote JMS provider then just add another line and instead of DefaultJMSProvider specify the name of the remote JMS provider as specified in it's MBean configuration.

For each line you add, the name must be unique, so you could specify "com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1", "com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING2, ..." etc.

In actual fact, the recovery also should work with any JMS provider that implements recoverable XAResources (i.e. it properly implements XAResource.recover()) , not just JBoss Messaging

Please note that to configure the recovery manager to recovery transactions from any node of the cluster it will be necessary to specify a line in the configuration for every node of the cluster