Author: clebert.suconic(a)jboss.com
Date: 2011-12-23 10:40:21 -0500 (Fri, 23 Dec 2011)
New Revision: 11941
Modified:
branches/one-offs/HornetQ_2_2_5_EAP_GA_JBPAPP_7710/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java
Log:
Backporting JBPAPP-7817
Modified:
branches/one-offs/HornetQ_2_2_5_EAP_GA_JBPAPP_7710/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java
===================================================================
---
branches/one-offs/HornetQ_2_2_5_EAP_GA_JBPAPP_7710/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java 2011-12-23
15:39:33 UTC (rev 11940)
+++
branches/one-offs/HornetQ_2_2_5_EAP_GA_JBPAPP_7710/src/main/org/hornetq/core/paging/cursor/impl/PageSubscriptionCounterImpl.java 2011-12-23
15:40:21 UTC (rev 11941)
@@ -181,17 +181,24 @@
synchronized (this)
{
long tx = storage.generateUniqueID();
+
+ boolean txUsed = false;
for (Long record : incrementRecords)
{
+ txUsed = true;
storage.deleteIncrementRecord(tx, record.longValue());
}
if (recordID >= 0)
{
+ txUsed = true;
storage.deletePageCounter(tx, this.recordID);
}
- storage.commit(tx);
+ if (txUsed)
+ {
+ storage.commit(tx);
+ }
}
}
Show replies by date