qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1299257 [2/26] - in /qpid/branches/rg-amqp-1-0-sandbox/qpid/java: broker-plugins/ 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...
Date Sat, 10 Mar 2012 19:22:37 GMT

Propchange: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Mar 10 19:22:10 2012
@@ -3,4 +3,4 @@
 /qpid/branches/java-network-refactor/qpid/java/broker:805429-821809
 /qpid/branches/jmx_mc_gsoc09/qpid/java/broker:787599
 /qpid/branches/qpid-2935/qpid/java/broker:1061302-1072333
-/qpid/trunk/qpid/java/broker:742626,743015,743028-743029,743304,743306,743311,743357,744113,747363,747367,747369-747370,747376,747783,747868-747870,747875,748561,748591,748641,748680,748686,749149,749282,749285,749315,749340,749572,753219-753220,753253,754934,754958,755256,757258,757270,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,1073294-1157765,1160415-1162726,1162729-1166086,1166089-1235000
+/qpid/trunk/qpid/java/broker:742626,743015,743028-743029,743304,743306,743311,743357,744113,747363,747367,747369-747370,747376,747783,747868-747870,747875,748561,748591,748641,748680,748686,749149,749282,749285,749315,749340,749572,753219-753220,753253,754934,754958,755256,757258,757270,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,1073294-1299226

Propchange: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Sat Mar 10 19:22:10 2012
@@ -0,0 +1,7 @@
+/qpid/branches/0.5.x-dev/broker-plugins:886720-886722
+/qpid/branches/0.5.x-dev/qpid/java/broker-plugins:886720-886722,887145,892761,894875,916304,916325,930288,931179
+/qpid/branches/java-broker-0-10/qpid/java/broker-plugins:795950-829653
+/qpid/branches/java-network-refactor/qpid/java/broker-plugins:805429-821809
+/qpid/branches/qpid-2935/qpid/java/broker-plugins:1061302-1072333
+/qpid/trunk/qpid/broker-plugins:796646-796653,1080001-1085000
+/qpid/trunk/qpid/java/broker-plugins:1073294-1299252

