[hornetq-commits] JBoss hornetq SVN: r8536 - trunk/src/main/org/hornetq/core/management/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Dec 3 13:41:20 EST 2009
Author: clebert.suconic at jboss.com
Date: 2009-12-03 13:41:20 -0500 (Thu, 03 Dec 2009)
New Revision: 8536
Modified:
trunk/src/main/org/hornetq/core/management/impl/QueueControlImpl.java
Log:
Adding a few more waitOnCompletion calls on the QueueControl
Modified: trunk/src/main/org/hornetq/core/management/impl/QueueControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/impl/QueueControlImpl.java 2009-12-03 17:13:58 UTC (rev 8535)
+++ trunk/src/main/org/hornetq/core/management/impl/QueueControlImpl.java 2009-12-03 18:41:20 UTC (rev 8536)
@@ -280,7 +280,7 @@
int retValue = queue.deleteMatchingReferences(filter);
- // Waiting on IO otherwise the JMX operation would return before the operation completed
+ // Waiting on IO otherwise the operation would return before the operation completed
storageManager.waitOnOperations();
return retValue;
@@ -288,7 +288,12 @@
public boolean expireMessage(final long messageID) throws Exception
{
- return queue.expireReference(messageID);
+ boolean retValue =queue.expireReference(messageID);
+
+ // Waiting on IO otherwise the operation would return before the operation completed
+ storageManager.waitOnOperations();
+
+ return retValue;
}
public int expireMessages(final String filterStr) throws Exception
@@ -296,7 +301,12 @@
try
{
Filter filter = FilterImpl.createFilter(filterStr);
- return queue.expireReferences(filter);
+ int retValue = queue.expireReferences(filter);
+
+ // Waiting on IO otherwise the operation would return before the operation completed
+ storageManager.waitOnOperations();
+
+ return retValue;
}
catch (HornetQException e)
{
@@ -313,7 +323,12 @@
throw new IllegalArgumentException("No queue found for " + otherQueueName);
}
- return queue.moveReference(messageID, binding.getAddress());
+ boolean retValue = queue.moveReference(messageID, binding.getAddress());
+
+ // Waiting on IO otherwise the operation would return before the operation completed
+ storageManager.waitOnOperations();
+
+ return retValue;
}
public int moveMessages(final String filterStr, final String otherQueueName) throws Exception
@@ -327,7 +342,13 @@
throw new IllegalArgumentException("No queue found for " + otherQueueName);
}
- return queue.moveReferences(filter, binding.getAddress());
+ int retValue = queue.moveReferences(filter, binding.getAddress());
+
+ // Waiting on IO otherwise the operation would return before the operation completed
+ storageManager.waitOnOperations();
+
+ return retValue;
+
}
public int sendMessagesToDeadLetterAddress(final String filterStr) throws Exception
@@ -340,13 +361,21 @@
{
sendMessageToDeadLetterAddress(ref.getMessage().getMessageID());
}
+
+ // Waiting on IO otherwise the operation would return before the operation completed
+ storageManager.waitOnOperations();
return refs.size();
}
public boolean sendMessageToDeadLetterAddress(final long messageID) throws Exception
{
- return queue.sendMessageToDeadLetterAddress(messageID);
+ boolean retValue = queue.sendMessageToDeadLetterAddress(messageID);
+
+ // Waiting on IO otherwise the operation would return before the operation completed
+ storageManager.waitOnOperations();
+
+ return retValue;
}
public int changeMessagesPriority(String filterStr, int newPriority) throws Exception
More information about the hornetq-commits
mailing list