qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgiu...@apache.org
Subject svn commit: r1333027 [8/13] - in /qpid/branches/qpid-3767/qpid: ./ cpp/ cpp/bindings/ cpp/bindings/qmf/ruby/ cpp/bindings/qpid/python/ cpp/bindings/qpid/ruby/ cpp/bindings/qpid/ruby/features/step_definitions/ cpp/bindings/qpid/ruby/lib/qpid/ cpp/docs/a...
Date Wed, 02 May 2012 13:10:03 GMT
Modified: qpid/branches/qpid-3767/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/upgrade/UpgraderTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/upgrade/UpgraderTest.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/upgrade/UpgraderTest.java (original)
+++ qpid/branches/qpid-3767/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/upgrade/UpgraderTest.java Wed May  2 13:09:18 2012
@@ -24,7 +24,6 @@ import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.qpid.server.logging.subjects.TestBlankSubject;
 import org.apache.qpid.server.store.berkeleydb.BDBMessageStore;
 import org.apache.qpid.server.store.berkeleydb.tuple.ContentBinding;
 
@@ -51,7 +50,7 @@ public class UpgraderTest extends Abstra
     public void setUp() throws Exception
     {
         super.setUp();
-        _upgrader = new Upgrader(_environment, new TestBlankSubject());
+        _upgrader = new Upgrader(_environment, getVirtualHostName());
     }
 
     private int getStoreVersion()
@@ -106,12 +105,12 @@ public class UpgraderTest extends Abstra
 
         nonExistentStoreLocation.mkdir();
         _environment = createEnvironment(nonExistentStoreLocation);
-        _upgrader = new Upgrader(_environment, new TestBlankSubject());
+        _upgrader = new Upgrader(_environment, getVirtualHostName());
         _upgrader.upgradeIfNecessary();
 
         List<String> databaseNames = _environment.getDatabaseNames();
         List<String> expectedDatabases = new ArrayList<String>();
-        expectedDatabases.add("VERSION");
+        expectedDatabases.add(Upgrader.VERSION_DB_NAME);
         assertEquals("Expectedonly VERSION table in initially empty store after upgrade: ", expectedDatabases, databaseNames);
         assertEquals("Unexpected store version", BDBMessageStore.VERSION, getStoreVersion());
 

Propchange: qpid/branches/qpid-3767/qpid/java/broker/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker:r1306564-1332660

Modified: qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java Wed May  2 13:09:18 2012
@@ -83,7 +83,6 @@ public class PlainConfiguration extends 
                 
             _st.commentChar(COMMENT); // single line comments
             _st.eolIsSignificant(true); // return EOL as a token
-            _st.lowerCaseMode(true); // case insensitive tokens
             _st.ordinaryChar('='); // equals is a token
             _st.ordinaryChar(CONTINUATION); // continuation character (when followed by EOL)
             _st.quoteChar('"'); // double quote

Modified: qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java Wed May  2 13:09:18 2012
@@ -68,7 +68,7 @@ public class AccessControlTest extends T
     private RuleSet createGroupRuleSet()
     {
         final RuleSet rs = new RuleSet();
-        rs.addGroup("aclGroup1", Arrays.asList(new String[] {"member1", "member2"}));
+        rs.addGroup("aclGroup1", Arrays.asList(new String[] {"member1", "Member2"}));
 
         // Rule expressed with username
         rs.grant(0, "user1", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
@@ -122,7 +122,12 @@ public class AccessControlTest extends T
         setUpGroupAccessControl();
         SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("member1"));
 
-        final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+        Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+        assertEquals(Result.ALLOWED, result);
+
+        SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("Member2"));
+
+        result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
         assertEquals(Result.ALLOWED, result);
     }
 

Modified: qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/PlainConfigurationTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/PlainConfigurationTest.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/PlainConfigurationTest.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/PlainConfigurationTest.java Wed May  2 13:09:18 2012
@@ -318,17 +318,17 @@ public class PlainConfigurationTest exte
      */
     public void testMixedCaseRuleInterpretation() throws Exception
     {
-        final PlainConfiguration config = writeACLConfig("AcL deny-LOG user1 BiND Exchange name=AmQ.dIrect");
+        final PlainConfiguration config = writeACLConfig("AcL deny-LOG User1 BiND Exchange Name=AmQ.dIrect");
         final RuleSet rs = config.getConfiguration();
         assertEquals(1, rs.getRuleCount());
 
         final Map<Integer, Rule> rules = rs.getAllRules();
         assertEquals(1, rules.size());
         final Rule rule = rules.get(0);
-        assertEquals("Rule has unexpected identity", "user1", rule.getIdentity());
+        assertEquals("Rule has unexpected identity", "User1", rule.getIdentity());
         assertEquals("Rule has unexpected operation", Operation.BIND, rule.getAction().getOperation());
         assertEquals("Rule has unexpected operation", ObjectType.EXCHANGE, rule.getAction().getObjectType());
-        final ObjectProperties expectedProperties = new ObjectProperties("amq.direct");
+        final ObjectProperties expectedProperties = new ObjectProperties("AmQ.dIrect");
         assertEquals("Rule has unexpected object properties", expectedProperties, rule.getAction().getProperties());
     }
 

Modified: qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java Wed May  2 13:09:18 2012
@@ -40,6 +40,7 @@ import javax.management.openmbean.OpenDa
 import javax.management.openmbean.TabularData;
 import java.util.ArrayList;
 import java.util.Map;