Modified: qpid/branches/rg-amqp-1-0-sandbox/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/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/AbstractConfiguration.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/AbstractConfiguration.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/AbstractConfiguration.java Sat Mar 10 19:22:10 2012
@@ -27,10 +27,10 @@ import org.apache.log4j.Logger;
 
 public abstract class AbstractConfiguration implements ConfigurationFile
 {
-    protected static final Logger _logger = Logger.getLogger(ConfigurationFile.class);
+    private static final Logger _logger = Logger.getLogger(ConfigurationFile.class);
     
-    protected File _file;
-    protected RuleSet _config;
+    private File _file;
+    private RuleSet _config;
     
     public AbstractConfiguration(File file)
     {

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/Action.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/Action.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/Action.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/Action.java Sat Mar 10 19:22:10 2012
@@ -21,8 +21,6 @@
 package org.apache.qpid.server.security.access.config;
 
 import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Map;
 
 import org.apache.commons.lang.builder.EqualsBuilder;
 import org.apache.commons.lang.builder.HashCodeBuilder;
@@ -35,7 +33,7 @@ import org.apache.qpid.server.security.a
 /**
  * An access control v2 rule action.
  * 
- * An action consists of an {@link Operation} on an {@link ObjectType} with certain properties, stored in a {@link Map}.
+ * An action consists of an {@link Operation} on an {@link ObjectType} with certain properties, stored in a {@link java.util.Map}.
  * The operation and object should be an allowable combination, based on the {@link ObjectType#isAllowed(Operation)}
  * method of the object, which is exposed as the {@link #isAllowed()} method here. The internal {@link #propertiesMatch(Map)}
  * and {@link #valueMatches(String, String)} methods are used to determine wildcarded matching of properties, with
@@ -111,10 +109,9 @@ public class Action
     /** @see Comparable#compareTo(Object) */
     public boolean matches(Action a)
     {
-        return (Operation.ALL == a.getOperation()
-                || (getOperation() == a.getOperation()
-                    && getObjectType() == a.getObjectType()
-                    && _properties.matches(a.getProperties())));
+        return ((Operation.ALL == a.getOperation() || getOperation() == a.getOperation())
+                    && (ObjectType.ALL == a.getObjectType() || getObjectType() == a.getObjectType())
+                    && _properties.matches(a.getProperties()));
     }
 
     /**
@@ -136,12 +133,6 @@ public class Action
             }
             else if (a.getOperation() == b.getOperation())
             {
-                // Same operator, compare rest of action
-                
-//                    || (getOperation() == a.getOperation()
-//                        && getObjectType() == a.getObjectType()
-//                        && _properties.matches(a.getProperties())));
-
                 return 1; // b is more specific
             }
             else // Different operations

Modified: qpid/branches/rg-amqp-1-0-sandbox/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/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java Sat Mar 10 19:22:10 2012
@@ -78,7 +78,7 @@ public class PlainConfiguration extends 
         
         try
         {
-            _st = new StreamTokenizer(new BufferedReader(new FileReader(_file)));
+            _st = new StreamTokenizer(new BufferedReader(new FileReader(getFile())));
             _st.resetSyntax(); // setup the tokenizer
                 
             _st.commentChar(COMMENT); // single line comments

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java Sat Mar 10 19:22:10 2012
@@ -312,9 +312,9 @@ public class RuleSet
         return true;
     }
 
-    // C++ broker authorise function prototype
+    // CPP broker authorise function prototype
     // virtual bool authorise(const std::string& id, const Action& action, const ObjectType& objType,
-    //        const std::string& name, std::map<Property, std::string>* params=0);
+    //        const std::string& name, std::map<Property, std::string>* params=0)
 
     // Possibly add a String name paramater?
 

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControl.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControl.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControl.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControl.java Sat Mar 10 19:22:10 2012
@@ -109,7 +109,7 @@ public class AccessControl extends Abstr
     {
         super.configure(config);
 
-        AccessControlConfiguration accessConfig = (AccessControlConfiguration) _config;
+        AccessControlConfiguration accessConfig = (AccessControlConfiguration) getConfig();
 
         _ruleSet = accessConfig.getRuleSet();
     }

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControlActivator.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControlActivator.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControlActivator.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControlActivator.java Sat Mar 10 19:22:10 2012
@@ -23,10 +23,9 @@ package org.apache.qpid.server.security.
 import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory;
 import org.apache.qpid.server.security.SecurityPluginActivator;
 import org.apache.qpid.server.security.SecurityPluginFactory;
-import org.osgi.framework.BundleActivator;
 
 /**
- * The OSGi {@link BundleActivator} for {@link AccessControl}.
+ * The OSGi {@link org.osgi.framework.BundleActivator} for {@link AccessControl}.
  */
 public class AccessControlActivator extends SecurityPluginActivator
 {

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControlConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControlConfiguration.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControlConfiguration.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControlConfiguration.java Sat Mar 10 19:22:10 2012
@@ -58,7 +58,7 @@ public class AccessControlConfiguration 
 
     public String getFileName()
     {
-        return _configuration.getString("");
+        return getConfig().getString("");
     }
 
     public void validateConfiguration() throws ConfigurationException

Modified: qpid/branches/rg-amqp-1-0-sandbox/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/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java Sat Mar 10 19:22:10 2012
@@ -24,6 +24,7 @@ import java.util.Arrays;
 
 import junit.framework.TestCase;
 
+import org.apache.commons.configuration.ConfigurationException;
 import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
 import org.apache.qpid.server.logging.UnitTestMessageLogger;
 import org.apache.qpid.server.logging.actors.CurrentActor;
@@ -52,10 +53,20 @@ public class AccessControlTest extends T
     private AccessControl _plugin = null;  // Class under test
     private final UnitTestMessageLogger messageLogger = new UnitTestMessageLogger();
 
-    protected void setUp() throws Exception
+    private void setUpGroupAccessControl() throws ConfigurationException
     {
-        super.setUp();
+        configureAccessControl(createGroupRuleSet());
+    }
+
+    private void configureAccessControl(final RuleSet rs) throws ConfigurationException
+    {
+        _plugin = (AccessControl) AccessControl.FACTORY.newInstance(createConfiguration(rs));
+        SecurityManager.setThreadSubject(null);
+        CurrentActor.set(new TestLogActor(messageLogger));
+    }
 
+    private RuleSet createGroupRuleSet()
+    {
         final RuleSet rs = new RuleSet();
         rs.addGroup("aclGroup1", Arrays.asList(new String[] {"member1", "member2"}));
 
@@ -68,11 +79,7 @@ public class AccessControlTest extends T
         // Catch all rule
         rs.grant(3, Rule.ALL, Permission.DENY_LOG, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
 
-        _plugin = (AccessControl) AccessControl.FACTORY.newInstance(createConfiguration(rs));
-
-        SecurityManager.setThreadSubject(null);
-        
-        CurrentActor.set(new TestLogActor(messageLogger));
+        return rs;
     }
 
     protected void tearDown() throws Exception
@@ -81,68 +88,238 @@ public class AccessControlTest extends T
         SecurityManager.setThreadSubject(null);
     }
 
-    /** 
+    /**
      * ACL plugin must always abstain if there is no  subject attached to the thread.
      */
-    public void testNoSubjectAlwaysAbstains()
+    public void testNoSubjectAlwaysAbstains() throws ConfigurationException
     {
+        setUpGroupAccessControl();
         SecurityManager.setThreadSubject(null);
 
         final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
         assertEquals(Result.ABSTAIN, result);
     }
 
-    /** 
+    /**
      * Tests that an allow rule expressed with a username allows an operation performed by a thread running
      * with the same username.
      */
-    public void testUsernameAllowsOperation()
+    public void testUsernameAllowsOperation() throws ConfigurationException
     {
+        setUpGroupAccessControl();
         SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user1"));
 
         final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
         assertEquals(Result.ALLOWED, result);
     }
 
-    /** 
+    /**
      * Tests that an allow rule expressed with an <b>ACL groupname</b> allows an operation performed by a thread running
      * by a user who belongs to the same group..
      */
-    public void testAclGroupMembershipAllowsOperation()
+    public void testAclGroupMembershipAllowsOperation() throws ConfigurationException
     {
+        setUpGroupAccessControl();
         SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("member1"));
 
         final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
         assertEquals(Result.ALLOWED, result);
     }
 
-    /** 
+    /**
      * Tests that a deny rule expressed with an <b>External groupname</b> denies an operation performed by a thread running
      * by a user who belongs to the same group.
      */
-    public void testExternalGroupMembershipDeniesOperation()
+    public void testExternalGroupMembershipDeniesOperation() throws ConfigurationException
     {
+        setUpGroupAccessControl();
         SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user3", "extGroup1"));
-        
+
         final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
         assertEquals(Result.DENIED, result);
     }
 
-    /** 
+    /**
      * Tests that the catch all deny denies the operation and logs with the logging actor.
      */
-    public void testCatchAllRuleDeniesUnrecognisedUsername()
+    public void testCatchAllRuleDeniesUnrecognisedUsername() throws ConfigurationException
     {
+        setUpGroupAccessControl();
         SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("unknown", "unkgroup1", "unkgroup2"));
-        
+
         assertEquals("Expecting zero messages before test", 0, messageLogger.getLogMessages().size());
         final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
         assertEquals(Result.DENIED, result);
-        
+
         assertEquals("Expecting one message before test", 1, messageLogger.getLogMessages().size());
         assertTrue("Logged message does not contain expected string", messageLogger.messageContains(0, "ACL-1002"));
     }
-    
+
+    /**
+     * Tests that a grant access method rule allows any access operation to be performed on any component
+     */
+    public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnAllComponents() throws ConfigurationException
+    {
+        final RuleSet rs = new RuleSet();
+
+        // grant user4 access right on any method in any component
+        rs.grant(1, "user4", Permission.ALLOW, Operation.ACCESS, ObjectType.METHOD, new ObjectProperties(ObjectProperties.STAR));
+        configureAccessControl(rs);
+        SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user4"));
+
+        ObjectProperties actionProperties = new ObjectProperties("getName");
+        actionProperties.put(ObjectProperties.Property.COMPONENT, "Test");
+
+        final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, actionProperties);
+        assertEquals(Result.ALLOWED, result);
+    }
+
+    /**
+     * Tests that a grant access method rule allows any access operation to be performed on a specified component
+     */
+    public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException
+    {
+        final RuleSet rs = new RuleSet();
+
+        // grant user5 access right on any methods in "Test" component
+        ObjectProperties ruleProperties = new ObjectProperties(ObjectProperties.STAR);
+        ruleProperties.put(ObjectProperties.Property.COMPONENT, "Test");
+        rs.grant(1, "user5", Permission.ALLOW, Operation.ACCESS, ObjectType.METHOD, ruleProperties);
+        configureAccessControl(rs);
+        SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user5"));
+
+        ObjectProperties actionProperties = new ObjectProperties("getName");
+        actionProperties.put(ObjectProperties.Property.COMPONENT, "Test");
+        Result result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, actionProperties);
+        assertEquals(Result.ALLOWED, result);
+
+        actionProperties.put(ObjectProperties.Property.COMPONENT, "Test2");
+        result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, actionProperties);
+        assertEquals(Result.DEFER, result);
+    }
+
+    /**
+     * Tests that a grant access method rule allows any access operation to be performed on a specified component
+     */
+    public void testAuthoriseAccessMethodWhenSpecifiedAccessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException
+    {
+        final RuleSet rs = new RuleSet();
+
+        // grant user6 access right on "getAttribute" method in "Test" component
+        ObjectProperties ruleProperties = new ObjectProperties("getAttribute");
+        ruleProperties.put(ObjectProperties.Property.COMPONENT, "Test");
+        rs.grant(1, "user6", Permission.ALLOW, Operation.ACCESS, ObjectType.METHOD, ruleProperties);
+        configureAccessControl(rs);
+        SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user6"));
+
+        ObjectProperties properties = new ObjectProperties("getAttribute");
+        properties.put(ObjectProperties.Property.COMPONENT, "Test");
+        Result result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.ALLOWED, result);
+
+        properties.put(ObjectProperties.Property.COMPONENT, "Test2");
+        result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.DEFER, result);
+
+        properties = new ObjectProperties("getAttribute2");
+        properties.put(ObjectProperties.Property.COMPONENT, "Test");
+        result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.DEFER, result);
+    }
+
+    /**
+     * Tests that granting of all method rights on a method allows a specified operation to be performed on any component
+     */
+    public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnSpecifiedMethodForAllComponents() throws ConfigurationException
+    {
+        final RuleSet rs = new RuleSet();
+
+        // grant user8 all rights on method queryNames in all component
+        rs.grant(1, "user8", Permission.ALLOW, Operation.ALL, ObjectType.METHOD, new ObjectProperties("queryNames"));
+        configureAccessControl(rs);
+        SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user8"));
+
+        ObjectProperties properties = new ObjectProperties();
+        properties.put(ObjectProperties.Property.COMPONENT, "Test");
+        properties.put(ObjectProperties.Property.NAME, "queryNames");
+
+        Result result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.ALLOWED, result);
+
+        result = _plugin.authorise(Operation.UPDATE, ObjectType.METHOD, properties);
+        assertEquals(Result.ALLOWED, result);
+
+        properties = new ObjectProperties("getAttribute");
+        properties.put(ObjectProperties.Property.COMPONENT, "Test");
+        result = _plugin.authorise(Operation.UPDATE, ObjectType.METHOD, properties);
+        assertEquals(Result.DEFER, result);
+
+        result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.DEFER, result);
+    }
+
+    /**
+     * Tests that granting of all method rights allows any operation to be performed on any component
+     */
+    public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnAllMethodsInAllComponents() throws ConfigurationException
+    {
+        final RuleSet rs = new RuleSet();
+
+        // grant user9 all rights on any method in all component
+        rs.grant(1, "user9", Permission.ALLOW, Operation.ALL, ObjectType.METHOD, new ObjectProperties());
+        configureAccessControl(rs);
+        SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user9"));
+
+        ObjectProperties properties = new ObjectProperties("queryNames");
+        properties.put(ObjectProperties.Property.COMPONENT, "Test");
+
+        Result result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.ALLOWED, result);
+
+        result = _plugin.authorise(Operation.UPDATE, ObjectType.METHOD, properties);
+        assertEquals(Result.ALLOWED, result);
+
+        properties = new ObjectProperties("getAttribute");
+        properties.put(ObjectProperties.Property.COMPONENT, "Test");
+        result = _plugin.authorise(Operation.UPDATE, ObjectType.METHOD, properties);
+        assertEquals(Result.ALLOWED, result);
+
+        result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.ALLOWED, result);
+    }
+
+    /**
+     * Tests that granting of access method rights with mask allows matching operations to be performed on the specified component
+     */
+    public void testAuthoriseAccessMethodWhenMatchingAcessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException
+    {
+        final RuleSet rs = new RuleSet();
+
+        // grant user9 all rights on "getAttribute*" methods in Test component
+        ObjectProperties ruleProperties = new ObjectProperties();
+        ruleProperties.put(ObjectProperties.Property.COMPONENT, "Test");
+        ruleProperties.put(ObjectProperties.Property.NAME, "getAttribute*");
+
+        rs.grant(1, "user9", Permission.ALLOW, Operation.ACCESS, ObjectType.METHOD, ruleProperties);
+        configureAccessControl(rs);
+        SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user9"));
+
+        ObjectProperties properties = new ObjectProperties("getAttributes");
+        properties.put(ObjectProperties.Property.COMPONENT, "Test");
+        Result result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.ALLOWED, result);
+
+        properties = new ObjectProperties("getAttribute");
+        properties.put(ObjectProperties.Property.COMPONENT, "Test");
+        result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.ALLOWED, result);
+
+        properties = new ObjectProperties("getAttribut");
+        properties.put(ObjectProperties.Property.COMPONENT, "Test");
+        result = _plugin.authorise(Operation.ACCESS, ObjectType.METHOD, properties);
+        assertEquals(Result.DEFER, result);
+    }
+
     /**
      * Creates a configuration plugin for the {@link AccessControl} plugin.
      */
