qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject svn commit: r1416596 - in /qpid/branches/java-broker-config-qpid-4390/qpid/java: broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/ broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/acce...
Date Mon, 03 Dec 2012 17:16:20 GMT
Author: orudyy
Date: Mon Dec  3 17:16:15 2012
New Revision: 1416596

URL: http://svn.apache.org/viewvc?rev=1416596&view=rev
Log:
QPID-4390: Move SecurityManager into BrokerAdapter and refactor the AccessControlFactory to not use Configuration

Modified:
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/AbstractConfiguration.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/ConfigurationFile.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProvider.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/VirtualHostRecoverer.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/XMLConfigurationEntryStore.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/AccessControlFactory.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactoryTest.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
    qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/AbstractConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/AbstractConfiguration.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/AbstractConfiguration.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/AbstractConfiguration.java Mon Dec  3 17:16:15 2012
@@ -22,8 +22,6 @@ package org.apache.qpid.server.security.
 
 import java.io.File;
 
-import org.apache.commons.configuration.ConfigurationException;
-
 public abstract class AbstractConfiguration implements ConfigurationFile
 {
     private File _file;
@@ -39,7 +37,7 @@ public abstract class AbstractConfigurat
         return _file;
     }
     
-    public RuleSet load() throws ConfigurationException
+    public RuleSet load()
     {
         _config = new RuleSet();
         return _config;

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/ConfigurationFile.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/ConfigurationFile.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/ConfigurationFile.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/ConfigurationFile.java Mon Dec  3 17:16:15 2012
@@ -22,7 +22,7 @@ package org.apache.qpid.server.security.
 
 import java.io.File;
 
-import org.apache.commons.configuration.ConfigurationException;
+import org.apache.qpid.server.configuration.IllegalConfigurationException;
 
 public interface ConfigurationFile
 {
@@ -33,19 +33,17 @@ public interface ConfigurationFile
     
     /**
      * Load this configuration file's contents into a {@link RuleSet}.
-     * 
-     * @throws ConfigurationException if the configuration file has errors.
+     * @throws IllegalConfigurationException if the configuration file has errors.
      * @throws IllegalArgumentException if individual tokens cannot be parsed.
      */
-    RuleSet load() throws ConfigurationException;
+    RuleSet load() throws IllegalConfigurationException;
     
     /**
      * Reload this configuration file's contents.
-     * 
-     * @throws ConfigurationException if the configuration file has errors.
+     * @throws IllegalConfigurationException if the configuration file has errors.
      * @throws IllegalArgumentException if individual tokens cannot be parsed.
      */
-    RuleSet reload() throws ConfigurationException;
+    RuleSet reload() throws IllegalConfigurationException;
         
     RuleSet getConfiguration();
     

Modified: qpid/branches/java-broker-config-qpid-4390/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/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java Mon Dec  3 17:16:15 2012
@@ -32,9 +32,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Stack;
 
-import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
+import org.apache.qpid.server.configuration.IllegalConfigurationException;
 import org.apache.qpid.server.security.access.ObjectType;
 import org.apache.qpid.server.security.access.Operation;
 import org.apache.qpid.server.security.access.Permission;
@@ -73,7 +73,7 @@ public class PlainConfiguration extends 
     }
 
     @Override
-    public RuleSet load() throws ConfigurationException
+    public RuleSet load()
     {
         RuleSet ruleSet = super.load();
 
@@ -127,7 +127,7 @@ public class PlainConfiguration extends 
                         stack.removeElementAt(0);
                         if (stack.isEmpty())
                         {
-                            throw new ConfigurationException(String.format(NOT_ENOUGH_TOKENS_MSG, getLine()));
+                            throw new IllegalConfigurationException(String.format(NOT_ENOUGH_TOKENS_MSG, getLine()));
                         }
 
                         // check for and parse optional initial number for ACL lines
@@ -148,7 +148,7 @@ public class PlainConfiguration extends 
                         {
                             if(StringUtils.equalsIgnoreCase("GROUP", first))
                             {
-                                throw new ConfigurationException(String.format("GROUP keyword not supported. Groups should defined via a Group Provider, not in the ACL file.", getLine()));
+                                throw new IllegalConfigurationException(String.format("GROUP keyword not supported. Groups should defined via a Group Provider, not in the ACL file.", getLine()));
                             }
                             else if (StringUtils.equalsIgnoreCase(CONFIG, first))
                             {
@@ -156,12 +156,12 @@ public class PlainConfiguration extends 
                             }
                             else
                             {
-                                throw new ConfigurationException(String.format(UNRECOGNISED_INITIAL_MSG, first, getLine()));
+                                throw new IllegalConfigurationException(String.format(UNRECOGNISED_INITIAL_MSG, first, getLine()));
                             }
                         }
                         else
                         {
-                            throw new ConfigurationException(String.format(NUMBER_NOT_ALLOWED_MSG, first, getLine()));
+                            throw new IllegalConfigurationException(String.format(NUMBER_NOT_ALLOWED_MSG, first, getLine()));
                         }
 
                         // reset stack, start next line
@@ -183,7 +183,7 @@ public class PlainConfiguration extends 
                             }
 
                             // invalid location for continuation character (add one to line beacuse we ate the EOL)
-                            throw new ConfigurationException(String.format(PREMATURE_CONTINUATION_MSG, getLine() + 1));
+                            throw new IllegalConfigurationException(String.format(PREMATURE_CONTINUATION_MSG, getLine() + 1));
                         }
                         else if (_st.ttype == '\'' || _st.ttype == '"')
                         {
@@ -198,20 +198,20 @@ public class PlainConfiguration extends 
 
             if (!stack.isEmpty())
             {
-                throw new ConfigurationException(String.format(PREMATURE_EOF_MSG, getLine()));
+                throw new IllegalConfigurationException(String.format(PREMATURE_EOF_MSG, getLine()));
             }
         }
         catch (IllegalArgumentException iae)
         {
-            throw new ConfigurationException(String.format(PARSE_TOKEN_FAILED_MSG, getLine()), iae);
+            throw new IllegalConfigurationException(String.format(PARSE_TOKEN_FAILED_MSG, getLine()), iae);
         }
         catch (FileNotFoundException fnfe)
         {
-            throw new ConfigurationException(String.format(CONFIG_NOT_FOUND_MSG, file.getName()), fnfe);
+            throw new IllegalConfigurationException(String.format(CONFIG_NOT_FOUND_MSG, file.getName()), fnfe);
         }
         catch (IOException ioe)
         {
-            throw new ConfigurationException(String.format(CANNOT_LOAD_MSG, file.getName()), ioe);
+            throw new IllegalConfigurationException(String.format(CANNOT_LOAD_MSG, file.getName()), ioe);
         }
         finally
         {
@@ -223,7 +223,7 @@ public class PlainConfiguration extends 
                 }
                 catch (IOException e)
                 {
-                    throw new ConfigurationException(String.format(CANNOT_CLOSE_MSG, file.getName()), e);
+                    throw new IllegalConfigurationException(String.format(CANNOT_CLOSE_MSG, file.getName()), e);
                 }
             }
         }
