[jboss-cvs] JBoss Messaging SVN: r1589 - branches/Branch_1_0_XARecovery/src/main/org/jboss/jms/tx

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Nov 20 06:22:06 EST 2006


Author: juha at jboss.org
Date: 2006-11-20 06:22:04 -0500 (Mon, 20 Nov 2006)
New Revision: 1589

Modified:
   branches/Branch_1_0_XARecovery/src/main/org/jboss/jms/tx/ResourceManager.java
Log:
Original patch with ResourceManager changes (JBMessaging-407) with comments. Suspect incorrect use of TxState.

Modified: branches/Branch_1_0_XARecovery/src/main/org/jboss/jms/tx/ResourceManager.java
===================================================================
--- branches/Branch_1_0_XARecovery/src/main/org/jboss/jms/tx/ResourceManager.java	2006-11-20 11:18:01 UTC (rev 1588)
+++ branches/Branch_1_0_XARecovery/src/main/org/jboss/jms/tx/ResourceManager.java	2006-11-20 11:22:04 UTC (rev 1589)
@@ -49,7 +49,8 @@
  * This is one instance of ResourceManager per JMS server. The ResourceManager instances are managed
  * by ResourceManagerFactory.
  * 
- * @author <a href="mailto:tim.fox at jboss.com>Tim Fox</a>
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:Konda.Madhu at uk.mizuho-sc.com">Madhu Konda</a>
  * 
  * Parts adapted from SpyXAResourceManager by:
  *
@@ -127,8 +128,6 @@
     * 
     * @param xid - The id of the transaction to add the message to
     * @param ackInfo Information describing the acknowledgement
-    * @param sessionState - the session the ack is in - we need this so on rollback we can tell each session
-    * to redeliver it's messages
     */
    public void addAck(Object xid, AckInfo ackInfo) throws JMSException
    {
@@ -447,6 +446,17 @@
          try
          {
             Xid[] txs = conn.getPreparedTransactions();
+
+            //populate with TxState --MK
+            for(int i = 0; i < txs.length;i++)
+            {
+               TxState tx = new TxState();
+
+               // TODO : [JPL] should set to prepared state?
+
+               transactions.put(txs[i], tx);
+            }
+
             return txs;
          }
          catch (JMSException e)




More information about the jboss-cvs-commits mailing list