@@ -150,6 +327,7 @@ public class AccessControlTest extends T
     {
         final ConfigurationPlugin cp = new ConfigurationPlugin()
         {
+            @SuppressWarnings("unchecked")
             public AccessControlConfiguration  getConfiguration(final String plugin)
             {
                 return new AccessControlConfiguration()

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/ShutdownMBean.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/ShutdownMBean.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/ShutdownMBean.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/experimental/shutdown/src/main/java/org/apache/qpid/shutdown/ShutdownMBean.java Sat Mar 10 19:22:10 2012
@@ -19,6 +19,8 @@
  */
 package org.apache.qpid.shutdown;
 
+import javax.management.MBeanOperationInfo;
+
 import org.apache.qpid.management.common.mbeans.annotations.MBeanOperation;
 import org.apache.qpid.management.common.mbeans.annotations.MBeanOperationParameter;
 
@@ -34,7 +36,7 @@ public interface ShutdownMBean
     /**
      * Broker will be shut down immediately.
      */
-    @MBeanOperation(name="shutdown", description="Shut down immediately")
+    @MBeanOperation(name="shutdown", description="Shut down immediately", impact = MBeanOperationInfo.ACTION)
     public void shutdown();
 
     /**
@@ -42,7 +44,7 @@ public interface ShutdownMBean
      * 
      * @param delay the number of ms to wait
      */
-    @MBeanOperation(name="shutdown", description="Shutdown after the specified delay (ms)")
+    @MBeanOperation(name="shutdown", description="Shutdown after the specified delay (ms)", impact = MBeanOperationInfo.ACTION)
     public void shutdown(@MBeanOperationParameter(name="when", description="delay (ms)")long delay);
 
     /**
@@ -50,6 +52,6 @@ public interface ShutdownMBean
      * 
      * @param when the date and time to shutdown
      */
-    @MBeanOperation(name="shutdownAt", description="Shutdown at the specified date and time (yyyy/MM/dd HH:mm:ss)")
+    @MBeanOperation(name="shutdownAt", description="Shutdown at the specified date and time (yyyy/MM/dd HH:mm:ss)", impact = MBeanOperationInfo.ACTION)
     public void shutdownAt(@MBeanOperationParameter(name="when", description="shutdown date/time (yyyy/MM/dd HH:mm:ss)")String when);
 }

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/experimental/shutdown/src/main/java/shutdown.bnd
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/experimental/shutdown/src/main/java/shutdown.bnd?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/experimental/shutdown/src/main/java/shutdown.bnd (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/experimental/shutdown/src/main/java/shutdown.bnd Sat Mar 10 19:22:10 2012
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-ver: 0.15.0
+ver: 0.17.0
 
 Bundle-SymbolicName: qpid-shutdown-plugin
 Bundle-Version: ${ver}

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/Activator.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/Activator.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/Activator.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/Activator.java Sat Mar 10 19:22:10 2012
@@ -20,11 +20,12 @@
  */
 package org.apache.qpid.extras;
 
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
 import org.apache.qpid.extras.exchanges.diagnostic.DiagnosticExchangeType;
 import org.apache.qpid.extras.exchanges.example.TestExchangeType;
 import org.apache.qpid.server.exchange.ExchangeType;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
 
 /**
  * 

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/diagnostic/DiagnosticExchange.java Sat Mar 10 19:22:10 2012
@@ -20,14 +20,8 @@
  */
 package org.apache.qpid.extras.exchanges.diagnostic;
 
-import java.util.ArrayList;
-import java.util.Map;
-
-import javax.management.JMException;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.TabularData;
-
 import org.apache.log4j.Logger;
+
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.FieldTable;
@@ -41,6 +35,12 @@ import org.apache.qpid.server.message.In
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
+import javax.management.JMException;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.TabularData;
+import java.util.ArrayList;
+import java.util.Map;
+
 /**
  * This is a special diagnostic exchange type which doesn't actually do anything
  * with messages. When it receives a message, it writes information about the
@@ -54,9 +54,6 @@ public class DiagnosticExchange extends 
     public static final AMQShortString DIAGNOSTIC_EXCHANGE_CLASS = new AMQShortString("x-diagnostic");
     public static final AMQShortString DIAGNOSTIC_EXCHANGE_NAME = new AMQShortString("diagnostic");
 
-    /** The logger */
-    //private static final Logger _logger = Logger.getLogger(DiagnosticExchange.class);
-
     /**
      * MBean class implementing the management interfaces.
      */
@@ -83,7 +80,6 @@ public class DiagnosticExchange extends 
          * @returns null
          * TODO or can there? Could this actually return all the information in one easy to read table?
          */
-        @Override
         public TabularData bindings() throws OpenDataException
         {
             return null;
@@ -197,13 +193,6 @@ public class DiagnosticExchange extends 
     public ArrayList<AMQQueue> doRoute(InboundMessage payload)
     {
         //TODO shouldn't modify messages... perhaps put a new message on the queue?
-        /*
-        Long value = new Long(SizeOf.getUsedMemory());
-        AMQShortString key = new AMQShortString("memory");
-        FieldTable headers = ((BasicContentHeaderProperties)payload.getMessageHeader().properties).getHeaders();
-        headers.put(key, value);
-        ((BasicContentHeaderProperties)payload.getMessageHeader().properties).setHeaders(headers);
-        */
         AMQQueue q = getQueueRegistry().getQueue(new AMQShortString("diagnosticqueue"));
         ArrayList<AMQQueue> queues =  new ArrayList<AMQQueue>();
         queues.add(q);

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/main/java/org/apache/qpid/extras/exchanges/example/TestExchange.java Sat Mar 10 19:22:10 2012
@@ -21,11 +21,6 @@ package org.apache.qpid.extras.exchanges
  */
 
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-import java.util.UUID;
-
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.FieldTable;
@@ -41,6 +36,11 @@ import org.apache.qpid.server.queue.AMQQ
 import org.apache.qpid.server.queue.BaseQueue;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.UUID;
+
 public class TestExchange implements Exchange
 {
 
@@ -80,6 +80,11 @@ public class TestExchange implements Exc
         return false;
     }
 
+    public boolean isBound(String bindingKey, Map<String, Object> arguments, AMQQueue queue)
+    {
+        return false;
+    }
+
     public boolean isBound(String bindingKey)
     {
         return false;

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/test/java/org/apache/qpid/server/plugins/ExtrasTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/test/java/org/apache/qpid/server/plugins/ExtrasTest.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/test/java/org/apache/qpid/server/plugins/ExtrasTest.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/extras/src/test/java/org/apache/qpid/server/plugins/ExtrasTest.java Sat Mar 10 19:22:10 2012
@@ -20,6 +20,7 @@ package org.apache.qpid.server.plugins;
 
 import junit.framework.TestCase;
 import org.apache.commons.configuration.PropertiesConfiguration;
+
 import org.apache.qpid.server.configuration.ServerConfiguration;
 import org.apache.qpid.server.exchange.ExchangeType;
 import org.apache.qpid.server.registry.ApplicationRegistry;
@@ -35,7 +36,7 @@ public class ExtrasTest extends TestCase
     private static final String PLUGIN_DIRECTORY = System.getProperty("example.plugin.target");
     private static final String CACHE_DIRECTORY = System.getProperty("example.cache.target");
 
-    IApplicationRegistry _registry;
+    private IApplicationRegistry _registry;
 
     @Override
     public void setUp() throws Exception

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/config/FirewallRule.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/config/FirewallRule.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/config/FirewallRule.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/config/FirewallRule.java Sat Mar 10 19:22:10 2012
@@ -20,6 +20,9 @@
  */
 package org.apache.qpid.server.security.access.config;
 
+import org.apache.qpid.server.security.Result;
+import org.apache.qpid.util.NetMatcher;
+
 import java.net.InetAddress;
 import java.util.List;
 import java.util.concurrent.Callable;
@@ -27,12 +30,8 @@ import java.util.concurrent.ExecutorServ
 import java.util.concurrent.Executors;
 import java.util.concurrent.FutureTask;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
 import java.util.regex.Pattern;
 
-import org.apache.qpid.server.security.Result;
-import org.apache.qpid.util.NetMatcher;
-
 public class FirewallRule 
 {
 	public static final String ALLOW = "ALLOW";

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/Firewall.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/Firewall.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/Firewall.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/Firewall.java Sat Mar 10 19:22:10 2012
@@ -20,11 +20,9 @@
  */
 package org.apache.qpid.server.security.access.plugins;
 
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
+
 import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
 import org.apache.qpid.server.security.AbstractPlugin;
 import org.apache.qpid.server.security.Result;
@@ -35,6 +33,9 @@ import org.apache.qpid.server.security.a
 import org.apache.qpid.server.security.access.config.FirewallException;
 import org.apache.qpid.server.security.access.config.FirewallRule;
 
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+
 public class Firewall extends AbstractPlugin
 {
     public static final SecurityPluginFactory<Firewall> FACTORY = new SecurityPluginFactory<Firewall>()
@@ -114,7 +115,7 @@ public class Firewall extends AbstractPl
     public void configure(ConfigurationPlugin config)
     {
         super.configure(config);
-        FirewallConfiguration firewallConfiguration = (FirewallConfiguration) _config;
+        FirewallConfiguration firewallConfiguration = (FirewallConfiguration) getConfig();
 
         // Get default action
         _default = firewallConfiguration.getDefaultAction();

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/FirewallActivator.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/FirewallActivator.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/FirewallActivator.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/FirewallActivator.java Sat Mar 10 19:22:10 2012
@@ -23,10 +23,9 @@ package org.apache.qpid.server.security.
 import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory;
 import org.apache.qpid.server.security.SecurityPluginActivator;
 import org.apache.qpid.server.security.SecurityPluginFactory;
-import org.osgi.framework.BundleActivator;
 
 /**
- * The OSGi {@link BundleActivator} for {@link Firewall}.
+ * The OSGi {@link org.osgi.framework.BundleActivator} for {@link Firewall}.
  */
 public class FirewallActivator extends SecurityPluginActivator
 {

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/FirewallConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/FirewallConfiguration.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/FirewallConfiguration.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/main/java/org/apache/qpid/server/security/access/plugins/FirewallConfiguration.java Sat Mar 10 19:22:10 2012
@@ -20,21 +20,22 @@
  */
 package org.apache.qpid.server.security.access.plugins;
 
-import java.util.Arrays;
-import java.util.List;
-
 import org.apache.commons.configuration.CompositeConfiguration;
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.XMLConfiguration;
+
 import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
 import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory;
 import org.apache.qpid.server.security.Result;
 import org.apache.qpid.server.security.access.config.FirewallRule;
 
+import java.util.Arrays;
+import java.util.List;
+
 public class FirewallConfiguration extends ConfigurationPlugin
 {
-    CompositeConfiguration _finalConfig;
+    private CompositeConfiguration _finalConfig;
 
     public static final ConfigurationPluginFactory FACTORY = new ConfigurationPluginFactory()
     {
@@ -63,7 +64,7 @@ public class FirewallConfiguration exten
 
     public Result getDefaultAction()
     {
-        String defaultAction = _configuration.getString("[@default-action]");
+        String defaultAction = getConfig().getString("[@default-action]");
         if (defaultAction == null)
         {
             return Result.ABSTAIN;
@@ -84,8 +85,8 @@ public class FirewallConfiguration exten
     public void validateConfiguration() throws ConfigurationException
     {
         // Valid Configuration either has xml links to new files
-        _finalConfig = new CompositeConfiguration(_configuration);
-        List subFiles = _configuration.getList("xml[@fileName]");
+        _finalConfig = new CompositeConfiguration(getConfig());
+        List subFiles = getConfig().getList("xml[@fileName]");
         for (Object subFile : subFiles)
         {
             _finalConfig.addConfiguration(new XMLConfiguration((String) subFile));
@@ -93,7 +94,7 @@ public class FirewallConfiguration exten
 
         // all rules must have an access attribute or a default value
         if (_finalConfig.getList("rule[@access]").size() == 0 &&
-            _configuration.getString("[@default-action]") == null)
+            getConfig().getString("[@default-action]") == null)
         {
             throw new ConfigurationException("No rules or default-action found in firewall configuration.");
         }

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java Sat Mar 10 19:22:10 2012
@@ -20,18 +20,18 @@
  */
 package org.apache.qpid.server.security.access;
 
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.net.InetSocketAddress;
-
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
 import org.apache.qpid.test.utils.QpidTestCase;
 
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.net.InetSocketAddress;
+
 public class FirewallConfigurationTest extends QpidTestCase
 {
     @Override

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallPluginTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallPluginTest.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallPluginTest.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallPluginTest.java Sat Mar 10 19:22:10 2012
@@ -18,15 +18,9 @@
  */
 package org.apache.qpid.server.security.access;
 
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.XMLConfiguration;
+
 import org.apache.qpid.server.configuration.ServerConfiguration;
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.security.Result;
@@ -35,6 +29,13 @@ import org.apache.qpid.server.security.a
 import org.apache.qpid.server.util.TestApplicationRegistry;
 import org.apache.qpid.test.utils.QpidTestCase;
 
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+
 public class FirewallPluginTest extends QpidTestCase
 {
     public class RuleInfo

Propchange: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/bin/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Mar 10 19:22:10 2012
@@ -2,4 +2,4 @@
 /qpid/branches/java-broker-0-10/qpid/java/broker/bin:795950-829653
 /qpid/branches/java-network-refactor/qpid/java/broker/bin:805429-821809
 /qpid/branches/qpid-2935/qpid/java/broker/bin:1061302-1072333
-/qpid/trunk/qpid/java/broker/bin:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,1073294-1157765,1160415-1162726,1162729-1166086,1166089-1235000
+/qpid/trunk/qpid/java/broker/bin:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,1073294-1299226

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/bin/qpid-passwd
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/bin/qpid-passwd?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/bin/qpid-passwd (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/bin/qpid-passwd Sat Mar 10 19:22:10 2012
@@ -18,9 +18,9 @@
 # under the License.
 #
 
-WHEREAMI=`dirname $0`
 if [ -z "$QPID_HOME" ]; then
-    export QPID_HOME=`cd $WHEREAMI/../ && pwd`
+    WHEREAMI=`dirname "$0"`
+    export QPID_HOME=`cd "$WHEREAMI/../" && pwd`
 fi
 
 # Set classpath to include Qpid jar with all required jars in manifest
@@ -32,4 +32,4 @@ export JAVA=java \
        JAVA_MEM=-Xmx1024m \
        QPID_CLASSPATH=$QPID_LIBS
 
-. ${QPID_HOME}/bin/qpid-run org.apache.qpid.tools.security.Passwd "$@"
+. "${QPID_HOME}/bin/qpid-run" org.apache.qpid.tools.security.Passwd "$@"

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/build.xml
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/build.xml?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/build.xml (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/build.xml Sat Mar 10 19:22:10 2012
@@ -34,14 +34,7 @@
     <property name="qmf.output.file" value="BrokerSchema.java"/>
 
 
-    <target name="precompile" depends="gen_logging,gen_qmf">
-        <mkdir dir="${output.dir}"/>
-        <!-- Compile Selcector Code -->
-        <javacc target="src/main/grammar/SelectorParser.jj"
-                outputdirectory="${output.dir}"
-                javacchome="${project.root}/lib"/>
-    </target>
-
+    <target name="precompile" depends="gen_logging,gen_qmf"/>
 
   <target name="check_qmf_deps">
     <uptodate property="gen_qmf.notRequired" targetfile="${qmf.output.dir}/${qmf.output.file}">

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/etc/broker_example.acl
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/etc/broker_example.acl?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/etc/broker_example.acl (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/etc/broker_example.acl Sat Mar 10 19:22:10 2012
@@ -24,15 +24,32 @@
 #Define a 'messaging-users' group with users  'client' and  'server' in it
 GROUP messaging-users client server
 
+
 ### MANAGEMENT ####
 
-#Allow 'guest' to perform read operations on the Serverinformation mbean and view logger levels
-ACL ALLOW-LOG guest ACCESS METHOD component="ServerInformation"
-ACL ALLOW-LOG guest ACCESS METHOD component="LoggingManagement" name="viewEffectiveRuntimeLoggerLevels"
+# Allow everyone to perform read operations on the ServerInformation mbean
+# This is used for items such as querying the management API and broker release versions.
+ACL ALLOW-LOG ALL ACCESS METHOD component="ServerInformation"
 
-#Allow 'admin' all management operations
+# Allow 'admin' all management operations
 ACL ALLOW-LOG admin ALL METHOD
 
+# Deny access to Shutdown, UserManagement, ConfigurationManagement and LoggingManagement for all other users
+# You could grant specific users access to these beans by adding ALLOW-LOG rules above for them
+ACL DENY-LOG ALL ACCESS METHOD component="Shutdown"
+ACL DENY-LOG ALL ACCESS METHOD component="UserManagement"
+ACL DENY-LOG ALL ACCESS METHOD component="ConfigurationManagement"
+ACL DENY-LOG ALL ACCESS METHOD component="LoggingManagement"
+
+# Allow 'guest' to view logger levels, and use getter methods on LoggingManagement
+# These are examples of redundant rules! The DENY-LOG rule above will be invoked
+# first and will deny the access to all methods of LoggingManagement for guest
+ACL ALLOW-LOG guest ACCESS METHOD component="LoggingManagement" name="viewEffectiveRuntimeLoggerLevels"
+ACL ALLOW-LOG guest ACCESS METHOD component="LoggingManagement" name="get*"
+
+# Allow everyone to perform all read operations on the mbeans not listened in the DENY-LOG rules above
+ACL ALLOW-LOG ALL ACCESS METHOD
+
 ### MESSAGING ###
 
 #Example permissions for request-response based messaging.

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/etc/config.xml
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/etc/config.xml?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/etc/config.xml (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/etc/config.xml Sat Mar 10 19:22:10 2012
@@ -53,17 +53,13 @@
         </jmxport>
         <ssl>
             <enabled>false</enabled>
-            <!-- Update below path to your keystore location, or run the bin/create-example-ssl-stores(.sh|.bat)
-                 script from within the etc/ folder to generate an example store with self-signed cert -->
+            <!-- Update below path to your keystore location. -->
             <keyStorePath>${conf}/qpid.keystore</keyStorePath>
             <keyStorePassword>password</keyStorePassword>
         </ssl>
     </management>
     <advanced>
-        <filterchain enableExecutorPool="true"/>
         <framesize>65535</framesize>
-        <compressBufferOnQueue>false</compressBufferOnQueue>
-        <enableJMSXUserID>false</enableJMSXUserID>
         <locale>en_US</locale>	
     </advanced>
 

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/broker.bnd
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/broker.bnd?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/broker.bnd (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/broker.bnd Sat Mar 10 19:22:10 2012
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-ver: 0.15.0
+ver: 0.17.0
 
 Bundle-SymbolicName: qpid-broker
 Bundle-Version: ${ver}

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/log4j/QpidCompositeRollingAppender.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/log4j/QpidCompositeRollingAppender.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/log4j/QpidCompositeRollingAppender.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/log4j/QpidCompositeRollingAppender.java Sat Mar 10 19:22:10 2012
@@ -20,6 +20,11 @@
  */
 package org.apache.log4j;
 
+import org.apache.log4j.helpers.CountingQuietWriter;
+import org.apache.log4j.helpers.LogLog;
+import org.apache.log4j.helpers.OptionConverter;
+import org.apache.log4j.spi.LoggingEvent;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -33,11 +38,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.zip.GZIPOutputStream;
 
-import org.apache.log4j.helpers.CountingQuietWriter;
-import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.helpers.OptionConverter;
-import org.apache.log4j.spi.LoggingEvent;
-
 /**
  * <p>CompositeRollingAppender combines RollingFileAppender and DailyRollingFileAppender<br> It can function as either
  * or do both at the same time (making size based rolling files like RollingFileAppender until a data/time boundary is
@@ -99,59 +99,38 @@ public class QpidCompositeRollingAppende
     private long nextCheck = System.currentTimeMillis() - 1;
 
     /** Holds date of last roll over */
-    Date now = new Date();
+    private Date now = new Date();
 
-    SimpleDateFormat sdf;
+    private SimpleDateFormat sdf;
 
     /** Helper class to determine next rollover time */
-    RollingCalendar rc = new RollingCalendar();
+    private RollingCalendar rc = new RollingCalendar();
 
-    /** The default maximum file size is 10MB. */
-    protected long maxFileSize = 10 * 1024 * 1024;
+    private long maxFileSize = 10 * 1024 * 1024;
 
-    /** There is zero backup files by default. */
-    protected int maxSizeRollBackups = 0;
-    /** How many sized based backups have been made so far */
-    protected int curSizeRollBackups = 0;
+    private int maxSizeRollBackups = 0;
+    private int curSizeRollBackups = 0;
 
-    /** not yet implemented */
-    protected int maxTimeRollBackups = -1;
-    protected int curTimeRollBackups = 0;
+    private int maxTimeRollBackups = -1;
+    private int curTimeRollBackups = 0;
 
-    /**
-     * By default newer files have lower numbers. (countDirection < 0) ie. log.1 is most recent, log.5 is the 5th
-     * backup, etc... countDirection > 0 does the opposite ie. log.1 is the first backup made, log.5 is the 5th backup
-     * made, etc. For infinite backups use countDirection > 0 to reduce rollOver costs.
-     */
-    protected int countDirection = -1;
+    private int countDirection = -1;
 
-    /** Style of rolling to Use.  BY_SIZE (1), BY_DATE(2), BY COMPOSITE(3) */
-    protected int rollingStyle = BY_COMPOSITE;
-    protected boolean rollDate = true;
-    protected boolean rollSize = true;
+    private int rollingStyle = BY_COMPOSITE;
+    private boolean rollDate = true;
+    private boolean rollSize = true;
 
-    /**
-     * By default file.log is always the current file.  Optionally file.log.yyyy-mm-dd for current formated datePattern
-     * can by the currently logging file (or file.log.curSizeRollBackup or even file.log.yyyy-mm-dd.curSizeRollBackup)
-     * This will make time based roll overs with a large number of backups much faster -- it won't have to rename all
-     * the backups!
-     */
-    protected boolean staticLogFileName = true;
+    private boolean staticLogFileName = true;
 
-    /** FileName provided in configuration.  Used for rolling properly */
-    protected String baseFileName;
+    private String baseFileName;
 
-    /** Do we want to .gz our backup files. */
-    protected boolean compress = false;
+    private boolean compress = false;
 
-    /** Do we want to use a second thread when compressing our backup files. */
-    protected boolean compressAsync = false;
+    private boolean compressAsync = false;
 
-    /** Do we want to start numbering files at zero. */
-    protected boolean zeroBased = false;
+    private boolean zeroBased = false;
 
-    /** Path provided in configuration.  Used for moving backup files to */
-    protected String backupFilesToPath = null;
+    private String backupFilesToPath = null;
     private final ConcurrentLinkedQueue<CompressJob> _compress = new ConcurrentLinkedQueue<CompressJob>();
     private AtomicBoolean _compressing = new AtomicBoolean(false);
     private static final String COMPRESS_EXTENSION = ".gz";
@@ -219,7 +198,7 @@ public class QpidCompositeRollingAppende
         return datePattern;
     }
 
-    /** Returns the value of the <b>maxSizeRollBackups</b> option. */
+    /** There is zero backup files by default. */ /** Returns the value of the <b>maxSizeRollBackups</b> option. */
     public int getMaxSizeRollBackups()
     {
         return maxSizeRollBackups;
@@ -311,7 +290,6 @@ public class QpidCompositeRollingAppende
                 c.setType(i);
                 Date next = new Date(c.getNextCheckMillis(epoch));
                 String r1 = sdf.format(next);
-                // LogLog.debug("Type = "+i+", r0 = "+r0+", r1 = "+r1);
                 if ((r0 != null) && (r1 != null) && !r0.equals(r1))
                 {
                     return i;
@@ -379,6 +357,11 @@ public class QpidCompositeRollingAppende
         }
     }
 
+    /**
+     * By default newer files have lower numbers. (countDirection < 0) ie. log.1 is most recent, log.5 is the 5th
+     * backup, etc... countDirection > 0 does the opposite ie. log.1 is the first backup made, log.5 is the 5th backup
+     * made, etc. For infinite backups use countDirection > 0 to reduce rollOver costs.
+     */
     public int getCountDirection()
     {
         return countDirection;
@@ -389,6 +372,7 @@ public class QpidCompositeRollingAppende
         countDirection = direction;
     }
 
+    /** Style of rolling to Use.  BY_SIZE (1), BY_DATE(2), BY COMPOSITE(3) */
     public int getRollingStyle()
     {
         return rollingStyle;
@@ -420,19 +404,6 @@ public class QpidCompositeRollingAppende
         }
     }
 
-    /*
-        public void setRollingStyle(String style) {
-            if (style == S_BY_SIZE) {
-                rollingStyle = BY_SIZE;
-            }
-            else if (style == S_BY_DATE) {
-                rollingStyle = BY_DATE;
-            }
-            else if (style == S_BY_COMPOSITE) {
-                rollingStyle = BY_COMPOSITE;
-            }
-        }
-     */
     public boolean getStaticLogFileName()
     {
         return staticLogFileName;
@@ -484,6 +455,7 @@ public class QpidCompositeRollingAppende
         zeroBased = z;
     }
 
+    /** Path provided in configuration.  Used for moving backup files to */
     public String getBackupFilesToPath()
     {
         return backupFilesToPath;
@@ -549,7 +521,6 @@ public class QpidCompositeRollingAppende
             now.setTime(System.currentTimeMillis());
             sdf = new SimpleDateFormat(datePattern);
             int type = computeCheckPeriod();
-            // printPeriodicity(type);
             rc.setType(type);
             // next line added as this removes the name check in rollOver
             nextCheck = rc.getNextCheckMillis(now);
@@ -797,7 +768,9 @@ public class QpidCompositeRollingAppende
                     curSizeRollBackups--;
                 }
             }
-            // Map {(maxBackupIndex - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2}
+            /*
+              map {(maxBackupIndex - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2}.
+            */
             for (int i = curSizeRollBackups; i >= 1; i--)
             {
                 String oldName = (fileName + "." + i);
@@ -1074,9 +1047,117 @@ public class QpidCompositeRollingAppende
         }
     }
 
+    /** The default maximum file size is 10MB. */
+    protected long getMaxFileSize()
+    {
+        return maxFileSize;
+    }
+
+    /** How many sized based backups have been made so far */
+    protected int getCurSizeRollBackups()
+    {
+        return curSizeRollBackups;
+    }
+
+    protected void setCurSizeRollBackups(int curSizeRollBackups)
+    {
+        this.curSizeRollBackups = curSizeRollBackups;
+    }
+
+    /** not yet implemented */
+    protected int getMaxTimeRollBackups()
+    {
+        return maxTimeRollBackups;
+    }
+
+    protected void setMaxTimeRollBackups(int maxTimeRollBackups)
+    {
+        this.maxTimeRollBackups = maxTimeRollBackups;
+    }
+
+    protected int getCurTimeRollBackups()
+    {
+        return curTimeRollBackups;
+    }
+
+    protected void setCurTimeRollBackups(int curTimeRollBackups)
+    {
+        this.curTimeRollBackups = curTimeRollBackups;
+    }
+
+    protected boolean isRollDate()
+    {
+        return rollDate;
+    }
+
+    protected void setRollDate(boolean rollDate)
+    {
+        this.rollDate = rollDate;
+    }
+
+    protected boolean isRollSize()
+    {
+        return rollSize;
+    }
+
+    protected void setRollSize(boolean rollSize)
+    {
+        this.rollSize = rollSize;
+    }
+
+    /**
+     * By default file.log is always the current file.  Optionally file.log.yyyy-mm-dd for current formated datePattern
+     * can by the currently logging file (or file.log.curSizeRollBackup or even file.log.yyyy-mm-dd.curSizeRollBackup)
+     * This will make time based roll overs with a large number of backups much faster -- it won't have to rename all
+     * the backups!
+     */
+    protected boolean isStaticLogFileName()
+    {
+        return staticLogFileName;
+    }
+
+    /** FileName provided in configuration.  Used for rolling properly */
+    protected String getBaseFileName()
+    {
+        return baseFileName;
+    }
+
+    protected void setBaseFileName(String baseFileName)
+    {
+        this.baseFileName = baseFileName;
+    }
+
+    /** Do we want to .gz our backup files. */
+    protected boolean isCompress()
+    {
+        return compress;
+    }
+
+    protected void setCompress(boolean compress)
+    {
+        this.compress = compress;
+    }
+
+    /** Do we want to use a second thread when compressing our backup files. */
+    protected boolean isCompressAsync()
+    {
+        return compressAsync;
+    }
+
+    /** Do we want to start numbering files at zero. */
+    protected boolean isZeroBased()
+    {
+        return zeroBased;
+    }
+
+    protected void setBackupFilesToPath(String backupFilesToPath)
+    {
+        this.backupFilesToPath = backupFilesToPath;
+    }
+
     private static class CompressJob
     {
-        File _from, _to;
+        private File _from, _to;
 
         CompressJob(File from, File to)
         {
@@ -1095,9 +1176,9 @@ public class QpidCompositeRollingAppende
         }
     }
 
-    Compressor compressor = null;
+    private Compressor compressor = null;
 
-    Executor executor;
+    private Executor executor;
 
     private class Compressor implements Runnable
     {

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/log4j/xml/QpidLog4JConfigurator.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/log4j/xml/QpidLog4JConfigurator.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/log4j/xml/QpidLog4JConfigurator.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/log4j/xml/QpidLog4JConfigurator.java Sat Mar 10 19:22:10 2012
@@ -20,22 +20,22 @@
  */
 package org.apache.log4j.xml;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import java.util.concurrent.locks.ReentrantLock;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
-import org.apache.qpid.server.logging.management.LoggingManagementMBean;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 
+import org.apache.qpid.server.logging.management.LoggingManagementMBean;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.locks.ReentrantLock;
+
 /**
  * Substitute for the Log4J XMLWatchdog (as used by DOMConfigurator.configureAndWatch)
  * 

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/ManagementExchange.java Sat Mar 10 19:22:10 2012
@@ -35,7 +35,6 @@ import org.apache.qpid.server.exchange.t
 import org.apache.qpid.server.exchange.topic.TopicMatcherResult;
 import org.apache.qpid.server.exchange.topic.TopicNormalizer;
 import org.apache.qpid.server.exchange.topic.TopicParser;
-import org.apache.qpid.server.message.AMQMessageHeader;
 import org.apache.qpid.server.message.InboundMessage;
 import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.queue.AMQQueue;
@@ -50,7 +49,6 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import java.util.TimerTask;
 import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -412,6 +410,11 @@ public class ManagementExchange implemen
         return queues;
     }
 
+    public boolean isBound(String bindingKey, Map<String, Object> arguments, AMQQueue queue)
+    {
+        return false;  //TODO
+    }
+
     public boolean isBound(AMQShortString routingKey, FieldTable arguments, AMQQueue queue)
     {
         return false;  //To change body of implemented methods use File | Settings | File Templates.

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFBrokerRequestCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFBrokerRequestCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFBrokerRequestCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFBrokerRequestCommand.java Sat Mar 10 19:22:10 2012
@@ -22,17 +22,14 @@
 package org.apache.qpid.qmf;
 
 import org.apache.log4j.Logger;
-import org.apache.qpid.transport.codec.BBDecoder;
-import org.apache.qpid.transport.codec.BBEncoder;
-import org.apache.qpid.server.message.ServerMessage;
-import org.apache.qpid.server.message.MessageTransferMessage;
-import org.apache.qpid.server.virtualhost.VirtualHost;
+
+import org.apache.qpid.AMQException;
 import org.apache.qpid.server.exchange.Exchange;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.queue.BaseQueue;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.management.common.mbeans.ManagedConnection;
+import org.apache.qpid.server.virtualhost.VirtualHost;
+import org.apache.qpid.transport.codec.BBDecoder;
 
-import java.util.ArrayList;
 import java.util.List;
 
 public class QMFBrokerRequestCommand extends QMFCommand

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFBrokerResponseCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFBrokerResponseCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFBrokerResponseCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFBrokerResponseCommand.java Sat Mar 10 19:22:10 2012
@@ -22,7 +22,6 @@
 package org.apache.qpid.qmf;
 
 import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.transport.codec.BBEncoder;
 
 public class QMFBrokerResponseCommand extends QMFCommand

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClass.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClass.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClass.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClass.java Sat Mar 10 19:22:10 2012
@@ -21,12 +21,10 @@
 
 package org.apache.qpid.qmf;
 
-import org.apache.qpid.server.configuration.ConfiguredObject;
-
 import java.util.Collection;
-import java.util.Map;
-import java.util.List;
 import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
 
 abstract public class QMFClass
 {

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClassIndicationCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClassIndicationCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClassIndicationCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClassIndicationCommand.java Sat Mar 10 19:22:10 2012
@@ -21,8 +21,6 @@
 
 package org.apache.qpid.qmf;
 
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.transport.codec.BBEncoder;
 
 public class QMFClassIndicationCommand extends QMFCommand

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClassQueryCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClassQueryCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClassQueryCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFClassQueryCommand.java Sat Mar 10 19:22:10 2012
@@ -22,15 +22,15 @@
 package org.apache.qpid.qmf;
 
 import org.apache.log4j.Logger;
-import org.apache.qpid.transport.codec.BBDecoder;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.message.ServerMessage;
+
+import org.apache.qpid.AMQException;
 import org.apache.qpid.server.exchange.Exchange;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.queue.BaseQueue;
 import org.apache.qpid.server.registry.IApplicationRegistry;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.server.virtualhost.VirtualHost;
+import org.apache.qpid.transport.codec.BBDecoder;
 
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFCommandCompletionCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFCommandCompletionCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFCommandCompletionCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFCommandCompletionCommand.java Sat Mar 10 19:22:10 2012
@@ -21,8 +21,6 @@
 
 package org.apache.qpid.qmf;
 
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.transport.codec.BBEncoder;
 
 public class QMFCommandCompletionCommand extends QMFCommand

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFEventCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFEventCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFEventCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFEventCommand.java Sat Mar 10 19:22:10 2012
@@ -20,8 +20,6 @@
  */
 package org.apache.qpid.qmf;
 
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.transport.codec.BBEncoder;
 
 public abstract class QMFEventCommand<T extends QMFEventClass> extends QMFCommand

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFGetQueryCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFGetQueryCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFGetQueryCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFGetQueryCommand.java Sat Mar 10 19:22:10 2012
@@ -22,15 +22,21 @@
 package org.apache.qpid.qmf;
 
 import org.apache.log4j.Logger;
-import org.apache.qpid.transport.codec.BBDecoder;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.message.ServerMessage;
+
+import org.apache.qpid.AMQException;
 import org.apache.qpid.server.exchange.Exchange;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.queue.BaseQueue;
 import org.apache.qpid.server.registry.IApplicationRegistry;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.server.virtualhost.VirtualHost;
+import org.apache.qpid.transport.codec.BBDecoder;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
 
 public class QMFGetQueryCommand extends QMFCommand
 {

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMessage.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMessage.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMessage.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMessage.java Sat Mar 10 19:22:10 2012
@@ -22,9 +22,13 @@
 package org.apache.qpid.qmf;
 
 import org.apache.commons.lang.NotImplementedException;
+
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.configuration.SessionConfig;
-import org.apache.qpid.server.message.*;
+import org.apache.qpid.server.message.AMQMessageHeader;
+import org.apache.qpid.server.message.InboundMessage;
+import org.apache.qpid.server.message.MessageReference;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.store.StoredMessage;
 import org.apache.qpid.transport.codec.BBEncoder;
 

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMethod.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMethod.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMethod.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMethod.java Sat Mar 10 19:22:10 2012
@@ -21,12 +21,12 @@
 
 package org.apache.qpid.qmf;
 
-import org.apache.qpid.transport.codec.Encoder;
 import org.apache.qpid.transport.codec.BBDecoder;
+import org.apache.qpid.transport.codec.Encoder;
 
+import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
-import java.util.ArrayList;
 
 public abstract class QMFMethod<T extends QMFObject>
 {

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMethodRequestCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMethodRequestCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMethodRequestCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFMethodRequestCommand.java Sat Mar 10 19:22:10 2012
@@ -21,16 +21,16 @@
 package org.apache.qpid.qmf;
 
 import org.apache.log4j.Logger;
-import org.apache.qpid.transport.codec.BBDecoder;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.message.ServerMessage;
+
+import org.apache.qpid.AMQException;
 import org.apache.qpid.server.exchange.Exchange;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.queue.BaseQueue;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.server.virtualhost.VirtualHost;
+import org.apache.qpid.transport.codec.BBDecoder;
 
 import java.util.List;
 import java.util.UUID;
-import java.util.ArrayList;
 
 public class QMFMethodRequestCommand extends QMFCommand
 {

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackage.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackage.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackage.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackage.java Sat Mar 10 19:22:10 2012
@@ -22,8 +22,8 @@
 package org.apache.qpid.qmf;
 
 import java.util.Collection;
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
 
 public class QMFPackage
 {

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackageIndicationCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackageIndicationCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackageIndicationCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackageIndicationCommand.java Sat Mar 10 19:22:10 2012
@@ -21,8 +21,6 @@
 
 package org.apache.qpid.qmf;
 
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.transport.codec.BBEncoder;
 
 public class QMFPackageIndicationCommand extends QMFCommand

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackageQueryCommand.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackageQueryCommand.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackageQueryCommand.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFPackageQueryCommand.java Sat Mar 10 19:22:10 2012
@@ -22,15 +22,15 @@
 package org.apache.qpid.qmf;
 
 import org.apache.log4j.Logger;
-import org.apache.qpid.transport.codec.BBDecoder;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.message.ServerMessage;
+
+import org.apache.qpid.AMQException;
 import org.apache.qpid.server.exchange.Exchange;
+import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.queue.BaseQueue;
 import org.apache.qpid.server.registry.IApplicationRegistry;
-import org.apache.qpid.AMQException;
+import org.apache.qpid.server.virtualhost.VirtualHost;
+import org.apache.qpid.transport.codec.BBDecoder;
 
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 

Modified: qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFProperty.java
URL: http://svn.apache.org/viewvc/qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFProperty.java?rev=1299257&r1=1299256&r2=1299257&view=diff
==============================================================================
--- qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFProperty.java (original)
+++ qpid/branches/rg-amqp-1-0-sandbox/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFProperty.java Sat Mar 10 19:22:10 2012
@@ -23,9 +23,8 @@ package org.apache.qpid.qmf;
 
 import org.apache.qpid.transport.codec.Encoder;
 
-import java.util.Map;
-import java.util.HashMap;
 import java.util.LinkedHashMap;
+import java.util.Map;
 
 public class QMFProperty
 {
@@ -68,8 +67,6 @@ public class QMFProperty
 
     public void setQMFClass(QMFClass qmfClass)
     {
- /*       _map.put(REF_CLASS, qmfClass.getName());
-        _map.put(REF_PACKAGE, qmfClass.getPackage().getName());*/
     }
 
     public void setReferencedClass(String refClass)



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


Mime
View raw message