@@ -232,11 +232,11 @@ public class PlainConfiguration extends 
         return ruleSet;
     }
 
-    private void parseAcl(Integer number, List<String> args) throws ConfigurationException
+    private void parseAcl(Integer number, List<String> args)
     {
         if (args.size() < 3)
         {
-            throw new ConfigurationException(String.format(NOT_ENOUGH_ACL_MSG, getLine()));
+            throw new IllegalConfigurationException(String.format(NOT_ENOUGH_ACL_MSG, getLine()));
         }
 
         Permission permission = Permission.parse(args.get(0));
@@ -245,7 +245,7 @@ public class PlainConfiguration extends 
 
         if (number != null && !getConfiguration().isValidNumber(number))
         {
-            throw new ConfigurationException(String.format(BAD_ACL_RULE_NUMBER_MSG, getLine()));
+            throw new IllegalConfigurationException(String.format(BAD_ACL_RULE_NUMBER_MSG, getLine()));
         }
 
         if (args.size() == 3)
@@ -261,11 +261,11 @@ public class PlainConfiguration extends 
         }
     }
 
-    private void parseConfig(List<String> args) throws ConfigurationException
+    private void parseConfig(List<String> args)
     {
         if (args.size() < 3)
         {
-            throw new ConfigurationException(String.format(NOT_ENOUGH_CONFIG_MSG, getLine()));
+            throw new IllegalConfigurationException(String.format(NOT_ENOUGH_CONFIG_MSG, getLine()));
         }
 
         Map<String, Boolean> properties = toPluginProperties(args);
@@ -273,7 +273,7 @@ public class PlainConfiguration extends 
         getConfiguration().configure(properties);
     }
 
