[jboss-cvs] JBoss Messaging SVN: r1745 - branches/Branch_1_0/src/main/org/jboss/jms/server/endpoint

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Dec 9 13:55:55 EST 2006


Author: juha at jboss.org
Date: 2006-12-09 13:55:52 -0500 (Sat, 09 Dec 2006)
New Revision: 1745

Modified:
   branches/Branch_1_0/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
Log:
rewrite of patch JBMESSAGING-407

Modified: branches/Branch_1_0/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
===================================================================
--- branches/Branch_1_0/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java	2006-12-09 18:53:48 UTC (rev 1744)
+++ branches/Branch_1_0/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java	2006-12-09 18:55:52 UTC (rev 1745)
@@ -70,6 +70,8 @@
  * 
  * @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @author <a href="mailto:juha at jboss.com">Juha Lindfors</a>
+ *
  * @version <tt>$Revision$</tt>
  *
  * $Id$
@@ -450,21 +452,25 @@
    }
    
    /**
-    * Get array of XA transactions in prepared state-
+    * Get array of XA transactions in prepared state. <p>
+    *
     * This would be used by the transaction manager in recovery or by a tool to apply
-    * heuristic decisions to commit or rollback particular transactions
+    * heuristic decisions to commit or rollback particular transactions. <p>
+    *
+    * Notice that before returning the Xids this method attemps to recover existing
+    * prepared transactions by delivering any unhandled messages or acks.
     */
    public Xid[] getPreparedTransactions() throws JMSException
    {
       try
       {
-         List xids = tr.getPreparedTransactions();
+         List xids = tr.recoverPreparedTransactions();
          
          return (Xid[])xids.toArray(new Xid[xids.size()]);
       }
       catch (Throwable t)
       {
-         throw ExceptionUtil.handleJMSInvocation(t, this + " getPreparedTransactions");
+         throw ExceptionUtil.handleJMSInvocation(t, this + " recoverPreparedTransactions");
       }
    }
   




More information about the jboss-cvs-commits mailing list