[hornetq-commits] JBoss hornetq SVN: r9351 - trunk/src/main/org/hornetq/core/postoffice/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jun 22 11:25:49 EDT 2010


Author: jmesnil
Date: 2010-06-22 11:25:48 -0400 (Tue, 22 Jun 2010)
New Revision: 9351

Modified:
   trunk/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
Log:
page messages under a transaction

* when a message is paged under a transaction, commit the tx (if it was started here) before returning to effectively page the message

Modified: trunk/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java	2010-06-22 13:49:58 UTC (rev 9350)
+++ trunk/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java	2010-06-22 15:25:48 UTC (rev 9351)
@@ -613,12 +613,18 @@
       }
       else
       {
-         boolean depage = context.getTransaction().getProperty(TransactionPropertyIndexes.IS_DEPAGE) != null;
+         Transaction tx = context.getTransaction();
+         boolean depage = tx.getProperty(TransactionPropertyIndexes.IS_DEPAGE) != null;
 
          if (!depage && message.storeIsPaging())
          {
-            getPageOperation(context.getTransaction()).addMessageToPage(message);
-
+            
+            getPageOperation(tx).addMessageToPage(message);
+            if (startedTx)
+            {
+               tx.commit();
+            }
+            
             return;
          }
       }



More information about the hornetq-commits mailing list