-    private AclRulePredicates toRulePredicates(List<String> args) throws ConfigurationException
+    private AclRulePredicates toRulePredicates(List<String> args)
     {
         AclRulePredicates predicates = new AclRulePredicates();
         Iterator<String> i = args.iterator();
@@ -282,15 +282,15 @@ public class PlainConfiguration extends 
             String key = i.next();
             if (!i.hasNext())
             {
-                throw new ConfigurationException(String.format(PROPERTY_KEY_ONLY_MSG, getLine()));
+                throw new IllegalConfigurationException(String.format(PROPERTY_KEY_ONLY_MSG, getLine()));
             }
             if (!"=".equals(i.next()))
             {
-                throw new ConfigurationException(String.format(PROPERTY_NO_EQUALS_MSG, getLine()));
+                throw new IllegalConfigurationException(String.format(PROPERTY_NO_EQUALS_MSG, getLine()));
             }
             if (!i.hasNext())
             {
-                throw new ConfigurationException(String.format(PROPERTY_NO_VALUE_MSG, getLine()));
+                throw new IllegalConfigurationException(String.format(PROPERTY_NO_VALUE_MSG, getLine()));
             }
             String value = i.next();
 
@@ -300,7 +300,7 @@ public class PlainConfiguration extends 
     }
 
     /** Converts a {@link List} of "name", "=", "value" tokens into a {@link Map}. */
-    protected Map<String, Boolean> toPluginProperties(List<String> args) throws ConfigurationException
+    protected Map<String, Boolean> toPluginProperties(List<String> args)
     {
         Map<String, Boolean> properties = new HashMap<String, Boolean>();
         Iterator<String> i = args.iterator();
@@ -309,15 +309,15 @@ public class PlainConfiguration extends 
             String key = i.next().toLowerCase();
             if (!i.hasNext())
             {
-                throw new ConfigurationException(String.format(PROPERTY_KEY_ONLY_MSG, getLine()));
+                throw new IllegalConfigurationException(String.format(PROPERTY_KEY_ONLY_MSG, getLine()));
             }
             if (!"=".equals(i.next()))
             {
-                throw new ConfigurationException(String.format(PROPERTY_NO_EQUALS_MSG, getLine()));
+                throw new IllegalConfigurationException(String.format(PROPERTY_NO_EQUALS_MSG, getLine()));
             }
             if (!i.hasNext())
             {
-                throw new ConfigurationException(String.format(PROPERTY_NO_VALUE_MSG, getLine()));
+                throw new IllegalConfigurationException(String.format(PROPERTY_NO_VALUE_MSG, getLine()));
             }
 
             // parse property value and save

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java Mon Dec  3 17:16:15 2012
@@ -45,7 +45,7 @@ public class DefaultAccessControl implem
 
     private RuleSet _ruleSet;
 
-    public DefaultAccessControl(String fileName) throws ConfigurationException
+    public DefaultAccessControl(String fileName)
     {
         if (_logger.isDebugEnabled())
         {

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java Mon Dec  3 17:16:15 2012
@@ -20,28 +20,18 @@
  */
 package org.apache.qpid.server.security.access.plugins;
 
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
 import org.apache.qpid.server.plugin.AccessControlFactory;
 import org.apache.qpid.server.security.AccessControl;
 
 public class DefaultAccessControlFactory implements AccessControlFactory
 {
-    public AccessControl createInstance(Configuration securityConfiguration)
+    public AccessControl createInstance(String aclConfiguration)
     {
-        String aclConfiguration = securityConfiguration.getString("acl");
         if(aclConfiguration == null)
         {
             return null;
         }
 
-        try
-        {
-            return new DefaultAccessControl(aclConfiguration);
-        }
-        catch (ConfigurationException e)
-        {
-            throw new RuntimeException("caught exception during instance creation", e);
-        }
+        return new DefaultAccessControl(aclConfiguration);
     }
 }

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java Mon Dec  3 17:16:15 2012
@@ -26,7 +26,7 @@ import java.util.Map;
 
 import junit.framework.TestCase;
 
-import org.apache.commons.configuration.ConfigurationException;
+import org.apache.qpid.server.configuration.IllegalConfigurationException;
 import org.apache.qpid.server.security.access.ObjectProperties;
 import org.apache.qpid.server.security.access.ObjectProperties.Property;
 import org.apache.qpid.server.security.access.ObjectType;
@@ -73,7 +73,7 @@ public class PlainConfigurationTest exte
 
             fail("fail");
         }
-        catch (ConfigurationException ce)
+        catch (IllegalConfigurationException ce)
         {
             assertEquals(String.format(PlainConfiguration.CONFIG_NOT_FOUND_MSG, "doesnotexist"), ce.getMessage());
             assertTrue(ce.getCause() instanceof FileNotFoundException);
@@ -87,7 +87,7 @@ public class PlainConfigurationTest exte
             writeACLConfig("ACL ALLOW ALL \\ ALL");
             fail("fail");
         }
-        catch (ConfigurationException ce)
+        catch (IllegalConfigurationException ce)
         {
             assertEquals(String.format(PlainConfiguration.PREMATURE_CONTINUATION_MSG, 1), ce.getMessage());
         }
@@ -100,7 +100,7 @@ public class PlainConfigurationTest exte
             writeACLConfig("ACL unparsed ALL ALL");
             fail("fail");
         }
-        catch (ConfigurationException ce)
+        catch (IllegalConfigurationException ce)
         {
             assertEquals(String.format(PlainConfiguration.PARSE_TOKEN_FAILED_MSG, 1), ce.getMessage());
             assertTrue(ce.getCause() instanceof IllegalArgumentException);
@@ -115,7 +115,7 @@ public class PlainConfigurationTest exte
             writeACLConfig("ACL ALLOW");
             fail("fail");
         }
-        catch (ConfigurationException ce)
+        catch (IllegalConfigurationException ce)
         {
             assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_ACL_MSG, 1), ce.getMessage());
         }