+import java.util.UUID;
 
 /**
  * This is a special diagnostic exchange type which doesn't actually do anything
@@ -125,14 +126,14 @@ public class DiagnosticExchange extends 
             return DiagnosticExchange.class;
         }
 
-        public DiagnosticExchange newInstance(VirtualHost host,
+        public DiagnosticExchange newInstance(UUID id, VirtualHost host,
                                             AMQShortString name,
                                             boolean durable,
                                             int ticket,
                                             boolean autoDelete) throws AMQException
         {
             DiagnosticExchange exch = new DiagnosticExchange();
-            exch.initialise(host,name,durable,ticket,autoDelete);
+            exch.initialise(id, host,name,durable,ticket,autoDelete);
             return exch;
         }
 
@@ -159,11 +160,6 @@ public class DiagnosticExchange extends 
         return new DiagnosticExchange.DiagnosticExchangeMBean();
     }
 
-    public Logger getLogger()
-    {
-        return _logger;
-    }
-
     public void registerQueue(String routingKey, AMQQueue queue, Map<String, Object> args) throws AMQException
     {
         // No op

Modified: qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchangeType.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchangeType.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchangeType.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchangeType.java Wed May  2 13:09:18 2012
@@ -21,6 +21,8 @@
 
 package org.apache.qpid.extras.exchanges.diagnostic;
 
+import java.util.UUID;
+
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.exchange.ExchangeType;
@@ -42,11 +44,11 @@ public final class DiagnosticExchangeTyp
         return DiagnosticExchange.class;
     }
 
-    public DiagnosticExchange newInstance(VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
+    public DiagnosticExchange newInstance(UUID id, VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
             throws AMQException
     {
         DiagnosticExchange exch = new DiagnosticExchange();
-        exch.initialise(host, name, durable, ticket, autoDelete);
+        exch.initialise(id, host, name, durable, ticket, autoDelete);
         return exch;
     }
 

Modified: qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java Wed May  2 13:09:18 2012
@@ -255,7 +255,7 @@ public class TestExchange implements Exc
         return 0;
     }
 
-    public void initialise(VirtualHost arg0, AMQShortString arg1, boolean arg2, int arg3, boolean arg4)
+    public void initialise(UUID id, VirtualHost arg0, AMQShortString arg1, boolean arg2, int arg3, boolean arg4)
             throws AMQException
     {
     }

Modified: qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchangeType.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchangeType.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchangeType.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchangeType.java Wed May  2 13:09:18 2012
@@ -21,6 +21,8 @@
 
 package org.apache.qpid.extras.exchanges.example;
 
+import java.util.UUID;
+
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.exchange.Exchange;
@@ -40,12 +42,12 @@ public class TestExchangeType implements
         return null;
     }
 
-    public Exchange newInstance(VirtualHost host, AMQShortString name, boolean durable,
+    public Exchange newInstance(UUID id, VirtualHost host, AMQShortString name, boolean durable,
                                 int token, boolean autoDelete)
             throws AMQException
     {
         TestExchange ex = new TestExchange();
-        ex.initialise(host, name, durable, token, autoDelete);
+        ex.initialise(id, host, name, durable, token, autoDelete);
         return ex;
     }
 

Propchange: qpid/branches/qpid-3767/qpid/java/broker/bin/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/bin:r1306564-1332660

Modified: qpid/branches/qpid-3767/qpid/java/broker/build.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/build.xml?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/build.xml (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/build.xml Wed May  2 13:09:18 2012
@@ -19,7 +19,7 @@
  -
  -->
 <project name="AMQ Broker" default="build">
-    <property name="module.depends" value="management/common common"/>
+    <property name="module.depends" value="management/common common amqp-1-0-common"/>
     <property name="module.test.depends" value="common/test" />
     <property name="module.main" value="org.apache.qpid.server.Main"/>
     <property name="module.genpom" value="true"/>

Modified: qpid/branches/qpid-3767/qpid/java/broker/etc/virtualhosts.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/etc/virtualhosts.xml?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/etc/virtualhosts.xml (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/etc/virtualhosts.xml Wed May  2 13:09:18 2012
@@ -25,8 +25,8 @@
         <name>localhost</name>
         <localhost>
             <store>
-                <class>org.apache.qpid.server.store.MemoryMessageStore</class>
-                <!--<class>org.apache.qpid.server.store.DerbyMessageStore</class>
+                <factoryclass>org.apache.qpid.server.store.MemoryMessageStoreFactory</factoryclass>
+                <!--<factoryclass>org.apache.qpid.server.store.derby.DerbyMessageStoreFactory</factoryclass>
                 <environment-path>${QPID_WORK}/derbystore</environment-path>-->
             </store>
 
@@ -86,8 +86,8 @@
         <name>development</name>
         <development>
             <store>
-                <class>org.apache.qpid.server.store.MemoryMessageStore</class>
-                <!--<class>org.apache.qpid.server.store.DerbyMessageStore</class>
+                <factoryclass>org.apache.qpid.server.store.MemoryMessageStoreFactory</factoryclass>
+                <!--<factoryclass>org.apache.qpid.server.store.derby.DerbyMessageStoreFactory</factoryclass>
                 <environment-path>${QPID_WORK}/derbystore</environment-path>-->
             </store>
 
@@ -125,8 +125,8 @@
         <name>test</name>
         <test>
             <store>
-                <class>org.apache.qpid.server.store.MemoryMessageStore</class>
-                <!--<class>org.apache.qpid.server.store.DerbyMessageStore</class>
+                <factoryclass>org.apache.qpid.server.store.MemoryMessageStoreFactory</factoryclass>
+                <!--<factoryclass>org.apache.qpid.server.store.derby.DerbyMessageStoreFactory</factoryclass>
                 <environment-path>${QPID_WORK}/derbystore</environment-path>-->
             </store>
 

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java Wed May  2 13:09:18 2012
@@ -37,6 +37,7 @@ import org.apache.qpid.server.exchange.t
 import org.apache.qpid.server.exchange.topic.TopicParser;
 import org.apache.qpid.server.message.InboundMessage;
 import org.apache.qpid.server.message.ServerMessage;
+import org.apache.qpid.server.model.UUIDGenerator;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.BaseQueue;
 import org.apache.qpid.server.virtualhost.HouseKeepingTask;
@@ -83,7 +84,8 @@ public class ManagementExchange implemen
 
     private class ManagementQueue implements BaseQueue
     {
-        private final String NAME_AS_STRING = "##__mgmt_pseudo_queue__##" + UUID.randomUUID().toString();
+        private final UUID QUEUE_ID =  UUIDGenerator.generateUUID();
+        private final String NAME_AS_STRING = "##__mgmt_pseudo_queue__##" + QUEUE_ID.toString();
         private final AMQShortString NAME_AS_SHORT_STRING = new AMQShortString(NAME_AS_STRING);
 
         public void enqueue(ServerMessage message) throws AMQException
@@ -129,9 +131,10 @@ public class ManagementExchange implemen
             return NAME_AS_SHORT_STRING;
         }
 
-        public String getResourceName()
+        @Override
+        public UUID getId()
         {
-            return NAME_AS_STRING;
+            return QUEUE_ID;
         }
     }
 
@@ -155,14 +158,14 @@ public class ManagementExchange implemen
             return ManagementExchange.class;
         }
 
-        public ManagementExchange newInstance(VirtualHost host,
+        public ManagementExchange newInstance(UUID id, VirtualHost host,
                                             AMQShortString name,
                                             boolean durable,
                                             int ticket,
                                             boolean autoDelete) throws AMQException
         {
             ManagementExchange exch = new ManagementExchange();
-            exch.initialise(host, name, durable, ticket, autoDelete);
+            exch.initialise(id, host, name, durable, ticket, autoDelete);
             return exch;
         }
 
@@ -183,7 +186,7 @@ public class ManagementExchange implemen
         return QPID_MANAGEMENT_TYPE;
     }
 
-    public void initialise(VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
+    public void initialise(UUID id, VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
             throws AMQException
     {
         if(!QPID_MANAGEMENT.equals(name))
@@ -191,7 +194,7 @@ public class ManagementExchange implemen
             throw new AMQException("Can't create more than one Management exchange");
         }
         _virtualHost = host;
-        _id = host.getConfigStore().createId();
+        _id = id;
         _virtualHost.scheduleHouseKeepingTask(_virtualHost.getBroker().getManagementPublishInterval(), new UpdateTask(_virtualHost));
         getConfigStore().addConfiguredObject(this);
         getQMFService().addListener(this);

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java Wed May  2 13:09:18 2012
@@ -33,11 +33,11 @@ import org.apache.qpid.server.logging.ac
 import org.apache.qpid.server.logging.actors.ManagementActor;
 import org.apache.qpid.server.management.AMQManagedObject;
 import org.apache.qpid.server.management.ManagedObject;
+import org.apache.qpid.server.model.UUIDGenerator;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.AMQQueueFactory;
 import org.apache.qpid.server.queue.AMQQueueMBean;
 import org.apache.qpid.server.queue.QueueRegistry;
-import org.apache.qpid.server.store.DurableConfigurationStore;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 import org.apache.qpid.server.virtualhost.VirtualHostImpl;
 
@@ -49,6 +49,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.UUID;
 
 /**
  * This MBean implements the broker management interface and exposes the
@@ -60,8 +61,6 @@ public class AMQBrokerManagerMBean exten
     private final QueueRegistry _queueRegistry;
     private final ExchangeRegistry _exchangeRegistry;
     private final ExchangeFactory _exchangeFactory;
-    private final Exchange _defaultExchange;
-    private final DurableConfigurationStore _durableConfig;
 
     private final VirtualHostImpl.VirtualHostMBean _virtualHostMBean;
 
@@ -75,8 +74,6 @@ public class AMQBrokerManagerMBean exten
 
         _queueRegistry = virtualHost.getQueueRegistry();
         _exchangeRegistry = virtualHost.getExchangeRegistry();
-        _defaultExchange = _exchangeRegistry.getDefaultExchange();
-        _durableConfig = virtualHost.getDurableConfigurationStore();
         _exchangeFactory = virtualHost.getExchangeFactory();
     }
 
@@ -176,12 +173,12 @@ public class AMQBrokerManagerMBean exten
                 Exchange exchange = _exchangeRegistry.getExchange(new AMQShortString(exchangeName));
                 if (exchange == null)
                 {
-                    exchange = _exchangeFactory.createExchange(new AMQShortString(exchangeName), new AMQShortString(type),
-                                                               durable, false, 0);
+                    exchange = _exchangeFactory.createExchange(new AMQShortString(exchangeName),
+                                                               new AMQShortString(type), durable, false, 0);
                     _exchangeRegistry.registerExchange(exchange);
                     if (durable)
                     {
-                        _durableConfig.createExchange(exchange);
+                        getVirtualHost().getMessageStore().createExchange(exchange);
                     }
                 }
                 else
@@ -249,45 +246,42 @@ public class AMQBrokerManagerMBean exten
     public void createNewQueue(String queueName, String owner, boolean durable, Map<String,Object> arguments) throws JMException
     {
         final AMQShortString queueNameAsAMQShortString = new AMQShortString(queueName);
-        AMQQueue queue = _queueRegistry.getQueue(queueNameAsAMQShortString);
-        if (queue != null)
+        synchronized (_queueRegistry)
         {
-            throw new JMException("The queue \"" + queueName + "\" already exists.");
-        }
-
-        CurrentActor.set(new ManagementActor(getLogActor().getRootMessageLogger()));
-        try
-        {
-            AMQShortString ownerShortString = null;
-            if (owner != null)
+            AMQQueue queue = _queueRegistry.getQueue(queueNameAsAMQShortString);
+            if (queue != null)
             {
-                ownerShortString = new AMQShortString(owner);
+                throw new JMException("The queue \"" + queueName + "\" already exists.");
             }
 
-            FieldTable args = null;
-            if(arguments != null)
+            CurrentActor.set(new ManagementActor(getLogActor().getRootMessageLogger()));
+            try
             {
-                args = FieldTable.convertToFieldTable(arguments);
-            }
-            final VirtualHost virtualHost = getVirtualHost();
+                FieldTable args = null;
+                if(arguments != null)
+                {
+                    args = FieldTable.convertToFieldTable(arguments);
+                }
+                final VirtualHost virtualHost = getVirtualHost();
+
+                queue = AMQQueueFactory.createAMQQueueImpl(UUIDGenerator.generateUUID(), queueName, durable, owner,
+                                                           false, false, getVirtualHost(), arguments);
+                if (queue.isDurable() && !queue.isAutoDelete())
+                {
+                    getVirtualHost().getMessageStore().createQueue(queue, args);
+                }
 
-            queue = AMQQueueFactory.createAMQQueueImpl(queueNameAsAMQShortString, durable, ownerShortString,
-                                                       false, false, getVirtualHost(), args);
-            if (queue.isDurable() && !queue.isAutoDelete())
+                virtualHost.getBindingFactory().addBinding(queueName, queue, _exchangeRegistry.getDefaultExchange(), null);
+            }
+            catch (AMQException ex)
             {
-                _durableConfig.createQueue(queue, args);
+                JMException jme = new JMException(ex.toString());
+                throw new MBeanException(jme, "Error in creating queue " + queueName);
+            }
+            finally
+            {
+                CurrentActor.remove();
             }
-
-            virtualHost.getBindingFactory().addBinding(queueName, queue, _defaultExchange, null);
-        }
-        catch (AMQException ex)
-        {
-            JMException jme = new JMException(ex.toString());
-            throw new MBeanException(jme, "Error in creating queue " + queueName);
-        }
-        finally
-        {
-            CurrentActor.remove();
         }
     }
 
@@ -317,7 +311,7 @@ public class AMQBrokerManagerMBean exten
             queue.delete();
             if (queue.isDurable())
             {
-                _durableConfig.removeQueue(queue);
+                getVirtualHost().getMessageStore().removeQueue(queue);
             }
         }
         catch (AMQException ex)

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java Wed May  2 13:09:18 2012
@@ -83,11 +83,13 @@ import org.apache.qpid.server.queue.Inco
 import org.apache.qpid.server.queue.QueueEntry;
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.store.MessageStore;
+import org.apache.qpid.server.store.StoreFuture;
 import org.apache.qpid.server.store.StoredMessage;
 import org.apache.qpid.server.subscription.ClientDeliveryMethod;
 import org.apache.qpid.server.subscription.RecordDeliveryMethod;
 import org.apache.qpid.server.subscription.Subscription;
 import org.apache.qpid.server.subscription.SubscriptionFactoryImpl;
+import org.apache.qpid.server.subscription.SubscriptionImpl;
 import org.apache.qpid.server.txn.AsyncAutoCommitTransaction;
 import org.apache.qpid.server.txn.LocalTransaction;
 import org.apache.qpid.server.txn.ServerTransaction;
@@ -1556,7 +1558,7 @@ public class AMQChannel implements Sessi
         }
     }
 
-    public void recordFuture(final MessageStore.StoreFuture future, final ServerTransaction.Action action)
+    public void recordFuture(final StoreFuture future, final ServerTransaction.Action action)
     {
         _unfinishedCommandsQueue.add(new AsyncCommand(future, action));
     }
@@ -1590,10 +1592,10 @@ public class AMQChannel implements Sessi
 
     private static class AsyncCommand
     {
-        private final MessageStore.StoreFuture _future;
+        private final StoreFuture _future;
         private ServerTransaction.Action _action;
 
-        public AsyncCommand(final MessageStore.StoreFuture future, final ServerTransaction.Action action)
+        public AsyncCommand(final StoreFuture future, final ServerTransaction.Action action)
         {
             _future = future;
             _action = action;

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java Wed May  2 13:09:18 2012
@@ -53,10 +53,16 @@ import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.util.EnumSet;
+import java.util.Formatter;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Properties;
 import java.util.Set;
+import java.util.logging.ConsoleHandler;
+import java.util.logging.FileHandler;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
 
 public class Broker
 {
@@ -159,6 +165,12 @@ public class Broker
                 parsePortList(sslPorts, serverConfig.getSSLPorts());
             }
 
+            Set<Integer> exclude_1_0 = new HashSet<Integer>(options.getExcludedPorts(ProtocolExclusion.v1_0));
+            if(exclude_1_0.isEmpty())
+            {
+                parsePortList(exclude_1_0, serverConfig.getPortExclude10());
+            }
+
             Set<Integer> exclude_0_10 = new HashSet<Integer>(options.getExcludedPorts(ProtocolExclusion.v0_10));
             if(exclude_0_10.isEmpty())
             {
@@ -208,7 +220,8 @@ public class Broker
                     final InetSocketAddress inetSocketAddress = new InetSocketAddress(bindAddress, port);
 
                     final Set<AmqpProtocolVersion> supported =
-                                    getSupportedVersions(port, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8, serverConfig);
+                                    getSupportedVersions(port, exclude_1_0, exclude_0_10, exclude_0_9_1, exclude_0_9,
+                                                         exclude_0_8, serverConfig);
 
                     final NetworkTransportConfiguration settings =
                                     new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP);
@@ -237,7 +250,8 @@ public class Broker
                     final InetSocketAddress inetSocketAddress = new InetSocketAddress(bindAddress, sslPort);
 
                     final Set<AmqpProtocolVersion> supported =
-                                    getSupportedVersions(sslPort, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8, serverConfig);
+                                    getSupportedVersions(sslPort, exclude_1_0, exclude_0_10, exclude_0_9_1,
+                                                         exclude_0_9, exclude_0_8, serverConfig);
                     final NetworkTransportConfiguration settings =
                         new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP);
 
@@ -262,13 +276,20 @@ public class Broker
         }
     }
 
-    private static Set<AmqpProtocolVersion> getSupportedVersions(final int port, final Set<Integer> exclude_0_10,
-                                                                final Set<Integer> exclude_0_9_1, final Set<Integer> exclude_0_9,
-                                                                final Set<Integer> exclude_0_8,
-                                                                final ServerConfiguration serverConfig)
+    private static Set<AmqpProtocolVersion> getSupportedVersions(final int port,
+                                                                 final Set<Integer> exclude_1_0,
+                                                                 final Set<Integer> exclude_0_10,
+                                                                 final Set<Integer> exclude_0_9_1,
+                                                                 final Set<Integer> exclude_0_9,
+                                                                 final Set<Integer> exclude_0_8,
+                                                                 final ServerConfiguration serverConfig)
     {
         final EnumSet<AmqpProtocolVersion> supported = EnumSet.allOf(AmqpProtocolVersion.class);
 
+        if(exclude_1_0.contains(port) || !serverConfig.isAmqp10enabled())
+        {
+            supported.remove(AmqpProtocolVersion.v1_0_0);
+        }
         if(exclude_0_10.contains(port) || !serverConfig.isAmqp010enabled())
         {
             supported.remove(AmqpProtocolVersion.v0_10);

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java Wed May  2 13:09:18 2012
@@ -47,7 +47,6 @@ public class BrokerOptions
 
     private Integer _logWatchFrequency = 0;
 
-
     public void addPort(final int port)
     {
         _ports.add(port);
@@ -107,7 +106,6 @@ public class BrokerOptions
     {
         _jmxPortConnectorServer = jmxPortConnectorServer;
     }
-
     public String getQpidHome()
     {
         return System.getProperty(QPID_HOME);
@@ -163,5 +161,4 @@ public class BrokerOptions
     {
         _bundleContext = bundleContext;
     }
-
 }
\ No newline at end of file

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java Wed May  2 13:09:18 2012
@@ -59,6 +59,12 @@ public class Main
                     .withDescription("SSL port. Overrides any value in the config file")
                     .withLongOpt("sslport").create("s");
 
+
+    private static final Option OPTION_EXCLUDE_1_0 =
+            OptionBuilder.withArgName("port").hasArg()
+                         .withDescription("when listening on the specified port do not accept AMQP1-0 connections. The specified port must be one specified on the command line")
+                         .withLongOpt("exclude-1-0").create();
+
     private static final Option OPTION_EXCLUDE_0_10 =
             OptionBuilder.withArgName("port").hasArg()
                     .withDescription("when listening on the specified port do not accept AMQP0-10 connections. The specified port must be one specified on the command line")
@@ -116,6 +122,7 @@ public class Main
         OPTIONS.addOption(OPTION_LOG_WATCH);
         OPTIONS.addOption(OPTION_PORT);
         OPTIONS.addOption(OPTION_SSLPORT);
+        OPTIONS.addOption(OPTION_EXCLUDE_1_0);
         OPTIONS.addOption(OPTION_EXCLUDE_0_10);
         OPTIONS.addOption(OPTION_EXCLUDE_0_9_1);
         OPTIONS.addOption(OPTION_EXCLUDE_0_9);

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/ProtocolExclusion.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/ProtocolExclusion.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/ProtocolExclusion.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/ProtocolExclusion.java Wed May  2 13:09:18 2012
@@ -28,7 +28,8 @@ public enum ProtocolExclusion
     v0_8("exclude-0-8","--exclude-0-8"),
     v0_9("exclude-0-9", "--exclude-0-9"),
     v0_9_1("exclude-0-9-1", "--exclude-0-9-1"),
-    v0_10("exclude-0-10", "--exclude-0-10");
+    v0_10("exclude-0-10", "--exclude-0-10"),
+    v1_0("exclude-1-0", "--exclude-1-0");
 
     private static final Map<String, ProtocolExclusion> MAP = new HashMap<String,ProtocolExclusion>();
 

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/binding/Binding.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/binding/Binding.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/binding/Binding.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/binding/Binding.java Wed May  2 13:09:18 2012
@@ -117,7 +117,7 @@ public class Binding
 
     public String toString()
     {
-        return "Binding{bindingKey="+_bindingKey+", exchange="+_exchange+", queue="+_queue+"}";
+        return "Binding{bindingKey="+_bindingKey+", exchange="+_exchange+", queue="+_queue+", id= " + _id + " }";
     }
 
 }

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/binding/BindingFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/binding/BindingFactory.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/binding/BindingFactory.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/binding/BindingFactory.java Wed May  2 13:09:18 2012
@@ -24,7 +24,6 @@ import org.apache.qpid.AMQException;
 import org.apache.qpid.AMQInternalException;
 import org.apache.qpid.AMQSecurityException;
 import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.FieldTable;
 import org.apache.qpid.server.configuration.BindingConfig;
 import org.apache.qpid.server.configuration.BindingConfigType;
 import org.apache.qpid.server.configuration.ConfigStore;
@@ -33,58 +32,35 @@ import org.apache.qpid.server.exchange.E
 import org.apache.qpid.server.logging.actors.CurrentActor;
 import org.apache.qpid.server.logging.messages.BindingMessages;
 import org.apache.qpid.server.logging.subjects.BindingLogSubject;
+import org.apache.qpid.server.model.UUIDGenerator;
 import org.apache.qpid.server.queue.AMQQueue;
-import org.apache.qpid.server.store.DurableConfigurationStore;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
 import java.util.Collections;
 import java.util.Map;
+import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 
 public class BindingFactory
 {
     private final VirtualHost _virtualHost;
-    private final DurableConfigurationStore.Source _configSource;
-    private final Exchange _defaultExchange;
 
     private final ConcurrentHashMap<BindingImpl, BindingImpl> _bindings = new ConcurrentHashMap<BindingImpl, BindingImpl>();
 
-
     public BindingFactory(final VirtualHost vhost)
     {
-        this(vhost, vhost.getExchangeRegistry().getDefaultExchange());
+        _virtualHost = vhost;
     }
 
-    public BindingFactory(final DurableConfigurationStore.Source configSource, final Exchange defaultExchange)
-    {
-        _configSource = configSource;
-        _defaultExchange = defaultExchange;
-        if (configSource instanceof VirtualHost)
-        {
-            _virtualHost = (VirtualHost) configSource;
-        }
-        else
-        {
-            _virtualHost = null;
-        }
-    }
-
-    public VirtualHost getVirtualHost()
-    {
-        return _virtualHost;
-    }
-
-
-
     private final class BindingImpl extends Binding implements AMQQueue.Task, Exchange.Task, BindingConfig
     {
         private final BindingLogSubject _logSubject;
         //TODO : persist creation time
         private long _createTime = System.currentTimeMillis();
 
-        private BindingImpl(String bindingKey, final AMQQueue queue, final Exchange exchange, final Map<String, Object> arguments)
+        private BindingImpl(UUID id, String bindingKey, final AMQQueue queue, final Exchange exchange, final Map<String, Object> arguments)
         {
-            super(queue.getVirtualHost().getConfigStore().createId(), bindingKey, queue, exchange, arguments);
+            super(id, bindingKey, queue, exchange, arguments);
             _logSubject = new BindingLogSubject(bindingKey,exchange,queue);
 
         }
@@ -141,48 +117,59 @@ public class BindingFactory
 
     public boolean addBinding(String bindingKey, AMQQueue queue, Exchange exchange, Map<String, Object> arguments) throws AMQSecurityException, AMQInternalException 
     {
-        return makeBinding(bindingKey, queue, exchange, arguments, false, false);
+        return makeBinding(null, bindingKey, queue, exchange, arguments, false, false);
     }
 
 
-    public boolean replaceBinding(final String bindingKey,
+    public boolean replaceBinding(final UUID id, final String bindingKey,
                                final AMQQueue queue,
                                final Exchange exchange,
                                final Map<String, Object> arguments) throws AMQSecurityException, AMQInternalException
     {
-        return makeBinding(bindingKey, queue, exchange, arguments, false, true);
+        return makeBinding(id, bindingKey, queue, exchange, arguments, false, true);
     }
 
-    private boolean makeBinding(String bindingKey, AMQQueue queue, Exchange exchange, Map<String, Object> arguments, boolean restore, boolean force) throws AMQSecurityException, AMQInternalException
+    private boolean makeBinding(UUID id, String bindingKey, AMQQueue queue, Exchange exchange, Map<String, Object> arguments, boolean restore, boolean force) throws AMQSecurityException, AMQInternalException
     {
         assert queue != null;
+        final Exchange defaultExchange = _virtualHost.getExchangeRegistry().getDefaultExchange();
+
         if (bindingKey == null)
         {
             bindingKey = "";
         }
         if (exchange == null)
         {
-            exchange = _defaultExchange;
+            exchange = defaultExchange;
         }
         if (arguments == null)
         {
             arguments = Collections.emptyMap();
         }
 
+        if (exchange == null)
+        {
+            throw new IllegalArgumentException("exchange cannot be null");
+        }
+
         // The default exchange bindings must reflect the existence of queues, allow
         // all operations on it to succeed. It is up to the broker to prevent illegal
         // attempts at binding to this exchange, not the ACLs.
-        if(exchange != _defaultExchange)
+        if(exchange != defaultExchange)
         {
             //Perform ACLs
-            if (!getVirtualHost().getSecurityManager().authoriseBind(exchange, queue, new AMQShortString(bindingKey)))
+            if (!_virtualHost.getSecurityManager().authoriseBind(exchange, queue, new AMQShortString(bindingKey)))
             {
                 throw new AMQSecurityException("Permission denied: binding " + bindingKey);
             }
         }
-        
-        BindingImpl b = new BindingImpl(bindingKey,queue,exchange,arguments);
-        BindingImpl existingMapping = _bindings.putIfAbsent(b,b);
+
+        if (id == null)
+        {
+            id = UUIDGenerator.generateUUID();
+        }
+        BindingImpl b = new BindingImpl(id, bindingKey, queue, exchange, arguments);
+        BindingImpl existingMapping = _bindings.putIfAbsent(b, b);
         if (existingMapping == null || force)
         {
             if (existingMapping != null)
@@ -192,7 +179,7 @@ public class BindingFactory
 
             if (b.isDurable() && !restore)
             {
-                _configSource.getDurableConfigurationStore().bindQueue(exchange,new AMQShortString(bindingKey),queue,FieldTable.convertToFieldTable(arguments));
+                _virtualHost.getMessageStore().bindQueue(b);
             }
 
             queue.addQueueDeleteTask(b);
@@ -212,12 +199,12 @@ public class BindingFactory
 
     private ConfigStore getConfigStore()
     {
-        return getVirtualHost().getConfigStore();
+        return _virtualHost.getConfigStore();
     }
 
-    public void restoreBinding(final String bindingKey, final AMQQueue queue, final Exchange exchange, final Map<String, Object> argumentMap) throws AMQSecurityException, AMQInternalException
+    public void restoreBinding(final UUID id, final String bindingKey, final AMQQueue queue, final Exchange exchange, final Map<String, Object> argumentMap) throws AMQSecurityException, AMQInternalException
     {
-        makeBinding(bindingKey,queue,exchange,argumentMap,true, false);
+        makeBinding(id, bindingKey,queue,exchange,argumentMap,true, false);
     }
 
     public void removeBinding(final Binding b) throws AMQSecurityException, AMQInternalException
@@ -229,13 +216,15 @@ public class BindingFactory
     public Binding removeBinding(String bindingKey, AMQQueue queue, Exchange exchange, Map<String, Object> arguments) throws AMQSecurityException, AMQInternalException
     {
         assert queue != null;
+        final Exchange defaultExchange = _virtualHost.getExchangeRegistry().getDefaultExchange();
+
         if (bindingKey == null)
         {
             bindingKey = "";
         }
         if (exchange == null)
         {
-            exchange = _defaultExchange;
+            exchange = defaultExchange;
         }
         if (arguments == null)
         {
@@ -245,16 +234,16 @@ public class BindingFactory
         // The default exchange bindings must reflect the existence of queues, allow
         // all operations on it to succeed. It is up to the broker to prevent illegal
         // attempts at binding to this exchange, not the ACLs.
-        if(exchange != _defaultExchange)
+        if(exchange != defaultExchange)
         {
             // Check access
-            if (!getVirtualHost().getSecurityManager().authoriseUnbind(exchange, new AMQShortString(bindingKey), queue))
+            if (!_virtualHost.getSecurityManager().authoriseUnbind(exchange, new AMQShortString(bindingKey), queue))
             {
                 throw new AMQSecurityException("Permission denied: unbinding " + bindingKey);
             }
         }
         
-        BindingImpl b = _bindings.remove(new BindingImpl(bindingKey,queue,exchange,arguments));
+        BindingImpl b = _bindings.remove(new BindingImpl(null, bindingKey,queue,exchange,arguments));
 
         if (b != null)
         {
@@ -265,10 +254,7 @@ public class BindingFactory
 
             if (b.isDurable())
             {
-                _configSource.getDurableConfigurationStore().unbindQueue(exchange,
-                                         new AMQShortString(bindingKey),
-                                         queue,
-                                         FieldTable.convertToFieldTable(arguments));
+                _virtualHost.getMessageStore().unbindQueue(b);
             }
             b.logDestruction();
             getConfigStore().removeConfiguredObject(b);
@@ -280,20 +266,22 @@ public class BindingFactory
     public Binding getBinding(String bindingKey, AMQQueue queue, Exchange exchange, Map<String, Object> arguments)
     {
         assert queue != null;
+        final Exchange defaultExchange = _virtualHost.getExchangeRegistry().getDefaultExchange();
+
         if(bindingKey == null)
         {
             bindingKey = "";
         }
         if(exchange == null)
         {
-            exchange = _defaultExchange;
+            exchange = defaultExchange;
         }
         if(arguments == null)
         {
             arguments = Collections.emptyMap();
         }
 
-        BindingImpl b = new BindingImpl(bindingKey,queue,exchange,arguments);
+        BindingImpl b = new BindingImpl(null, bindingKey,queue,exchange,arguments);
         return _bindings.get(b);
     }
 }

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java Wed May  2 13:09:18 2012
@@ -88,6 +88,7 @@ public class ServerConfiguration extends
     public static final String MGMT_JMXPORT_CONNECTORSERVER = "management.jmxport.connectorServer";
     public static final String STATUS_UPDATES = "status-updates";
     public static final String ADVANCED_LOCALE = "advanced.locale";
+    public static final String CONNECTOR_AMQP10ENABLED = "connector.amqp10enabled";
     public static final String CONNECTOR_AMQP010ENABLED = "connector.amqp010enabled";
     public static final String CONNECTOR_AMQP091ENABLED = "connector.amqp091enabled";
     public static final String CONNECTOR_AMQP09ENABLED = "connector.amqp09enabled";
@@ -667,6 +668,11 @@ public class ServerConfiguration extends
         return getListValue("connector.port", Collections.<Integer>singletonList(DEFAULT_PORT));
     }
 
+    public List getPortExclude10()
+    {
+        return getListValue("connector.non10port");
+    }
+
     public List getPortExclude010()
     {
         return getListValue("connector.non010port");
@@ -843,6 +849,11 @@ public class ServerConfiguration extends
         return getConfig().getString("deadLetterQueueSuffix", AMQQueueFactory.DEFAULT_DLQ_NAME_SUFFIX);
     }
 
+    public boolean isAmqp10enabled()
+    {
+        return getConfig().getBoolean(CONNECTOR_AMQP10ENABLED, true);
+    }
+
     public boolean isAmqp010enabled()
     {
         return getConfig().getBoolean(CONNECTOR_AMQP010ENABLED, true);

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java Wed May  2 13:09:18 2012
@@ -32,6 +32,7 @@ import org.apache.qpid.server.configurat
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.store.MemoryMessageStore;
+import org.apache.qpid.server.store.MemoryMessageStoreFactory;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -102,14 +103,14 @@ public class VirtualHostConfiguration ex
         return getConfig().subset("store");
     }
 
-    public String getMessageStoreClass()
+    public String getMessageStoreFactoryClass()
     {
-        return getStringValue("store.class", MemoryMessageStore.class.getName());
+        return getStringValue("store.factoryclass", MemoryMessageStoreFactory.class.getName());
     }
 
-    public void setMessageStoreClass(String storeClass)
+    public void setMessageStoreFactoryClass(String storeFactoryClass)
     {
-        getConfig().setProperty("store.class", storeClass);
+        getConfig().setProperty("store.factoryclass", storeFactoryClass);
     }
 
     public List getExchanges()

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java Wed May  2 13:09:18 2012
@@ -46,11 +46,19 @@ public class ConnectionRegistry implemen
     /** Close all of the currently open connections. */
     public void close()
     {
-        _logger.debug("Closing connection registry :" + _registry.size() + " connections.");
+        close(IConnectionRegistry.BROKER_SHUTDOWN_REPLY_TEXT);
+    }
+
+    public void close(final String replyText)
+    {
+        if (_logger.isDebugEnabled())
+        {
+            _logger.debug("Closing connection registry :" + _registry.size() + " connections.");
+        }
         while (!_registry.isEmpty())
         {
             AMQConnectionModel connection = _registry.get(0);
-            closeConnection(connection, AMQConstant.CONNECTION_FORCED, "Broker is shutting down");
+            closeConnection(connection, AMQConstant.CONNECTION_FORCED, replyText);
         }
     }
 

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java Wed May  2 13:09:18 2012
@@ -28,12 +28,17 @@ import java.util.List;
 
 public interface IConnectionRegistry
 {
+    public static final String BROKER_SHUTDOWN_REPLY_TEXT = "Broker is shutting down";
+    public static final String VHOST_PASSIVATE_REPLY_TEXT = "Virtual host is being passivated";
+
     public void initialise();
 
     public void close() throws AMQException;
-    
+
+    public void close(String replyText) throws AMQException;
+
     public void closeConnection(AMQConnectionModel connection, AMQConstant cause, String message);
-    
+
     public List<AMQConnectionModel> getConnections();
 
     public void registerConnection(AMQConnectionModel connnection);

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java Wed May  2 13:09:18 2012
@@ -20,8 +20,6 @@
  */
 package org.apache.qpid.server.exchange;
 
-import org.apache.log4j.Logger;
-
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.binding.Binding;
@@ -116,7 +114,7 @@ public abstract class AbstractExchange i
      */
     protected abstract AbstractExchangeMBean createMBean() throws JMException;
 
-    public void initialise(VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
+    public void initialise(UUID id, VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
             throws AMQException
     {
         _virtualHost = host;
@@ -125,10 +123,18 @@ public abstract class AbstractExchange i
         _autoDelete = autoDelete;
         _ticket = ticket;
 
-        // TODO - fix
-        _id = getConfigStore().createId();
+        _id = id;
 
         getConfigStore().addConfiguredObject(this);
+        createAndRegisterMBean();
+        _logSubject = new ExchangeLogSubject(this, this.getVirtualHost());
+
+        // Log Exchange creation
+        CurrentActor.get().message(ExchangeMessages.CREATED(String.valueOf(getTypeShortString()), String.valueOf(name), durable));
+    }
+
+    private void createAndRegisterMBean()
+    {
         try
         {
             _exchangeMbean = createMBean();
@@ -136,12 +142,8 @@ public abstract class AbstractExchange i
         }
         catch (JMException e)
         {
-            getLogger().error(e);
+            throw new RuntimeException("Failed to register mbean",e);
         }
-        _logSubject = new ExchangeLogSubject(this, this.getVirtualHost());
-
-        // Log Exchange creation
-        CurrentActor.get().message(ExchangeMessages.CREATED(String.valueOf(getTypeShortString()), String.valueOf(name), durable));
     }
 
     public ConfigStore getConfigStore()
@@ -149,8 +151,6 @@ public abstract class AbstractExchange i
         return getVirtualHost().getConfigStore();
     }
 
-    public abstract Logger getLogger();
-
     public boolean isDurable()
     {
         return _durable;
@@ -324,8 +324,7 @@ public abstract class AbstractExchange i
 
     public Map<String, Object> getArguments()
     {
-        // TODO - Fix
-        return Collections.EMPTY_MAP;
+        return Collections.emptyMap();
     }
 
     public UUID getId()

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeFactory.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeFactory.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeFactory.java Wed May  2 13:09:18 2012
@@ -25,9 +25,11 @@ import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.AMQSecurityException;
 import org.apache.qpid.AMQUnknownExchangeType;
+import org.apache.qpid.exchange.ExchangeDefaults;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.qmf.ManagementExchange;
 import org.apache.qpid.server.configuration.VirtualHostConfiguration;
+import org.apache.qpid.server.model.UUIDGenerator;
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
@@ -35,6 +37,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.UUID;
 
 public class DefaultExchangeFactory implements ExchangeFactory
 {
@@ -76,17 +79,29 @@ public class DefaultExchangeFactory impl
         
         return publicTypes;
     }
-    
-    
 
     public Exchange createExchange(String exchange, String type, boolean durable, boolean autoDelete)
-            throws AMQException
+    throws AMQException
     {
         return createExchange(new AMQShortString(exchange), new AMQShortString(type), durable, autoDelete, 0);
     }
 
-    public Exchange createExchange(AMQShortString exchange, AMQShortString type, boolean durable, boolean autoDelete,
-                                   int ticket)
+    public Exchange createExchange(UUID id, String exchange, String type, boolean durable, boolean autoDelete)
+            throws AMQException
+    {
+        return createExchange(id, new AMQShortString(exchange), new AMQShortString(type), durable, autoDelete, 0);
+    }
+
+    public Exchange createExchange(AMQShortString exchange, AMQShortString type, boolean durable,
+                                   boolean autoDelete, int ticket)
+            throws AMQException
+    {
+        UUID id = UUIDGenerator.generateExchangeUUID(exchange.asString(), _host.getName());
+        return createExchange(id, exchange, type, durable, autoDelete, ticket);
+    }
+
+    public Exchange createExchange(UUID id, AMQShortString exchange, AMQShortString type, boolean durable,
+                                   boolean autoDelete, int ticket)
             throws AMQException
     {
         // Check access
@@ -102,7 +117,7 @@ public class DefaultExchangeFactory impl
             throw new AMQUnknownExchangeType("Unknown exchange type: " + type,null);
         }
         
-        Exchange e = exchType.newInstance(_host, exchange, durable, ticket, autoDelete);
+        Exchange e = exchType.newInstance(id, _host, exchange, durable, ticket, autoDelete);
         return e;
     }
 

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeRegistry.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeRegistry.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeRegistry.java Wed May  2 13:09:18 2012
@@ -21,7 +21,6 @@
 package org.apache.qpid.server.exchange;
 
 import org.apache.log4j.Logger;
-
 import org.apache.qpid.AMQException;
 import org.apache.qpid.AMQSecurityException;
 import org.apache.qpid.exchange.ExchangeDefaults;
@@ -31,12 +30,13 @@ import org.apache.qpid.server.store.Dura
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
 import java.util.Collection;
+import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
 public class DefaultExchangeRegistry implements ExchangeRegistry
 {
-    private static final Logger _log = Logger.getLogger(DefaultExchangeRegistry.class);
+    private static final Logger LOGGER = Logger.getLogger(DefaultExchangeRegistry.class);
 
     /**
      * Maps from exchange name to exchange instance
@@ -59,11 +59,9 @@ public class DefaultExchangeRegistry imp
         new ExchangeInitialiser().initialise(_host.getExchangeFactory(), this, getDurableConfigurationStore());
     }
 
-
-
     public DurableConfigurationStore getDurableConfigurationStore()
     {
-        return _host.getDurableConfigurationStore();
+        return _host.getMessageStore();
     }
 
     public void registerExchange(Exchange exchange) throws AMQException
@@ -153,4 +151,49 @@ public class DefaultExchangeRegistry imp
         }
     }
 
+    @Override
+    public void clearAndUnregisterMbeans()
+    {
+        for (final AMQShortString exchangeName : getExchangeNames())
+        {
+            final Exchange exchange = getExchange(exchangeName);
+
+            if (exchange instanceof AbstractExchange)
+            {
+                AbstractExchange abstractExchange = (AbstractExchange) exchange;
+                try
+                {
+                    abstractExchange.getManagedObject().unregister();
+                }
+                catch (AMQException e)
+                {
+                    LOGGER.warn("Failed to unregister mbean", e);
+                }
+            }
+        }
+        _exchangeMap.clear();
+        _exchangeMapStr.clear();
+    }
+
+    @Override
+    public synchronized Exchange getExchange(UUID exchangeId)
+    {
+        if (exchangeId == null)
+        {
+            return getDefaultExchange();
+        }
+        else
+        {
+            Collection<Exchange> exchanges = _exchangeMap.values();
+            for (Exchange exchange : exchanges)
+            {
+                if (exchange.getId().equals(exchangeId))
+                {
+                    return exchange;
+                }
+            }
+            return null;
+        }
+    }
+
 }

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java Wed May  2 13:09:18 2012
@@ -36,6 +36,7 @@ import javax.management.JMException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArraySet;
 
@@ -103,14 +104,14 @@ public class DirectExchange extends Abst
             return DirectExchange.class;
         }
 
-        public DirectExchange newInstance(VirtualHost host,
+        public DirectExchange newInstance(UUID id, VirtualHost host,
                                             AMQShortString name,
                                             boolean durable,
                                             int ticket,
                                             boolean autoDelete) throws AMQException
         {
             DirectExchange exch = new DirectExchange();
-            exch.initialise(host,name,durable,ticket,autoDelete);
+            exch.initialise(id, host,name,durable,ticket,autoDelete);
             return exch;
         }
 
@@ -131,12 +132,6 @@ public class DirectExchange extends Abst
         return new DirectExchangeMBean(this);
     }
 
-    public Logger getLogger()
-    {
-        return _logger;
-    }
-
-
     public List<? extends BaseQueue> doRoute(InboundMessage payload)
     {
 

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java Wed May  2 13:09:18 2012
@@ -36,6 +36,7 @@ import javax.management.JMException;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.UUID;
 
 public interface Exchange extends ExchangeReferrer, ExchangeConfig
 {
@@ -50,7 +51,7 @@ public interface Exchange extends Exchan
 
     AMQShortString getTypeShortString();
 
-    void initialise(VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
+    void initialise(UUID id, VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
             throws AMQException, JMException;
 
     boolean isDurable();

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeFactory.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeFactory.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeFactory.java Wed May  2 13:09:18 2012
@@ -25,6 +25,7 @@ import org.apache.qpid.framing.AMQShortS
 import org.apache.qpid.server.configuration.VirtualHostConfiguration;
 
 import java.util.Collection;
+import java.util.UUID;
 
 
 public interface ExchangeFactory
@@ -40,4 +41,10 @@ public interface ExchangeFactory
     Collection<ExchangeType<? extends Exchange>> getPublicCreatableTypes();
 
     Exchange createExchange(String exchange, String type, boolean durable, boolean autoDelete) throws AMQException;
+
+    Exchange createExchange(UUID id, String exchange, String type, boolean durable, boolean autoDelete) throws AMQException;
+
+    Exchange createExchange(UUID id, AMQShortString exchange, AMQShortString type, boolean durable,
+                            boolean autoDelete, int ticket)
+            throws AMQException;
 }

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeInitialiser.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeInitialiser.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeInitialiser.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeInitialiser.java Wed May  2 13:09:18 2012
@@ -20,6 +20,7 @@
  */
 package org.apache.qpid.server.exchange;
 
+
 import org.apache.qpid.AMQException;
 import org.apache.qpid.exchange.ExchangeDefaults;
 import org.apache.qpid.framing.AMQShortString;
@@ -27,7 +28,8 @@ import org.apache.qpid.server.store.Dura
 
 public class ExchangeInitialiser
 {
-    public void initialise(ExchangeFactory factory, ExchangeRegistry registry, DurableConfigurationStore store) throws AMQException{
+    public void initialise(ExchangeFactory factory, ExchangeRegistry registry, DurableConfigurationStore store) throws AMQException
+    {
         for (ExchangeType<? extends Exchange> type : factory.getRegisteredTypes())
         {
             define (registry, factory, type.getDefaultExchangeName(), type.getName(), store);
@@ -44,7 +46,6 @@ public class ExchangeInitialiser
         {
             Exchange exchange = f.createExchange(name, type, true, false, 0);
             r.registerExchange(exchange);
-
             if(exchange.isDurable())
             {
                 store.createExchange(exchange);

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeRegistry.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeRegistry.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeRegistry.java Wed May  2 13:09:18 2012
@@ -24,6 +24,7 @@ import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
 
 import java.util.Collection;
+import java.util.UUID;
 
 
 public interface ExchangeRegistry
@@ -51,5 +52,9 @@ public interface ExchangeRegistry
 
     Exchange getExchange(String exchangeName);
 
-    void unregisterExchange(String exchange, boolean ifUnused)  throws ExchangeInUseException, AMQException;;
+    void unregisterExchange(String exchange, boolean ifUnused)  throws ExchangeInUseException, AMQException;
+
+    void clearAndUnregisterMbeans();
+
+    Exchange getExchange(UUID exchangeId);
 }

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeType.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeType.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeType.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeType.java Wed May  2 13:09:18 2012
@@ -20,6 +20,8 @@
  */
 package org.apache.qpid.server.exchange;
 
+import java.util.UUID;
+
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.virtualhost.VirtualHost;
@@ -29,7 +31,7 @@ public interface ExchangeType<T extends 
 {
     public AMQShortString getName();
     public Class<T> getExchangeClass();
-    public T newInstance(VirtualHost host, AMQShortString name,
+    public T newInstance(UUID id, VirtualHost host, AMQShortString name,
                          boolean durable, int ticket, boolean autoDelete) throws AMQException;
     public AMQShortString getDefaultExchangeName();
 }

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java Wed May  2 13:09:18 2012
@@ -34,6 +34,7 @@ import org.apache.qpid.server.virtualhos
 
 import javax.management.JMException;
 import java.util.ArrayList;
+import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 
 public class FanoutExchange extends AbstractExchange
@@ -52,11 +53,6 @@ public class FanoutExchange extends Abst
         return new FanoutExchangeMBean(this);
     }
 
-    public Logger getLogger()
-    {
-        return _logger;
-    }
-
     public static final ExchangeType<FanoutExchange> TYPE = new ExchangeType<FanoutExchange>()
     {
 
@@ -70,14 +66,14 @@ public class FanoutExchange extends Abst
     		return FanoutExchange.class;
     	}
 
-    	public FanoutExchange newInstance(VirtualHost host,
+        public FanoutExchange newInstance(UUID id, VirtualHost host,
     									  AMQShortString name,
     									  boolean durable,
     									  int ticket,
     									  boolean autoDelete) throws AMQException
     	{
     		FanoutExchange exch = new FanoutExchange();
-    		exch.initialise(host, name, durable, ticket, autoDelete);
+            exch.initialise(id, host, name, durable, ticket, autoDelete);
     		return exch;
     	}
 

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java Wed May  2 13:09:18 2012
@@ -37,6 +37,7 @@ import javax.management.JMException;
 import java.util.ArrayList;
 import java.util.LinkedHashSet;
 import java.util.Map;
+import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CopyOnWriteArraySet;
@@ -93,12 +94,12 @@ public class HeadersExchange extends Abs
             return HeadersExchange.class;
         }
 
-        public HeadersExchange newInstance(VirtualHost host, AMQShortString name, boolean durable, int ticket,
+        public HeadersExchange newInstance(UUID id, VirtualHost host, AMQShortString name, boolean durable, int ticket,
                 boolean autoDelete) throws AMQException
         {
             HeadersExchange exch = new HeadersExchange();
 
-            exch.initialise(host, name, durable, ticket, autoDelete);
+            exch.initialise(id, host, name, durable, ticket, autoDelete);
             return exch;
         }
 
@@ -231,11 +232,6 @@ public class HeadersExchange extends Abs
         return new HeadersExchangeMBean(this);
     }
 
-    public Logger getLogger()
-    {
-        return _logger;
-    }
-
     protected void onBind(final Binding binding)
     {
         String bindingKey = binding.getBindingKey();

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java Wed May  2 13:09:18 2012
@@ -27,6 +27,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
+import java.util.UUID;
 import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentHashMap;
 import javax.management.JMException;
@@ -70,14 +71,14 @@ public class TopicExchange extends Abstr
             return TopicExchange.class;
         }
 
-        public TopicExchange newInstance(VirtualHost host,
+        public TopicExchange newInstance(UUID id, VirtualHost host,
                                             AMQShortString name,
                                             boolean durable,
                                             int ticket,
                                             boolean autoDelete) throws AMQException
         {
             TopicExchange exch = new TopicExchange();
-            exch.initialise(host, name, durable, ticket, autoDelete);
+            exch.initialise(id, host, name, durable, ticket, autoDelete);
             return exch;
         }
 
@@ -407,11 +408,6 @@ public class TopicExchange extends Abstr
         return new TopicExchangeMBean(this);
     }
 
-    public Logger getLogger()
-    {
-        return _logger;
-    }
-
     private Collection<AMQQueue> getMatchedQueues(InboundMessage message, AMQShortString routingKey)
     {
 

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java Wed May  2 13:09:18 2012
@@ -132,7 +132,7 @@ public class Bridge implements BridgeCon
         {
             try
             {
-                brokerLink.getVirtualHost().getDurableConfigurationStore().createBridge(this);
+                brokerLink.getVirtualHost().getMessageStore().createBridge(this);
             }
             catch (AMQStoreException e)
             {
@@ -220,7 +220,7 @@ public class Bridge implements BridgeCon
         {
             try
             {
-                brokerLink.getVirtualHost().getDurableConfigurationStore().createBridge(this);
+                brokerLink.getVirtualHost().getMessageStore().createBridge(this);
             }
             catch (AMQStoreException e)
             {
@@ -767,13 +767,13 @@ public class Bridge implements BridgeCon
 
             try
             {
-                _queue = AMQQueueFactory.createAMQQueueImpl(_tmpQueueName,
+                _queue = AMQQueueFactory.createAMQQueueImpl(null,
+                                                        _tmpQueueName,
                                                         isDurable(),
                                                         _link.getFederationTag(),
                                                         false,
                                                         false,
-                                                        getVirtualHost(),
-                                                        options);
+                                                        getVirtualHost(), options);
             }
             catch (AMQException e)
             {

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java Wed May  2 13:09:18 2012
@@ -250,7 +250,7 @@ public class BrokerLink implements LinkC
         {
             try
             {
-                _virtualHost.getDurableConfigurationStore().createBrokerLink(this);
+                _virtualHost.getMessageStore().createBrokerLink(this);
             }
             catch (AMQStoreException e)
             {
@@ -295,7 +295,7 @@ public class BrokerLink implements LinkC
         {
             try
             {
-                _virtualHost.getDurableConfigurationStore().createBrokerLink(this);
+                _virtualHost.getMessageStore().createBrokerLink(this);
             }
             catch (AMQStoreException e)
             {

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/SimpleFilterManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/SimpleFilterManager.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/SimpleFilterManager.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/SimpleFilterManager.java Wed May  2 13:09:18 2012
@@ -39,6 +39,12 @@ public class SimpleFilterManager impleme
         _filters = new ConcurrentLinkedQueue<MessageFilter>();
     }
 
+    public SimpleFilterManager(JMSSelectorFilter messageFilter)
+    {
+        this();
+        add(messageFilter);
+    }
+
     public void add(MessageFilter filter)
     {
         _filters.add(filter);

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionOpenMethodHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionOpenMethodHandler.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionOpenMethodHandler.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionOpenMethodHandler.java Wed May  2 13:09:18 2012
@@ -32,6 +32,7 @@ import org.apache.qpid.server.protocol.A
 import org.apache.qpid.server.state.AMQState;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
+import org.apache.qpid.server.virtualhost.State;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
 public class ConnectionOpenMethodHandler implements StateAwareMethodListener<ConnectionOpenBody>
@@ -82,6 +83,10 @@ public class ConnectionOpenMethodHandler
             {
                 throw body.getConnectionException(AMQConstant.ACCESS_REFUSED, "Permission denied: '" + virtualHost.getName() + "'");
             }
+            else if (virtualHost.getState() != State.ACTIVE)
+            {
+                throw body.getConnectionException(AMQConstant.CONNECTION_FORCED, "Virtual host '" + virtualHost.getName() + "' is not active");
+            }
 
             session.setVirtualHost(virtualHost);
 
@@ -89,10 +94,10 @@ public class ConnectionOpenMethodHandler
             if (session.getContextKey() == null)
             {
                 session.setContextKey(generateClientID());
-            }            
+            }
 
             MethodRegistry methodRegistry = session.getMethodRegistry();
-            AMQMethodBody responseBody =  methodRegistry.createConnectionOpenOkBody(body.getVirtualHost());            
+            AMQMethodBody responseBody =  methodRegistry.createConnectionOpenOkBody(body.getVirtualHost());
 
             stateManager.changeState(AMQState.CONNECTION_OPEN);
 

Modified: qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeclareHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeclareHandler.java?rev=1333027&r1=1333026&r2=1333027&view=diff
==============================================================================
--- qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeclareHandler.java (original)
+++ qpid/branches/qpid-3767/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeclareHandler.java Wed May  2 13:09:18 2012
@@ -106,7 +106,7 @@ public class ExchangeDeclareHandler impl
 
                         if (exchange.isDurable())
                         {
-                            virtualHost.getDurableConfigurationStore().createExchange(exchange);
+                            virtualHost.getMessageStore().createExchange(exchange);
                         }
                     }
                     catch(AMQUnknownExchangeType e)



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


Mime
View raw message