qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritch...@apache.org
Subject svn commit: r691643 - in /incubator/qpid/trunk/qpid/java: broker/src/main/java/org/apache/qpid/server/queue/ broker/src/test/java/org/apache/qpid/server/queue/ systests/src/main/java/org/apache/qpid/server/exchange/
Date Wed, 03 Sep 2008 16:00:11 GMT
Author: ritchiem
Date: Wed Sep  3 09:00:10 2008
New Revision: 691643

URL: http://svn.apache.org/viewvc?rev=691643&view=rev
Log:
QPID-1269 : Added queue registration as part of the creation via the Factory. Updated direct
creations to use the factory.. where possible.

Modified:
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java
    incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
    incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java?rev=691643&r1=691642&r2=691643&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java
Wed Sep  3 09:00:10 2008
@@ -70,6 +70,9 @@
         {
             q.configure(queueConfiguration);
         }
+
+        //Register the new queue
+        virtualHost.getQueueRegistry().registerQueue(q);
         return q;
     }
 }

Modified: incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java?rev=691643&r1=691642&r2=691643&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
Wed Sep  3 09:00:10 2008
@@ -41,6 +41,7 @@
 {
 
     private SimpleAMQQueue _queue;
+    private VirtualHost _virtualHost;
     private MessageStore store = new TestableMemoryMessageStore();
     private TransactionalContext ctx = new NonTransactionalContext(store, new StoreContext(),
null, null);
     private MessageHandleFactory factory = new MessageHandleFactory();
@@ -79,11 +80,14 @@
     {
         super.setUp();
         //Create Application Registry for test
-        ApplicationRegistry.getInstance(1);
+        ApplicationRegistry applicationRegistry = (ApplicationRegistry)ApplicationRegistry.getInstance(1);
 
         AMQShortString qname = new AMQShortString("qname");
         AMQShortString owner = new AMQShortString("owner");
-        _queue = new SimpleAMQQueue(qname, false, owner, false, new VirtualHost("vhost",
store));
+        _virtualHost = new VirtualHost("vhost", store);
+        _queue = (SimpleAMQQueue) AMQQueueFactory.createAMQQueueImpl(qname, false, owner,
false, _virtualHost, null);
+        
+        applicationRegistry .getVirtualHostRegistry().registerVirtualHost(_virtualHost);
     }
 
     @Override

Modified: incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java?rev=691643&r1=691642&r2=691643&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java
(original)
+++ incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java
Wed Sep  3 09:00:10 2008
@@ -244,6 +244,7 @@
         public TestQueue(AMQShortString name) throws AMQException
         {
             super(name, false, new AMQShortString("test"), true, ApplicationRegistry.getInstance().getVirtualHostRegistry().getVirtualHost("test"));
+            ApplicationRegistry.getInstance().getVirtualHostRegistry().getVirtualHost("test").getQueueRegistry().registerQueue(this);
         }
 
         /**



Mime
View raw message