@@ -128,7 +128,7 @@ public class PlainConfigurationTest exte
             writeACLConfig("CONFIG");
             fail("fail");
         }
-        catch (ConfigurationException ce)
+        catch (IllegalConfigurationException ce)
         {
             assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_TOKENS_MSG, 1), ce.getMessage());
         }
@@ -141,7 +141,7 @@ public class PlainConfigurationTest exte
             writeACLConfig("INVALID");
             fail("fail");
         }
-        catch (ConfigurationException ce)
+        catch (IllegalConfigurationException ce)
         {
             assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_TOKENS_MSG, 1), ce.getMessage());
         }
@@ -154,7 +154,7 @@ public class PlainConfigurationTest exte
             writeACLConfig("ACL ALLOW adk CREATE QUEUE name");
             fail("fail");
         }
-        catch (ConfigurationException ce)
+        catch (IllegalConfigurationException ce)
         {
             assertEquals(String.format(PlainConfiguration.PROPERTY_KEY_ONLY_MSG, 1), ce.getMessage());
         }
@@ -167,7 +167,7 @@ public class PlainConfigurationTest exte
             writeACLConfig("ACL ALLOW adk CREATE QUEUE name test");
             fail("fail");
         }
-        catch (ConfigurationException ce)
+        catch (IllegalConfigurationException ce)
         {
             assertEquals(String.format(PlainConfiguration.PROPERTY_NO_EQUALS_MSG, 1), ce.getMessage());
         }
@@ -180,7 +180,7 @@ public class PlainConfigurationTest exte
             writeACLConfig("ACL ALLOW adk CREATE QUEUE name =");
             fail("fail");
         }
-        catch (ConfigurationException ce)
+        catch (IllegalConfigurationException ce)
         {
             assertEquals(String.format(PlainConfiguration.PROPERTY_NO_VALUE_MSG, 1), ce.getMessage());
         }
@@ -432,7 +432,7 @@ public class PlainConfigurationTest exte
             writeACLConfig("GROUP group1 bob alice");
             fail("Expected exception not thrown");
         }
