mirror of https://github.com/apache/activemq.git
added synchronization around remove()
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@818955 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9f6efd4b1f
commit
41b7acb0ba
|
@ -43,8 +43,8 @@ public class VMPendingMessageCursor extends AbstractPendingMessageCursor {
|
|||
|
||||
|
||||
@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 ) {
|
||||
|
|
Loading…
Reference in New Issue