Author: clebert.suconic(a)jboss.com
Date: 2012-02-09 21:11:36 -0500 (Thu, 09 Feb 2012)
New Revision: 12106
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
HORNETQ-847 - fixing
org.hornetq.tests.integration.jms.server.management.TopicControlTest.testListXXXSubscriptionsAsJSON
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
---
branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-02-09
22:18:43 UTC (rev 12105)
+++
branches/Branch_2_2_AS7/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-02-10
02:11:36 UTC (rev 12106)
@@ -1683,7 +1683,7 @@
Filter filter = FilterImpl.createFilter(filterString);
- long txID = -1;
+ long txID = storageManager.generateUniqueID();;
long queueID = storageManager.generateUniqueID();
PageSubscription pageSubscription;
@@ -1711,21 +1711,20 @@
if (durable)
{
- txID = storageManager.generateUniqueID();
storageManager.addQueueBinding(txID, binding);
}
try
{
postOffice.addBinding(binding);
- if (txID != -1)
+ if (durable)
{
storageManager.commitBindings(txID);
}
}
catch (Exception e)
{
- if (txID != -1)
+ if (durable)
{
storageManager.rollbackBindings(txID);
}
Show replies by date