[hornetq-commits] JBoss hornetq SVN: r7957 - trunk/src/main/org/hornetq/core/server/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Sep 15 08:17:23 EDT 2009
Author: jmesnil
Date: 2009-09-15 08:17:22 -0400 (Tue, 15 Sep 2009)
New Revision: 7957
Modified:
trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
Log:
HORNETQ-132: Server side browser is still taking a snapshot of the queue
* removed queue snapshot. The browser iteration optimization has been
done in JBMESSAGING-1437.
Modified: trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2009-09-15 09:23:07 UTC (rev 7956)
+++ trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2009-09-15 12:17:22 UTC (rev 7957)
@@ -42,7 +42,6 @@
import org.hornetq.core.postoffice.Bindings;
import org.hornetq.core.postoffice.PostOffice;
import org.hornetq.core.postoffice.QueueBinding;
-import org.hornetq.core.postoffice.impl.LocalQueueBinding;
import org.hornetq.core.remoting.Channel;
import org.hornetq.core.remoting.CloseListener;
import org.hornetq.core.remoting.FailureListener;
@@ -1277,30 +1276,6 @@
filter = new FilterImpl(filterString);
}
- Queue theQueue;
-
- if (browseOnly)
- {
- // We consume a copy of the queue - TODO - this is a temporary measure
- // and will disappear once we can provide a proper iterator on the queue
-
- theQueue = queueFactory.createQueue(-1, binding.getAddress(), name, filter, false, true);
-
- // There's no need for any special locking since the list method is synchronized
- List<MessageReference> refs = ((Queue)binding.getBindable()).list(filter);
-
- for (MessageReference ref : refs)
- {
- theQueue.addLast(ref);
- }
-
- binding = new LocalQueueBinding(binding.getAddress(), theQueue, nodeID);
- }
- else
- {
- theQueue = (Queue)binding.getBindable();
- }
-
ServerConsumer consumer = new ServerConsumerImpl(idGenerator.generateID(),
oppositeChannelID,
this,
@@ -1331,6 +1306,8 @@
props.putIntProperty(ManagementHelper.HDR_DISTANCE, binding.getDistance());
+ Queue theQueue = (Queue)binding.getBindable();
+
props.putIntProperty(ManagementHelper.HDR_CONSUMER_COUNT, theQueue.getConsumerCount());
if (filterString != null)
More information about the hornetq-commits
mailing list