activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r818955 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
Date Fri, 25 Sep 2009 18:59:02 GMT
Author: rajdavies
Date: Fri Sep 25 18:59:02 2009
New Revision: 818955

URL: http://svn.apache.org/viewvc?rev=818955&view=rev
Log:
added synchronization around remove()

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java?rev=818955&r1=818954&r2=818955&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/VMPendingMessageCursor.java
Fri Sep 25 18:59:02 2009
@@ -43,8 +43,8 @@
 
     
     @Override
-    public List<MessageReference> remove(ConnectionContext context, Destination destination)
throws Exception {
-        List<MessageReference> rc = new ArrayList<MessageReference>();
+    public synchronized List<MessageReference> remove(ConnectionContext context, Destination
destination) throws Exception {
+    	List<MessageReference> rc = new ArrayList<MessageReference>();
         for (Iterator<MessageReference> iterator = list.iterator(); iterator.hasNext();)
{
             MessageReference r = iterator.next();
             if( r.getRegionDestination()==destination ) {



Mime
View raw message