qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject svn commit: r1416908 - in /qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src: main/java/org/apache/qpid/server/configuration/ main/java/org/apache/qpid/server/handler/ main/java/org/apache/qpid/server/transport/ test/java/org/apache/qpid/...
Date Tue, 04 Dec 2012 12:10:55 GMT
Author: orudyy
Date: Tue Dec  4 12:10:53 2012
New Revision: 1416908

URL: http://svn.apache.org/viewvc?rev=1416908&view=rev
Log:
QPID-4390: Remove 'autoregister' queue configuration

Modified:
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java?rev=1416908&r1=1416907&r2=1416908&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
(original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
Tue Dec  4 12:10:53 2012
@@ -496,11 +496,6 @@ public class ServerConfiguration extends
         return getStringValue("management.ssl.keyStorePassword", fallback);
     }
 
-    public boolean getQueueAutoRegister()
-    {
-        return getBooleanValue("queue.auto_register", true);
-    }
-
     public boolean getJMXManagementEnabled()
     {
         return getBooleanValue("management.enabled", true);

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java?rev=1416908&r1=1416907&r2=1416908&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
(original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
Tue Dec  4 12:10:53 2012
@@ -38,7 +38,6 @@ import org.apache.qpid.server.protocol.A
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.AMQQueueFactory;
 import org.apache.qpid.server.queue.QueueRegistry;
-import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.store.DurableConfigurationStore;
@@ -59,8 +58,6 @@ public class QueueDeclareHandler impleme
         return _instance;
     }
 
-    private boolean autoRegister = ApplicationRegistry.getInstance().getConfiguration().getQueueAutoRegister();
-
     public void methodReceived(AMQStateManager stateManager, QueueDeclareBody body, int channelId)
throws AMQException
     {
         final AMQProtocolSession protocolConnection = stateManager.getProtocolSession();
@@ -148,13 +145,11 @@ public class QueueDeclareHandler impleme
                             });
                         }
                     }
-                    if (autoRegister)
-                    {
-                        Exchange defaultExchange = exchangeRegistry.getDefaultExchange();
+                    Exchange defaultExchange = exchangeRegistry.getDefaultExchange();
 
-                        virtualHost.getBindingFactory().addBinding(String.valueOf(queueName),
queue, defaultExchange, Collections.EMPTY_MAP);
-                        _logger.info("Queue " + queueName + " bound to default exchange("
+ defaultExchange.getNameShortString() + ")");
-                    }
+                    virtualHost.getBindingFactory().addBinding(String.valueOf(queueName),
queue, defaultExchange,
+                            Collections.<String, Object> emptyMap());
+                    _logger.info("Queue " + queueName + " bound to default exchange(" + defaultExchange.getNameShortString()
+ ")");
                 }
             }
             else if (queue.isExclusive() && !queue.isDurable() && (owningSession
== null || owningSession.getConnectionModel() != protocolConnection))

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java?rev=1416908&r1=1416907&r2=1416908&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
(original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
Tue Dec  4 12:10:53 2012
@@ -45,7 +45,6 @@ import org.apache.qpid.server.queue.AMQQ
 import org.apache.qpid.server.queue.AMQQueueFactory;
 import org.apache.qpid.server.queue.BaseQueue;
 import org.apache.qpid.server.queue.QueueRegistry;
-import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.security.SecurityManager;
 import org.apache.qpid.server.store.DurableConfigurationStore;
 import org.apache.qpid.server.store.MessageStore;
@@ -1267,19 +1266,11 @@ public class ServerSessionDelegate exten
                         }
                         queueRegistry.registerQueue(queue);
 
-                        // XXX remove reference on ServerConfiguration
-                        boolean autoRegister = ApplicationRegistry.getInstance().getConfiguration().getQueueAutoRegister();
+                        ExchangeRegistry exchangeRegistry = getExchangeRegistry(session);
 
-                        if (autoRegister)
-                        {
-
-                            ExchangeRegistry exchangeRegistry = getExchangeRegistry(session);
-
-                            Exchange defaultExchange = exchangeRegistry.getDefaultExchange();
+                        Exchange defaultExchange = exchangeRegistry.getDefaultExchange();
 
-                            virtualHost.getBindingFactory().addBinding(queueName, queue,
defaultExchange, null);
-
-                        }
+                        virtualHost.getBindingFactory().addBinding(queueName, queue, defaultExchange,
null);
 
                         if (method.hasAutoDelete()
                             && method.getAutoDelete()

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java?rev=1416908&r1=1416907&r2=1416908&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
(original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
Tue Dec  4 12:10:53 2012
@@ -228,19 +228,6 @@ public class ServerConfigurationTest ext
         assertEquals("a", _serverConfig.getManagementKeyStorePassword());
     }
 
-    public void testGetQueueAutoRegister() throws ConfigurationException
-    {
-        // Check default
-        _serverConfig.initialise();
-        assertEquals(true, _serverConfig.getQueueAutoRegister());
-
-        // Check value we set
-        _config.setProperty("queue.auto_register", false);
-        _serverConfig = new ServerConfiguration(_config);
-        _serverConfig.initialise();
-        assertEquals(false, _serverConfig.getQueueAutoRegister());
-    }
-
     public void testGetJMXManagementEnabled() throws ConfigurationException
     {
         // Check default



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


Mime
View raw message