qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritch...@apache.org
Subject svn commit: r960550 - /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
Date Mon, 05 Jul 2010 11:16:32 GMT
Author: ritchiem
Date: Mon Jul  5 11:16:32 2010
New Revision: 960550

URL: http://svn.apache.org/viewvc?rev=960550&view=rev
Log:
QPID-2681 : Update VHC to correctly merge queues-(exchange)-queue

Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java?rev=960550&r1=960549&r2=960550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
Mon Jul  5 11:16:32 2010
@@ -211,30 +211,30 @@ public class VirtualHostConfiguration ex
         ExchangeConfigurationPlugin exchangeConfiguration
                 = (ExchangeConfigurationPlugin) queue.getVirtualHost().getConfiguration().getConfiguration(exchangeClass);
 
-        // now need to perform the queue-topic-topics-queue magic.
+        // now need to perform the queue-topic-topics-queues magic.
         // So make a new ConfigurationObject that will hold all the configuration for this
queue.
         ConfigurationPlugin queueConfig = new QueueConfiguration.QueueConfig();
 
         // Initialise the queue with any Global values we may have
-        QueueConfiguration config = getConfiguration(QueueConfiguration.class.getName());
-        if (config == null)
+        PropertiesConfiguration newQueueConfig = new PropertiesConfiguration();
+        newQueueConfig.setProperty("name", queue.getName());
+
+        try
         {
-            PropertiesConfiguration newQueueConfig = new PropertiesConfiguration();
-            newQueueConfig.setProperty("name", queue.getName());
+            //Set the queue name
+            CompositeConfiguration mungedConf = new CompositeConfiguration();
+            //Set the queue name
+            mungedConf.addConfiguration(newQueueConfig);
+            //Set the global queue configuration
+            mungedConf.addConfiguration(getConfig().subset("queues"));
 
-            try
-            {
-                queueConfig.setConfiguration("", newQueueConfig);
-            }
-            catch (ConfigurationException e)
-            {
-                // This will not occur as queues only require a name. 
-                _logger.error("QueueConfiguration requirements have changed.");
-            }
+            // Set configuration
+            queueConfig.setConfiguration("virtualhosts.virtualhost.queues", mungedConf);
         }
-        else
+        catch (ConfigurationException e)
         {
-            queueConfig.addConfiguration(config);
+            // This will not occur as queues only require a name.
+            _logger.error("QueueConfiguration requirements have changed.");
         }
 
         // Merge any configuration the Exchange wishes to apply        



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message