-        catch(ConfigurationException e)
+        catch(IllegalConfigurationException e)
         {
             assertTrue(e.getMessage().contains("GROUP keyword not supported"));
         }

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProvider.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/startup/DefaultRecovererProvider.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProvider.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProvider.java Mon Dec  3 17:16:15 2012
@@ -64,7 +64,7 @@ public class DefaultRecovererProvider im
         }
         else if(VirtualHost.class.getSimpleName().equals(type))
         {
-            return new VirtualHostRecoverer(_registry.getVirtualHostRegistry(),(StatisticsGatherer)_registry, _registry.getSecurityManager());
+            return new VirtualHostRecoverer(_registry.getVirtualHostRegistry(),(StatisticsGatherer)_registry);
         }
         else if(AuthenticationProvider.class.getSimpleName().equals(type))
         {

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/VirtualHostRecoverer.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/startup/VirtualHostRecoverer.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/VirtualHostRecoverer.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/VirtualHostRecoverer.java Mon Dec  3 17:16:15 2012
@@ -36,7 +36,6 @@ import org.apache.qpid.server.configurat
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.server.model.adapter.VirtualHostAdapter;
-import org.apache.qpid.server.security.SecurityManager;
 import org.apache.qpid.server.stats.StatisticsGatherer;
 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
 
@@ -44,14 +43,12 @@ public class VirtualHostRecoverer extend
 {
     private VirtualHostRegistry _virtualHostRegistry;
     private StatisticsGatherer _statisticsGatherer;
-    private SecurityManager _securityManager;
 
-    public VirtualHostRecoverer(VirtualHostRegistry virtualHostRegistry, StatisticsGatherer statisticsGatherer, SecurityManager securityManager)
+    public VirtualHostRecoverer(VirtualHostRegistry virtualHostRegistry, StatisticsGatherer statisticsGatherer)
     {
         super();
         _virtualHostRegistry = virtualHostRegistry;
         _statisticsGatherer = statisticsGatherer;
-        _securityManager = securityManager;
     }
 
     @Override
@@ -94,7 +91,7 @@ public class VirtualHostRecoverer extend
         {
             throw new IllegalConfigurationException("Cannot create configuration for virtual host '" + name + "'");
         }
-        return new VirtualHostAdapter(entry.getId(), broker, attributes, _virtualHostRegistry, _statisticsGatherer, _securityManager,
+        return new VirtualHostAdapter(entry.getId(), broker, attributes, _virtualHostRegistry, _statisticsGatherer, broker.getSecurityManager(),
                 virtualHostConfiguration);
     }
 

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/XMLConfigurationEntryStore.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/store/XMLConfigurationEntryStore.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/XMLConfigurationEntryStore.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/XMLConfigurationEntryStore.java Mon Dec  3 17:16:15 2012
@@ -128,8 +128,8 @@ public class XMLConfigurationEntryStore 
         brokerAttributes.put(Broker.DEAD_LETTER_QUEUE_ENABLED, _serverConfiguration.isDeadLetterQueueEnabled());
         brokerAttributes.put(Broker.HOUSEKEEPING_CHECK_PERIOD, _serverConfiguration.getHousekeepingCheckPeriod());
         brokerAttributes.put(Broker.DEFAULT_VIRTUAL_HOST, _serverConfiguration.getDefaultVirtualHost());
-
         brokerAttributes.put(Broker.DEFAULT_AUTHENTICATION_PROVIDER, _serverConfiguration.getDefaultAuthenticationManager());
+        brokerAttributes.put(Broker.ACL_FILE, _serverConfiguration.getConfig().getString("security.acl"));
         ConfigurationEntry rootEntry = new ConfigurationEntry(_rootId, Broker.class.getSimpleName(), brokerAttributes,
                 Collections.unmodifiableSet(_rootChildren.keySet()), this);
 

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java Mon Dec  3 17:16:15 2012
@@ -62,6 +62,12 @@ public interface Broker extends Configur
     String DEAD_LETTER_QUEUE_ENABLED = "deadLetterQueueEnabled";
     String HOUSEKEEPING_CHECK_PERIOD = "housekeepingCheckPeriod";
 
+    /**
+     * A temporary attribute to pass the path to ACL file.
+     * TODO: It should be a part of AuthorizationProvider.
+     */
+    String ACL_FILE = "aclFile";
+
     // Attributes
     public static final Collection<String> AVAILABLE_ATTRIBUTES =
             Collections.unmodifiableList(
@@ -91,7 +97,9 @@ public interface Broker extends Configur
                               FLOW_CONTROL_RESUME_SIZE_BYTES,
                               MAXIMUM_DELIVERY_ATTEMPTS,
                               DEAD_LETTER_QUEUE_ENABLED,
-                              HOUSEKEEPING_CHECK_PERIOD));
+                              HOUSEKEEPING_CHECK_PERIOD,
+                              ACL_FILE
+                              ));
 
     //children
     Collection < VirtualHost > getVirtualHosts();

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java Mon Dec  3 17:16:15 2012
@@ -75,6 +75,7 @@ public class BrokerAdapter extends Abstr
     private AuthenticationProvider _defaultAuthenticationProvider;
 
     private final PortFactory _portFactory;
+    private final SecurityManager _securityManager;
 
     private long _maximumMessageAge;
     private long _maximumMessageCount;
@@ -87,6 +88,7 @@ public class BrokerAdapter extends Abstr
     private boolean _deadLetterQueueEnabled;
     private long _housekeepingCheckPeriod;
     private String _defaultVirtualHost;
+    private String _aclFile;
 
     public BrokerAdapter(UUID id, Map<String, Object> attributes, IApplicationRegistry instance,
             AuthenticationProviderFactory authenticationProviderFactory, PortFactory portFactory)
@@ -110,6 +112,8 @@ public class BrokerAdapter extends Abstr
         _deadLetterQueueEnabled = getBooleanAttribute(DEAD_LETTER_QUEUE_ENABLED, attributes, false);
         _housekeepingCheckPeriod = getLongAttribute(HOUSEKEEPING_CHECK_PERIOD, attributes, Long.getLong(BrokerProperties.PROPERTY_HOUSE_KEEPING_CHECK_PERIOD, BrokerProperties.DEFAULT_HOUSEKEEPING_PERIOD));
         _defaultVirtualHost = getStringAttribute(DEFAULT_VIRTUAL_HOST, attributes, null);
