qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1469872 - in /qpid/branches/0.22/qpid/java: ./ amqp-1-0-client-jms/ amqp-1-0-client/ amqp-1-0-common/ broker/ broker/bin/ broker/src/main/java/org/apache/qpid/server/exchange/ broker/src/main/java/org/apache/qpid/server/message/ broker/src...
Date Fri, 19 Apr 2013 15:05:39 GMT
Author: robbie
Date: Fri Apr 19 15:05:38 2013
New Revision: 1469872

URL: http://svn.apache.org/r1469872
Log:
QPID-2789 : [Java Broker] Prevent additional messages being enqueued after a queue is deleted.

merged from trunk r1466482

Modified:
    qpid/branches/0.22/qpid/java/   (props changed)
    qpid/branches/0.22/qpid/java/amqp-1-0-client/   (props changed)
    qpid/branches/0.22/qpid/java/amqp-1-0-client-jms/   (props changed)
    qpid/branches/0.22/qpid/java/amqp-1-0-common/   (props changed)
    qpid/branches/0.22/qpid/java/broker/   (props changed)
    qpid/branches/0.22/qpid/java/broker/bin/   (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java
  (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java
  (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java
  (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0/
  (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/   (props
changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/BaseQueue.java
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java
  (props changed)
    qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java
  (props changed)
    qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
  (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/CPPExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/Excludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/JavaBDBExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/JavaExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/JavaPre010Excludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/JavaTransientExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/XAExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.async.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.cluster.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.noprefetch.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.ssl.excludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.ssl.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-bdb.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-dby.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-mms.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/log4j-test.xml   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/test-provider.properties   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/test_resources/   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/testprofile.defaults   (props changed)

Propchange: qpid/branches/0.22/qpid/java/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java:r1466482

Propchange: qpid/branches/0.22/qpid/java/amqp-1-0-client/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-client:r1466482

Propchange: qpid/branches/0.22/qpid/java/amqp-1-0-client-jms/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-client-jms:r1466482

Propchange: qpid/branches/0.22/qpid/java/amqp-1-0-common/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-common:r1466482

Propchange: qpid/branches/0.22/qpid/java/broker/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker:r1466482

Propchange: qpid/branches/0.22/qpid/java/broker/bin/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/bin:r1466482

Modified: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java?rev=1469872&r1=1469871&r2=1469872&view=diff
==============================================================================
--- qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
(original)
+++ qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
Fri Apr 19 15:05:38 2013
@@ -20,6 +20,8 @@
  */
 package org.apache.qpid.server.exchange;
 
+import java.util.ArrayList;
+import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.binding.Binding;
@@ -47,6 +49,7 @@ import java.util.concurrent.atomic.Atomi
 
 public abstract class AbstractExchange implements Exchange
 {
+    private static final Logger _logger = Logger.getLogger(AbstractExchange.class);
     private AMQShortString _name;
     private final AtomicBoolean _closed = new AtomicBoolean();
 
@@ -295,7 +298,29 @@ public abstract class AbstractExchange i
     {
         _receivedMessageCount.incrementAndGet();
         _receivedMessageSize.addAndGet(message.getSize());
-        final List<? extends BaseQueue> queues = doRoute(message);
+        List<? extends BaseQueue> queues = doRoute(message);
+        List<? extends BaseQueue> allQueues = queues;
+
+        boolean deletedQueues = false;
+
+        for(BaseQueue q : allQueues)
+        {
+            if(q.isDeleted())
+            {
+                if(!deletedQueues)
+                {
+                    deletedQueues = true;
+                    queues = new ArrayList<BaseQueue>(allQueues);
+                }
+                if(_logger.isDebugEnabled())
+                {
+                    _logger.debug("Exchange: " + getName() + " - attempt to enqueue message
onto deleted queue " + String.valueOf(q.getNameShortString()));
+                }
+                queues.remove(q);
+            }
+        }
+
+
         if(!queues.isEmpty())
         {
             _routedMessageCount.incrementAndGet();

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0:r1466482

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue:r1466482

Modified: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/BaseQueue.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/BaseQueue.java?rev=1469872&r1=1469871&r2=1469872&view=diff
==============================================================================
--- qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/BaseQueue.java
(original)
+++ qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/BaseQueue.java
Fri Apr 19 15:05:38 2013
@@ -38,6 +38,7 @@ public interface BaseQueue extends Trans
     void enqueue(ServerMessage message, boolean transactional, PostEnqueueAction action)
throws AMQException;
 
     boolean isDurable();
+    boolean isDeleted();
 
     AMQShortString getNameShortString();
 }

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/CPPExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/CPPExcludes:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/Excludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/Excludes:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/JavaBDBExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaBDBExcludes:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/JavaExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaExcludes:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/JavaPre010Excludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaPre010Excludes:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/JavaTransientExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaTransientExcludes:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/XAExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/XAExcludes:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.async.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.cluster.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.cluster.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.noprefetch.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.ssl.excludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.ssl.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.ssl.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-bdb.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-bdb.0-9-1.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-dby.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-dby.0-9-1.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-mms.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-mms.0-9-1.testprofile:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/log4j-test.xml
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/log4j-test.xml:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/test-provider.properties
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/test-provider.properties:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/test_resources/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/test_resources:r1466482

Propchange: qpid/branches/0.22/qpid/java/test-profiles/testprofile.defaults
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/testprofile.defaults:r1466482



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message