2 Replies Latest reply on Jan 12, 2012 3:13 AM by Andy Taylor

    How do you configure recovery of JMS messages?

    Michael Musgrove Master

      I am testing recovery (on AS7 trunk). It works fine when I configure 2 xa-datasources but I'm having problems when I include a JMS message in the transaction. I am wondering if there are any special config steps to tell hornetq to register its XAResourceRecoveryHelper with JBossTS.


      This is what I did:


      Inject an XAConnection factory and the default queue:


      @Resource(mappedName = "java:/JmsXA")  private XAConnectionFactory connectionFactory

      @Resource(mappedName = "java:/queue/test") private Queue queue;


      I started a transaction, updated an XA datasource, created an XASession and used it to send a message inside the transaction. I then used byteman to halt the VM during phase 2 of the commit.


      When the AS restarts I see the datasource being recovered but not the JMS message. The TM reports:


      18:46:15,788 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016038: No XAResource to recover < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:-1d73ff2:4f0dc436:18, node_name=1, branch_uid=0:ffff7f000001:-1d73ff2:4f0dc436:1a, subordinatenodename=null, eis_name=java:/JmsXA >


      This message implies that hornetq has not registered an XARecoveryHelper with TM.