+        _aclFile = getStringAttribute(ACL_FILE, attributes, null);
+        _securityManager = new SecurityManager(_aclFile);
     }
 
     public Collection<VirtualHost> getVirtualHosts()
@@ -190,7 +194,7 @@ public class BrokerAdapter extends Abstr
         VirtualHostRegistry virtualHostRegistry = _applicationRegistry.getVirtualHostRegistry();
         final VirtualHostAdapter virtualHostAdapter = new VirtualHostAdapter(UUID.randomUUID(), this,
                 attributes, virtualHostRegistry, (StatisticsGatherer)_applicationRegistry,
-                _applicationRegistry.getSecurityManager(), null);
+                _securityManager, null);
 
         synchronized (_vhostAdapters)
         {
@@ -505,6 +509,10 @@ public class BrokerAdapter extends Abstr
         {
             return _housekeepingCheckPeriod;
         }
+        else if (ACL_FILE.equals(name))
+        {
+            return _aclFile;
+        }
         return super.getAttribute(name);    //TODO - Implement.
     }
 
@@ -705,7 +713,7 @@ public class BrokerAdapter extends Abstr
     @Override
     public SecurityManager getSecurityManager()
     {
-        return _applicationRegistry.getSecurityManager();
+        return _securityManager;
     }
 
     @Override

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/AccessControlFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/AccessControlFactory.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/AccessControlFactory.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/AccessControlFactory.java Mon Dec  3 17:16:15 2012
@@ -18,10 +18,9 @@
  */
 package org.apache.qpid.server.plugin;
 
-import org.apache.commons.configuration.Configuration;
 import org.apache.qpid.server.security.AccessControl;
 
 public interface AccessControlFactory
 {
-    AccessControl createInstance(Configuration securityConfig);
+    AccessControl createInstance(String aclFile);
 }

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java Mon Dec  3 17:16:15 2012
@@ -56,7 +56,6 @@ import org.apache.qpid.server.model.Brok
 import org.apache.qpid.server.model.ConfiguredObject;
 import org.apache.qpid.server.model.Port;
 import org.apache.qpid.server.model.State;
-import org.apache.qpid.server.security.SecurityManager;
 import org.apache.qpid.server.security.SubjectCreator;
 import org.apache.qpid.server.stats.StatisticsCounter;
 import org.apache.qpid.server.virtualhost.VirtualHost;
@@ -78,8 +77,6 @@ public class ApplicationRegistry impleme
 
     private final VirtualHostRegistry _virtualHostRegistry = new VirtualHostRegistry(this);
 
-    private SecurityManager _securityManager;
-
     private volatile RootMessageLogger _rootMessageLogger;
 
     private Broker _broker;
@@ -91,11 +88,6 @@ public class ApplicationRegistry impleme
 
     private ConfigurationEntryStore _store;
 
-    protected void setSecurityManager(SecurityManager securityManager)
-    {
-        _securityManager = securityManager;
-    }
-
     protected void setRootMessageLogger(RootMessageLogger rootMessageLogger)
     {
         _rootMessageLogger = rootMessageLogger;
@@ -187,7 +179,6 @@ public class ApplicationRegistry impleme
 
             // XXX hack
             ServerConfiguration configuration =  ((XMLConfigurationEntryStore)_store).getConfiguration();
-            _securityManager = new SecurityManager(configuration.getConfig());
 
             RecovererProvider provider = new DefaultRecovererProvider(this);
             ConfiguredObjectRecoverer<? extends ConfiguredObject> brokerRecoverer =  provider.getRecoverer(Broker.class.getSimpleName());
@@ -382,16 +373,12 @@ public class ApplicationRegistry impleme
         return ((XMLConfigurationEntryStore)_store).getConfiguration();
     }
 
+    @Override
     public VirtualHostRegistry getVirtualHostRegistry()
     {
         return _virtualHostRegistry;
     }
 
-    public SecurityManager getSecurityManager()
-    {
-        return _securityManager;
-    }
-
     @Override
     public SubjectCreator getSubjectCreator(SocketAddress localAddress)
     {
@@ -421,7 +408,7 @@ public class ApplicationRegistry impleme
 
     public VirtualHost createVirtualHost(final VirtualHostConfiguration vhostConfig) throws Exception
     {
-        VirtualHostImpl virtualHost = new VirtualHostImpl(this.getVirtualHostRegistry(), this, this.getSecurityManager(), vhostConfig);
+        VirtualHostImpl virtualHost = new VirtualHostImpl(this.getVirtualHostRegistry(), this, getBroker().getSecurityManager(), vhostConfig);
         _virtualHostRegistry.registerVirtualHost(virtualHost);
         return virtualHost;
     }

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java Mon Dec  3 17:16:15 2012
@@ -64,8 +64,6 @@ public interface IApplicationRegistry ex
 
     VirtualHostRegistry getVirtualHostRegistry();
 
-    SecurityManager getSecurityManager();
-
     RootMessageLogger getRootMessageLogger();
 
     public UUID getBrokerId();

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java Mon Dec  3 17:16:15 2012
@@ -18,8 +18,6 @@
  */
 package org.apache.qpid.server.security;
 
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
 import org.apache.log4j.Logger;
 
 import org.apache.qpid.framing.AMQShortString;
@@ -122,21 +120,19 @@ public class SecurityManager
     /*
      * Used by the VirtualHost to allow deferring to the broker level security plugins if required.
      */
-    public SecurityManager(SecurityManager parent, Configuration config) throws ConfigurationException
+    public SecurityManager(SecurityManager parent, String aclFile)
     {
-        this(config);
+        this(aclFile);
 
         // our global plugins are the parent's host plugins
         _globalPlugins = parent._hostPlugins;
     }
 
-    public SecurityManager(Configuration config) throws ConfigurationException
+    public SecurityManager(String aclFile)
     {
-        Configuration securityConfig = config.subset("security");
-
         for (AccessControlFactory provider : (new QpidServiceLoader<AccessControlFactory>()).instancesOf(AccessControlFactory.class))
         {
-            AccessControl accessControl = provider.createInstance(securityConfig);
+            AccessControl accessControl = provider.createInstance(aclFile);
             if(accessControl != null)
             {
                 addHostPlugin(accessControl);

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java Mon Dec  3 17:16:15 2012
@@ -55,7 +55,6 @@ import org.apache.qpid.server.queue.AMQQ
 import org.apache.qpid.server.queue.AMQQueueFactory;
 import org.apache.qpid.server.queue.DefaultQueueRegistry;
 import org.apache.qpid.server.queue.QueueRegistry;
-import org.apache.qpid.server.registry.IApplicationRegistry;
 import org.apache.qpid.server.security.SecurityManager;
 import org.apache.qpid.server.stats.StatisticsCounter;
 import org.apache.qpid.server.stats.StatisticsGatherer;
@@ -131,7 +130,7 @@ public class VirtualHostImpl implements 
 
         CurrentActor.get().message(VirtualHostMessages.CREATED(_name));
 
-        _securityManager = new SecurityManager(parentSecurityManager, _vhostConfig.getConfig());
+        _securityManager = new SecurityManager(parentSecurityManager, _vhostConfig.getConfig().getString("security.acl"));
 
         _connectionRegistry = new ConnectionRegistry();
         _connectionRegistry.addRegistryChangeListener(this);

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.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/startup/VirtualHostRecovererTest.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java Mon Dec  3 17:16:15 2012
@@ -43,10 +43,11 @@ public class VirtualHostRecovererTest ex
         VirtualHostRegistry virtualHostRegistry = mock(VirtualHostRegistry.class);
         StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
         SecurityManager securityManager = mock(SecurityManager.class);
-        VirtualHostRecoverer recoverer = new VirtualHostRecoverer(virtualHostRegistry, statisticsGatherer, securityManager);
-
         ConfigurationEntry entry = mock(ConfigurationEntry.class);
         Broker parent = mock(Broker.class);
+        when(parent.getSecurityManager()).thenReturn(securityManager);
+
+        VirtualHostRecoverer recoverer = new VirtualHostRecoverer(virtualHostRegistry, statisticsGatherer);
         Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put(VirtualHost.NAME, getName());
         when(entry.getAttributes()).thenReturn(attributes);

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactoryTest.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactoryTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactoryTest.java Mon Dec  3 17:16:15 2012
@@ -20,38 +20,21 @@
 */
 package org.apache.qpid.server.protocol;
 
-import java.util.UUID;
-import java.util.concurrent.ScheduledFuture;
-import org.apache.commons.configuration.XMLConfiguration;
+import java.nio.ByteBuffer;
+import java.util.EnumSet;
+import java.util.Set;
 
+import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.qpid.protocol.ServerProtocolEngine;
-import org.apache.qpid.server.binding.BindingFactory;
-import org.apache.qpid.server.configuration.ServerConfiguration;
 import org.apache.qpid.server.configuration.VirtualHostConfiguration;
-import org.apache.qpid.server.connection.IConnectionRegistry;
-import org.apache.qpid.server.exchange.ExchangeFactory;
-import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.v1_0.LinkRegistry;
-import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.registry.IApplicationRegistry;
-import org.apache.qpid.server.security.*;
-import org.apache.qpid.server.stats.StatisticsCounter;
-import org.apache.qpid.server.store.MessageStore;
-import org.apache.qpid.server.txn.DtxRegistry;
 import org.apache.qpid.server.util.TestApplicationRegistry;
-import org.apache.qpid.server.virtualhost.HouseKeepingTask;
-import org.apache.qpid.server.virtualhost.State;
-import org.apache.qpid.server.virtualhost.VirtualHost;
 import org.apache.qpid.server.virtualhost.VirtualHostImpl;
 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
 import org.apache.qpid.test.utils.QpidTestCase;
 import org.apache.qpid.transport.TestNetworkConnection;
 
-import java.nio.ByteBuffer;
-import java.util.EnumSet;
-import java.util.Set;
-
 public class MultiVersionProtocolEngineFactoryTest extends QpidTestCase
 {
     private TestApplicationRegistry _appRegistry;
@@ -65,7 +48,7 @@ public class MultiVersionProtocolEngineF
         // AMQP 1-0 connection needs default vhost to be present
         IApplicationRegistry registry = ApplicationRegistry.getInstance();
         VirtualHostRegistry virtualHostRegistry = registry.getVirtualHostRegistry();
-        VirtualHostImpl vhostImpl = new VirtualHostImpl(virtualHostRegistry, registry, registry.getSecurityManager(),
+        VirtualHostImpl vhostImpl = new VirtualHostImpl(virtualHostRegistry, registry, registry.getBroker().getSecurityManager(),
                 new VirtualHostConfiguration("default",new XMLConfiguration(), registry.getBroker()));
         virtualHostRegistry.registerVirtualHost(vhostImpl);
         virtualHostRegistry.setDefaultVirtualHostName("default");

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java Mon Dec  3 17:16:15 2012
@@ -25,11 +25,9 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyZeroInteractions;
 import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.when;
 import static org.mockito.Matchers.contains;
 import static org.mockito.Matchers.eq;
 
-import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.PropertiesConfiguration;
 
 import org.apache.qpid.AMQException;
@@ -122,9 +120,7 @@ public class SimpleAMQQueueTest extends 
 
         IApplicationRegistry registry = mock(IApplicationRegistry.class);
         Broker broker = mock(Broker.class);
-        Configuration config = mock(Configuration.class);
-        when(config.subset("security")).thenReturn(mock(Configuration.class));
-        SecurityManager securityManager = new SecurityManager(config);
+        SecurityManager securityManager = new SecurityManager(null);
         PropertiesConfiguration env = new PropertiesConfiguration();
         VirtualHostConfiguration vhostConfig = new VirtualHostConfiguration(getClass().getName(), env, broker);
         VirtualHostRegistry virtualHostRegistry = new VirtualHostRegistry(registry);

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java Mon Dec  3 17:16:15 2012
@@ -55,6 +55,7 @@ public class BrokerRestHttpsTest extends
         Map<String, Object> brokerDetails = getRestTestHelper().getJsonAsSingletonList("/rest/broker");
 
         Asserts.assertAttributesPresent(brokerDetails, Broker.AVAILABLE_ATTRIBUTES, Broker.BYTES_RETAINED,
-                Broker.PROCESS_PID, Broker.SUPPORTED_STORE_TYPES, Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED);
+                Broker.PROCESS_PID, Broker.SUPPORTED_STORE_TYPES, Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED,
+                Broker.ACL_FILE);
     }
 }

Modified: qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java?rev=1416596&r1=1416595&r2=1416596&view=diff
==============================================================================
--- qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java (original)
+++ qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java Mon Dec  3 17:16:15 2012
@@ -90,7 +90,7 @@ public class BrokerRestTest extends Qpid
     {
         Asserts.assertAttributesPresent(brokerDetails, Broker.AVAILABLE_ATTRIBUTES,
                 Broker.BYTES_RETAINED, Broker.PROCESS_PID, Broker.SUPPORTED_STORE_TYPES,
-                Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED);
+                Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED, Broker.ACL_FILE);
 
         assertEquals("Unexpected value of attribute " + Broker.BUILD_VERSION, QpidProperties.getBuildVersion(),
                 brokerDetails.get(Broker.BUILD_VERSION));



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


Mime
View raw message