You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ai...@apache.org on 2008/02/28 18:32:14 UTC

svn commit: r632068 [1/3] - in /incubator/qpid/branches/thegreatmerge/qpid: ./ java/broker/ java/broker/etc/ java/broker/src/main/java/ java/broker/src/main/java/org/apache/qpid/server/ack/ java/broker/src/main/java/org/apache/qpid/server/exchange/ jav...

Author: aidan
Date: Thu Feb 28 09:31:56 2008
New Revision: 632068

URL: http://svn.apache.org/viewvc?rev=632068&view=rev
Log:
Merged revisions 630239,630247,630723-630725,630728-630731,630733,630833,630854,630857,630865,630872-630873,630892,630896,631141,631264,631295-631296,631651,631936 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1

........
  r630239 | rgodfrey | 2008-02-22 16:15:11 +0000 (Fri, 22 Feb 2008) | 1 line
  
  QPID-790 : Performance Improvements
........
  r630247 | aidan | 2008-02-22 16:50:26 +0000 (Fri, 22 Feb 2008) | 2 lines
  
  QPID-771: fix up exception handling a bit more, this is so lovely.
........
  r630723 | ritchiem | 2008-02-25 03:22:39 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-806 : Added startsWith and endsWith methods to AMQShortString, including test.
........
  r630724 | ritchiem | 2008-02-25 03:33:58 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-807 : made methods public.
........
  r630725 | ritchiem | 2008-02-25 03:36:55 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-808 : add method to qpid.jms Interface.
........
  r630728 | ritchiem | 2008-02-25 03:52:54 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-809 : Added comments and additional error logging.
........
  r630729 | ritchiem | 2008-02-25 03:58:25 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-107 added ACCESS_REFUSED as a reason to throw AMQAuthenticationException
........
  r630730 | ritchiem | 2008-02-25 03:59:58 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-809 : Added comments and improved logging msgs.
........
  r630731 | ritchiem | 2008-02-25 04:06:32 +0000 (Mon, 25 Feb 2008) | 1 line
  
  Adjusted the default debug level to debug (it was only info)
........
  r630733 | ritchiem | 2008-02-25 04:56:42 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-810 : Moved check for closingChannels higher in stack and close channel on any AMQException being thrown from the body.handle methods.
........
  r630833 | ritchiem | 2008-02-25 12:59:03 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-811 : The RejectionEE is occuring because the task pool is shutdown before the close-ok has been received.
........
  r630854 | ritchiem | 2008-02-25 13:54:46 +0000 (Mon, 25 Feb 2008) | 6 lines
  
  QPID-107 : Initial ACL implementation for review. Implemented Permissions : Consume, Create, Publish.
  The Permissions are configured via XML in a user friendly way.
  Sections for consume, create and publish are currently used to further define Access and Bind internally.
  Access is granted to all users that have some permission. Bind rights are given to users with Create rights.
  Full details of the ACL design will be posted on the wiki : 
  http://cwiki.apache.org/qpid/qpid-design-access-control-lists.html
........
  r630857 | ritchiem | 2008-02-25 14:11:06 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-107 : Missing acl example config
........
  r630865 | ritchiem | 2008-02-25 14:50:04 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-809 Updated logging and removed an unnecessary printStackTrace().
........
  r630872 | ritchiem | 2008-02-25 15:16:01 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-809 Updated logging and some whitespace changes.
........
  r630873 | ritchiem | 2008-02-25 15:18:23 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-809 Updated logging and some whitespace changes.
........
  r630892 | ritchiem | 2008-02-25 15:52:24 +0000 (Mon, 25 Feb 2008) | 1 line
  
  QPID-107 : Fixed the left over ACL'd ApplicationRegistry from killing subsequent tests.
........
  r630896 | ritchiem | 2008-02-25 15:58:38 +0000 (Mon, 25 Feb 2008) | 2 lines
  
  QPID-809 Updated ignore list
........
  r631141 | ritchiem | 2008-02-26 09:15:31 +0000 (Tue, 26 Feb 2008) | 1 line
  
  QPID=813 : Synchronized getInstance
........
  r631264 | rgodfrey | 2008-02-26 15:55:29 +0000 (Tue, 26 Feb 2008) | 1 line
  
  QPID-804 : Fix Java Broker Python test failures
........
  r631295 | rupertlssmith | 2008-02-26 16:57:05 +0000 (Tue, 26 Feb 2008) | 1 line
  
  QPID-800 : Fixed copyright notices that I had previously missed.
........
  r631296 | ritchiem | 2008-02-26 16:57:29 +0000 (Tue, 26 Feb 2008) | 1 line
  
  QPID-107 : Fixed the left over old AccessManager/PrincipalDatabase references.
........
  r631651 | ritchiem | 2008-02-27 17:11:45 +0000 (Wed, 27 Feb 2008) | 1 line
  
  Updated ignore list for eclipse files.
........
  r631936 | rgodfrey | 2008-02-28 12:05:16 +0000 (Thu, 28 Feb 2008) | 1 line
  
  QPID-818 : Persistent Pub/Sub can get exception on acking message
........

Added:
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/acl.config.xml
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/etc/acl.config.xml
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ACLManager.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/ACLManager.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ACLPlugin.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/ACLPlugin.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/Permission.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/Permission.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/PrincipalPermissions.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/PrincipalPermissions.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/
      - copied from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/management/
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBean.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBean.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/UserManagement.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/management/UserManagement.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/plugins/   (props changed)
      - copied from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/plugins/
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/plugins/AllowAll.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/plugins/AllowAll.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/plugins/DenyAll.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/plugins/DenyAll.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/broker/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java
    incubator/qpid/branches/thegreatmerge/qpid/java/common/src/test/java/org/apache/qpid/framing/AMQShortStringTest.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/common/src/test/java/org/apache/qpid/framing/AMQShortStringTest.java
    incubator/qpid/branches/thegreatmerge/qpid/java/systests/etc/acl.config.xml
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/systests/etc/acl.config.xml
    incubator/qpid/branches/thegreatmerge/qpid/java/systests/src/main/java/org/apache/qpid/server/security/
      - copied from r631936, incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/server/security/
    incubator/qpid/branches/thegreatmerge/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/
      - copied from r631936, incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/server/security/acl/
    incubator/qpid/branches/thegreatmerge/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
      - copied unchanged from r631936, incubator/qpid/branches/M2.1/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
Removed:
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AccessManager.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AccessManagerImpl.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AllowAll.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/DenyAll.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/FileAccessManager.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/PrincipalDatabaseAccessManager.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/UserManagement.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java
Modified:
    incubator/qpid/branches/thegreatmerge/qpid/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/config.xml
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/debug.log4j.xml
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/passwd
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/persistent_config.xml
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/qpid.passwd
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/transient_config.xml
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/log4j.properties
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/TxAck.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/JMSSelectorFilter.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicConsumeMethodHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicPublishMethodHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionOpenMethodHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeclareHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeleteHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueBindHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueUnbindHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionSet.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AccessResult.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/ConfigurationFilePrincipalDatabaseManager.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/util/NullApplicationRegistry.java
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/client-java14/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/client/example/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/failover/FailoverHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionCloseMethodHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/jms/MessageProducer.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/old_test/java/org/apache/qpid/fragmentation/TestLargePublisher.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/old_test/java/org/apache/qpid/pubsub1/TestPublisher.java
    incubator/qpid/branches/thegreatmerge/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
    incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/mina/common/support/DefaultIoFuture.java
    incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java
    incubator/qpid/branches/thegreatmerge/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit-maven-plugin/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/IsolatedClassLoader.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit-maven-plugin/src/main/org/apache/qpid/junit/maven/TKTestScriptGenMojo.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/BaseThrottle.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/DurationTestDecorator.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/SetupTaskAware.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/CommandLineParser.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/ContextualProperties.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/MathUtils.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/ParsedProperties.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/SizeOf.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/StackQueue.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/TestContextProperties.java
    incubator/qpid/branches/thegreatmerge/qpid/java/junit-toolkit/src/main/org/apache/qpid/junit/extensions/util/TestUtils.java
    incubator/qpid/branches/thegreatmerge/qpid/java/management/eclipse-plugin/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/perftests/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/systests/   (props changed)
    incubator/qpid/branches/thegreatmerge/qpid/java/systests/pom.xml
    incubator/qpid/branches/thegreatmerge/qpid/java/systests/src/main/java/org/apache/qpid/server/util/TestApplicationRegistry.java

Propchange: incubator/qpid/branches/thegreatmerge/qpid/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Propchange: incubator/qpid/branches/thegreatmerge/qpid/java/broker/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Feb 28 09:31:56 2008
@@ -4,3 +4,5 @@
 target
 qpid-broker.ipr
 qpid-broker.iws
+.classpath
+.project

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/config.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/config.xml?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/config.xml (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/config.xml Thu Feb 28 09:31:56 2008
@@ -55,32 +55,21 @@
 
     <security>
         <principal-databases>
+            <!-- Example use of Base64 encoded MD5 hashes for authentication via CRAM-MD5-Hashed -->
             <principal-database>
                 <name>passwordfile</name>
-                <class>org.apache.qpid.server.security.auth.database.PlainPasswordVhostFilePrincipalDatabase</class>
+                <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
                 <attributes>
                     <attribute>
                         <name>passwordFile</name>
-                        <value>${conf}/passwdVhost</value>
+                        <value>${conf}/passwd</value>
                     </attribute>
                 </attributes>
             </principal-database>
-
-            <!-- Example use of Base64 encoded MD5 hashes for authentication via CRAM-MD5-Hashed
-            <principal-database>
-                <name>passwordfile</name>
-                <class>org.apache.qpid.server.security.auth.database.Base64MD5PasswordFilePrincipalDatabase</class>
-                <attributes>
-                    <attribute>
-                        <name>passwordFile</name>
-                        <value>${conf}/qpid.passwd</value>
-                    </attribute>
-                </attributes>
-            </principal-database-->
         </principal-databases>
 
         <access>
-            <class>org.apache.qpid.server.security.access.AllowAll</class>
+            <class>org.apache.qpid.server.security.access.plugins.AllowAll</class>
         </access>
         <jmx>
             <access>${conf}/jmxremote.access</access>
@@ -89,13 +78,12 @@
     </security>
 
     <virtualhosts>
+        <directory>${conf}/virtualhosts</directory>
+
         <virtualhost>
             <name>localhost</name>
             <localhost>
                 <store>
-                    <!-- <class>org.apache.qpid.server.store.berkeleydb.BDBMessageStore</class>
-                    <environment-path>${work}/localhost-store</environment-path> -->
-
                     <class>org.apache.qpid.server.store.MemoryMessageStore</class>
                 </store>
                 <txn>
@@ -108,27 +96,6 @@
                     <expiredMessageCheckPeriod>20000</expiredMessageCheckPeriod>
                 </housekeeping>
 
-                <security>
-                    <!-- Need protocol changes to allow this-->
-                    <authentication>
-                        <name>passwordfile</name>
-                        <!-- Currently this can't be used as Vhost isn't specified at connection start only connection open -->
-                        <mechanism>PLAIN</mechanism>
-                    </authentication>
-                    <access>
-                        <class>org.apache.qpid.server.security.access.PrincipalDatabaseAccessManager</class>
-                        <attributes>
-                            <attribute>
-                                <name>principalDatabase</name>
-                                <value>passwordfile</value>
-                            </attribute>
-                            <attribute>
-                                <name>defaultAccessManager</name>
-                                <value>DenyAll</value>
-                            </attribute>
-                        </attributes>
-                    </access>
-                </security>
             </localhost>
         </virtualhost>
 
@@ -141,11 +108,6 @@
                 <txn>
                   	  <class>org.apache.qpid.server.txn.MemoryTransactionManager</class>
                 </txn>
-                <security>
-                    <name>passwordfile-notusedyet</name>
-                    <mechanism>PLAIN</mechanism>
-                    <mechanism>CRAM-MD5</mechanism>
-                </security>
             </development>
         </virtualhost>
 
@@ -158,21 +120,6 @@
                 <txn>
                   	  <class>org.apache.qpid.server.txn.MemoryTransactionManager</class>
                 </txn>
-                <security>
-                    <name>passwordfile-notusedyet</name>
-                    <mechanism>PLAIN</mechanism>
-                    <mechanism>CRAM-MD5</mechanism>
-                </security>
-                <access>
-                    <class>org.apache.qpid.server.security.access.PrincipalDatabaseAccessManager</class>
-                    <attributes>
-                        <attribute>
-                            <name>principalDatabase</name>
-                            <value>rubbish-to-cause-default</value>
-                        </attribute>
-                    </attributes>
-                </access>
-
             </test>
         </virtualhost>
 
@@ -187,6 +134,5 @@
 
     <virtualhosts>${conf}/virtualhosts.xml</virtualhosts>
 </broker>
-
 
 

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/debug.log4j.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/debug.log4j.xml?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/debug.log4j.xml (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/debug.log4j.xml Thu Feb 28 09:31:56 2008
@@ -106,9 +106,9 @@
 
     <!-- Log all info events to file -->
     <root>
-        <priority value="info"/>
+        <priority value="debug"/>
         <appender-ref ref="STDOUT"/>
-        <appender-ref ref="FileAppender"/>
+        <!--appender-ref ref="FileAppender"/-->
     </root>
 
 </log4j:configuration>

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/passwd
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/passwd?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/passwd (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/passwd Thu Feb 28 09:31:56 2008
@@ -17,3 +17,6 @@
 # under the License.
 #
 guest:guest
+client:guest
+server:guest
+

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/persistent_config.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/persistent_config.xml?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/persistent_config.xml (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/persistent_config.xml Thu Feb 28 09:31:56 2008
@@ -51,18 +51,18 @@
         <principal-databases>
             <principal-database>
                 <name>passwordfile</name>
-                <class>org.apache.qpid.server.security.auth.database.PlainPasswordVhostFilePrincipalDatabase</class>
+                <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
                 <attributes>
                     <attribute>
                         <name>passwordFile</name>
-                        <value>${conf}/passwdVhost</value>
+                        <value>${conf}/passwd</value>
                     </attribute>
                 </attributes>
             </principal-database>
         </principal-databases>
 
         <access>
-            <class>org.apache.qpid.server.security.access.AllowAll</class>
+            <class>org.apache.qpid.server.security.access.plugins.AllowAll</class>
         </access>
         <jmx>
             <access>${conf}/jmxremote.access</access>
@@ -76,7 +76,7 @@
             <localhost>
                 <store>
                     <environment-path>${work}/bdbstore/localhost-store</environment-path>
-                   <class>org.apache.qpid.server.store.berkeleydb.messageStore.MessageStoreImpl</class> 
+                    <class>org.apache.qpid.server.store.berkeleydb.messageStore.MessageStoreImpl</class> 
                 </store>             
                 <txn>
                     <environment-tx-timeout>60</environment-tx-timeout>

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/qpid.passwd
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/qpid.passwd?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/qpid.passwd (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/qpid.passwd Thu Feb 28 09:31:56 2008
@@ -19,4 +19,5 @@
 guest:CE4DQ6BIb/BVMN9scFyLtA==
 admin:ISMvKXpXpadDiUoOSoAfww==
 user:CE4DQ6BIb/BVMN9scFyLtA==
-
+server:CE4DQ6BIb/BVMN9scFyLtA==
+client:CE4DQ6BIb/BVMN9scFyLtA==

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/transient_config.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/transient_config.xml?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/transient_config.xml (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/etc/transient_config.xml Thu Feb 28 09:31:56 2008
@@ -61,7 +61,7 @@
             </principal-database>
         </principal-databases>
         <access>
-            <class>org.apache.qpid.server.security.access.AllowAll</class>
+            <class>org.apache.qpid.server.security.access.plugins.AllowAll</class>
         </access>
         <jmx>
             <access>${conf}/jmxremote.access</access>
@@ -84,7 +84,7 @@
 
                 <security>
                     <access>
-                        <class>org.apache.qpid.server.security.access.PrincipalDatabaseAccessManager</class>
+                        <class>org.apache.qpid.server.security.old.PrincipalDatabaseAccessManager</class>
                         <attributes>
                             <attribute>
                                 <name>principalDatabase</name>

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/log4j.properties?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/log4j.properties (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/log4j.properties Thu Feb 28 09:31:56 2008
@@ -19,6 +19,6 @@
 log4j.rootCategory=${amqj.logging.level}, console
 
 log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Threshold=info
+log4j.appender.console.Threshold=all
 log4j.appender.console.layout=org.apache.log4j.PatternLayout
 log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/TxAck.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/TxAck.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/TxAck.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/TxAck.java Thu Feb 28 09:31:56 2008
@@ -100,10 +100,9 @@
         //make persistent changes, i.e. dequeue and decrementReference
         for (UnacknowledgedMessage msg : _unacked)
         {
-            //msg.restoreTransientMessageData();
-
             //Message has been ack so discard it. This will dequeue and decrement the reference.
             msg.discard(storeContext);
+
         }
     }
 
@@ -115,7 +114,6 @@
         //in memory (persistent changes will be rolled back by store)
         for (UnacknowledgedMessage msg : _unacked)
         {
-            msg.clearTransientMessageData();
             msg.getMessage().takeReference();
         }
     }
@@ -124,11 +122,6 @@
     {
         //remove the unacked messages from the channels map
         _map.remove(_unacked);
-        for (UnacknowledgedMessage msg : _unacked)
-        {
-            msg.clearTransientMessageData();
-        }
-
     }
 
     public void rollback(StoreContext storeContext)

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/ack/UnacknowledgedMessage.java Thu Feb 28 09:31:56 2008
@@ -68,16 +68,6 @@
         entry.getMessage().decrementReference(storeContext);
     }
 
-    public void restoreTransientMessageData() throws AMQException
-    {
-        entry.getMessage().restoreTransientMessageData();
-    }
-
-    public void clearTransientMessageData()
-    {
-        entry.getMessage().clearTransientMessageData();
-    }
-
     public AMQMessage getMessage()
     {
         return entry.getMessage();

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java Thu Feb 28 09:31:56 2008
@@ -86,7 +86,7 @@
             new ConcurrentHashMap<AMQShortString, List<AMQQueue>>();
     private final ConcurrentHashMap<AMQShortString, List<AMQQueue>> _wildCardBindingKey2queues =
             new ConcurrentHashMap<AMQShortString, List<AMQQueue>>();
-    // private ConcurrentHashMap<AMQShortString, AMQQueue> _routingKey2queue = new ConcurrentHashMap<AMQShortString, AMQQueue>();
+
     private static final byte TOPIC_SEPARATOR = (byte)'.';
     private static final AMQShortString TOPIC_SEPARATOR_AS_SHORTSTRING = new AMQShortString(".");
     private static final AMQShortString AMQP_STAR_TOKEN = new AMQShortString("*");
@@ -279,16 +279,6 @@
 
 
         AMQShortString normalizedString = AMQShortString.join(subscriptionList, TOPIC_SEPARATOR_AS_SHORTSTRING);
-/*
-        StringBuilder sb = new StringBuilder();
-        for (AMQShortString s : subscriptionList)
-        {
-            sb.append(s);
-            sb.append(TOPIC_SEPARATOR);
-        }
-
-        sb.deleteCharAt(sb.length() - 1);
-*/
 
         return normalizedString;
     }
@@ -459,11 +449,6 @@
                 {
 
                     AMQShortString next = routingTokens.nextToken();
-        /*            if (next.equals(AMQP_HASH) && routingkeyTokens.get(routingkeyTokens.size() - 1).equals(AMQP_HASH))
-                    {
-                        continue;
-                    }
-        */
 
                     routingkeyTokens[token++] = next;
                 }

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/JMSSelectorFilter.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/JMSSelectorFilter.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/JMSSelectorFilter.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/JMSSelectorFilter.java Thu Feb 28 09:31:56 2008
@@ -56,7 +56,7 @@
         catch (AMQException e)
         {
             //fixme this needs to be sorted.. it shouldn't happen
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+            e.printStackTrace();  
         }
         return false;
     }

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicConsumeMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicConsumeMethodHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicConsumeMethodHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicConsumeMethodHandler.java Thu Feb 28 09:31:56 2008
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -24,20 +24,20 @@
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.*;
 import org.apache.qpid.protocol.AMQConstant;
-import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.AMQChannel;
 import org.apache.qpid.server.ConsumerTagNotUniqueException;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.ExistingExclusiveSubscriptionException;
 import org.apache.qpid.server.queue.ExistingSubscriptionPreventsExclusiveException;
+import org.apache.qpid.server.security.access.Permission;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
 public class BasicConsumeMethodHandler implements StateAwareMethodListener<BasicConsumeBody>
 {
-    private static final Logger _log = Logger.getLogger(BasicConsumeMethodHandler.class);
+    private static final Logger _logger = Logger.getLogger(BasicConsumeMethodHandler.class);
 
     private static final BasicConsumeMethodHandler _instance = new BasicConsumeMethodHandler();
 
@@ -67,21 +67,21 @@
         }
         else
         {
-            if (_log.isDebugEnabled())
+            if (_logger.isDebugEnabled())
             {
-                _log.debug("BasicConsume: from '" + body.getQueue() +
-                           "' for:" + body.getConsumerTag() +
-                           " nowait:" + body.getNowait() +
-                           " args:" + body.getArguments());
+                _logger.debug("BasicConsume: from '" + body.getQueue() +
+                              "' for:" + body.getConsumerTag() +
+                              " nowait:" + body.getNowait() +
+                              " args:" + body.getArguments());
             }
 
             AMQQueue queue = body.getQueue() == null ? channel.getDefaultQueue() : vHost.getQueueRegistry().getQueue(body.getQueue().intern());
 
             if (queue == null)
             {
-                if (_log.isDebugEnabled())
+                if (_logger.isDebugEnabled())
                 {
-                    _log.debug("No queue for '" + body.getQueue() + "'");
+                    _logger.debug("No queue for '" + body.getQueue() + "'");
                 }
                 if (body.getQueue() != null)
                 {
@@ -99,6 +99,9 @@
 
                 final AMQShortString consumerTagName;
 
+                //Perform ACLs
+                vHost.getAccessManager().authorise(session, Permission.CONSUME, body, queue);
+
                 if (body.getConsumerTag() != null)
                 {
                     consumerTagName = body.getConsumerTag().intern();
@@ -125,7 +128,7 @@
                 }
                 catch (org.apache.qpid.AMQInvalidArgumentException ise)
                 {
-                    _log.debug("Closing connection due to invalid selector");
+                    _logger.debug("Closing connection due to invalid selector");
 
                     MethodRegistry methodRegistry = session.getMethodRegistry();
                     AMQMethodBody responseBody = methodRegistry.createChannelCloseBody(AMQConstant.INVALID_ARGUMENT.getCode(),

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java Thu Feb 28 09:31:56 2008
@@ -27,10 +27,10 @@
 import org.apache.qpid.framing.BasicGetEmptyBody;
 import org.apache.qpid.framing.MethodRegistry;
 import org.apache.qpid.protocol.AMQConstant;
-import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.AMQChannel;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.AMQQueue;
+import org.apache.qpid.server.security.access.Permission;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.virtualhost.VirtualHost;
@@ -82,7 +82,11 @@
             }
             else
             {
-                if(!queue.performGet(session, channel, !body.getNoAck()))
+
+                //Perform ACLs
+                vHost.getAccessManager().authorise(session, Permission.CONSUME, body, queue);
+
+                if (!queue.performGet(session, channel, !body.getNoAck()))
                 {
                     MethodRegistry methodRegistry = session.getMethodRegistry();
                     // TODO - set clusterId

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicPublishMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicPublishMethodHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicPublishMethodHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicPublishMethodHandler.java Thu Feb 28 09:31:56 2008
@@ -25,20 +25,19 @@
 import org.apache.qpid.exchange.ExchangeDefaults;
 import org.apache.qpid.framing.BasicPublishBody;
 import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.MethodRegistry;
-import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.protocol.AMQConstant;
 import org.apache.qpid.server.AMQChannel;
 import org.apache.qpid.framing.abstraction.MessagePublishInfo;
 import org.apache.qpid.server.exchange.Exchange;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
+import org.apache.qpid.server.security.access.Permission;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
-public class BasicPublishMethodHandler  implements StateAwareMethodListener<BasicPublishBody>
+public class BasicPublishMethodHandler implements StateAwareMethodListener<BasicPublishBody>
 {
-    private static final Logger _log = Logger.getLogger(BasicPublishMethodHandler.class);
+    private static final Logger _logger = Logger.getLogger(BasicPublishMethodHandler.class);
 
     private static final BasicPublishMethodHandler _instance = new BasicPublishMethodHandler();
 
@@ -55,12 +54,9 @@
     public void methodReceived(AMQStateManager stateManager, BasicPublishBody body, int channelId) throws AMQException
     {
         AMQProtocolSession session = stateManager.getProtocolSession();
-
-
-
-        if (_log.isDebugEnabled())
+        if (_logger.isDebugEnabled())
         {
-            _log.debug("Publish received on channel " + channelId);
+            _logger.debug("Publish received on channel " + channelId);
         }
 
         AMQShortString exchange = body.getExchange();
@@ -89,6 +85,9 @@
             {
                 throw body.getChannelNotFoundException(channelId);
             }
+
+            //Access Control
+            vHost.getAccessManager().authorise(session, Permission.PUBLISH, body, e);
 
             MessagePublishInfo info = session.getMethodRegistry().getProtocolVersionMethodConverter().convertToInfo(body);
             info.setExchange(exchange);

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionOpenMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionOpenMethodHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionOpenMethodHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionOpenMethodHandler.java Thu Feb 28 09:31:56 2008
@@ -23,14 +23,12 @@
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.*;
 import org.apache.qpid.protocol.AMQConstant;
-import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
+import org.apache.qpid.server.security.access.Permission;
 import org.apache.qpid.server.state.AMQState;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.security.access.AccessResult;
-import org.apache.qpid.server.security.access.AccessRights;
 import org.apache.log4j.Logger;
 
 public class ConnectionOpenMethodHandler implements StateAwareMethodListener<ConnectionOpenBody>
@@ -79,22 +77,8 @@
         {
             session.setVirtualHost(virtualHost);
 
-            AccessResult result = virtualHost.getAccessManager().isAuthorized(virtualHost, session.getAuthorizedID(), AccessRights.Rights.ANY);
-
-            switch (result.getStatus())
-            {
-                default:
-                case REFUSED:
-                    String error = "Any access denied to vHost '" + virtualHostName + "' by "
-                                   + result.getAuthorizer();
-                    
-                    _logger.warn(error);
-
-                    throw body.getConnectionException(AMQConstant.ACCESS_REFUSED, error);
-                case GRANTED:
-                    _logger.info("Granted any access to vHost '" + virtualHostName + "' for " + session.getAuthorizedID()
-                                 + " by '" + result.getAuthorizer() + "'");
-            }
+            //Perform ACL
+            virtualHost.getAccessManager().authorise(session, Permission.ACCESS ,body, virtualHost);
 
             // See Spec (0.8.2). Section  3.1.2 Virtual Hosts
             if (session.getContextKey() == null)

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeclareHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeclareHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeclareHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeclareHandler.java Thu Feb 28 09:31:56 2008
@@ -26,11 +26,11 @@
 import org.apache.qpid.AMQUnknownExchangeType;
 import org.apache.qpid.framing.*;
 import org.apache.qpid.protocol.AMQConstant;
-import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.exchange.Exchange;
 import org.apache.qpid.server.exchange.ExchangeFactory;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
+import org.apache.qpid.server.security.access.Permission;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.virtualhost.VirtualHost;
@@ -58,7 +58,9 @@
         VirtualHost virtualHost = session.getVirtualHost();
         ExchangeRegistry exchangeRegistry = virtualHost.getExchangeRegistry();
         ExchangeFactory exchangeFactory = virtualHost.getExchangeFactory();
-        
+
+        //Perform ACL
+        virtualHost.getAccessManager().authorise(session, Permission.CREATE, body);
 
         if (_logger.isDebugEnabled())
         {

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeleteHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeleteHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeleteHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ExchangeDeleteHandler.java Thu Feb 28 09:31:56 2008
@@ -21,13 +21,12 @@
 package org.apache.qpid.server.handler;
 
 import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQFrame;
 import org.apache.qpid.framing.ExchangeDeleteBody;
 import org.apache.qpid.framing.ExchangeDeleteOkBody;
-import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.exchange.ExchangeInUseException;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
+import org.apache.qpid.server.security.access.Permission;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.virtualhost.VirtualHost;
@@ -51,6 +50,9 @@
         VirtualHost virtualHost = session.getVirtualHost();
         ExchangeRegistry exchangeRegistry = virtualHost.getExchangeRegistry();
 
+        //Perform ACLs
+        virtualHost.getAccessManager().authorise(session, Permission.DELETE,body,
+                                                 exchangeRegistry.getExchange(body.getExchange()));
 
         try
         {

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueBindHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueBindHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueBindHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueBindHandler.java Thu Feb 28 09:31:56 2008
@@ -25,13 +25,13 @@
 import org.apache.qpid.AMQInvalidRoutingKeyException;
 import org.apache.qpid.framing.*;
 import org.apache.qpid.protocol.AMQConstant;
-import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.AMQChannel;
 import org.apache.qpid.server.exchange.Exchange;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.QueueRegistry;
+import org.apache.qpid.server.security.access.Permission;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.virtualhost.VirtualHost;
@@ -106,6 +106,10 @@
 
         try
         {
+
+            //Perform ACLs
+            virtualHost.getAccessManager().authorise(session, Permission.BIND, body, exch, queue, routingKey);
+
             if (!exch.isBound(routingKey, body.getArguments(), queue))
             {
                 queue.bind(routingKey, body.getArguments(), exch);

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java Thu Feb 28 09:31:56 2008
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -26,10 +26,9 @@
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.configuration.Configured;
-import org.apache.qpid.exchange.ExchangeDefaults;
+
 import org.apache.qpid.framing.*;
 import org.apache.qpid.protocol.AMQConstant;
-import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.configuration.Configurator;
 import org.apache.qpid.server.configuration.VirtualHostConfiguration;
 import org.apache.qpid.server.exchange.Exchange;
@@ -37,6 +36,7 @@
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.QueueRegistry;
+import org.apache.qpid.server.security.access.Permission;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.store.MessageStore;
@@ -46,7 +46,7 @@
 
 public class QueueDeclareHandler implements StateAwareMethodListener<QueueDeclareBody>
 {
-    private static final Logger _log = Logger.getLogger(QueueDeclareHandler.class);
+    private static final Logger _logger = Logger.getLogger(QueueDeclareHandler.class);
 
     private static final QueueDeclareHandler _instance = new QueueDeclareHandler();
 
@@ -74,6 +74,8 @@
         QueueRegistry queueRegistry = virtualHost.getQueueRegistry();
         MessageStore store = virtualHost.getMessageStore();
 
+        // Perform ACL on queue Creation
+        virtualHost.getAccessManager().authorise(session, Permission.CREATE, body);
 
 
 
@@ -106,7 +108,7 @@
                 }
                 else
                 {
-                    queue = createQueue(queueName,body, virtualHost, session);
+                    queue = createQueue(queueName, body, virtualHost, session);
                     if (queue.isDurable() && !queue.isAutoDelete())
                     {
                         //DTX MessageStore
@@ -123,8 +125,12 @@
                     {
                         Exchange defaultExchange = exchangeRegistry.getDefaultExchange();
 
+                        // Perform ACL to control bindings
+                        virtualHost.getAccessManager().authorise(session, Permission.BIND, body,
+                                                                 defaultExchange, queue, queueName);
+
                         queue.bind(queueName, null, defaultExchange);
-                        _log.info("Queue " + queueName + " bound to default exchange(" + defaultExchange.getName() + ")");
+                        _logger.info("Queue " + queueName + " bound to default exchange(" + defaultExchange.getName() + ")");
                     }
                 }
             }
@@ -156,7 +162,7 @@
                                                             queue.getConsumerCount());
             session.writeFrame(responseBody.generateFrame(channelId));
 
-            _log.info("Queue " + queueName + " declared successfully");
+            _logger.info("Queue " + queueName + " declared successfully");
         }
     }
 

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java Thu Feb 28 09:31:56 2008
@@ -36,6 +36,7 @@
 import org.apache.qpid.server.AMQChannel;
 import org.apache.qpid.server.exception.InternalErrorException;
 import org.apache.qpid.server.exception.QueueDoesntExistException;
+import org.apache.qpid.server.security.access.Permission;
 
 public class QueueDeleteHandler implements StateAwareMethodListener<QueueDeleteBody>
 {
@@ -105,6 +106,10 @@
             }
             else
             {
+
+                //Perform ACLs
+                virtualHost.getAccessManager().authorise(session, Permission.DELETE, body, queue);
+
                 int purged = queue.delete(body.getIfUnused(), body.getIfEmpty());
 
                 if (queue.isDurable())

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java Thu Feb 28 09:31:56 2008
@@ -35,6 +35,7 @@
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 import org.apache.qpid.server.AMQChannel;
+import org.apache.qpid.server.security.access.Permission;
 
 public class QueuePurgeHandler implements StateAwareMethodListener<QueuePurgeBody>
 {
@@ -100,6 +101,10 @@
         }
         else
         {
+
+                //Perform ACLs
+                virtualHost.getAccessManager().authorise(session, Permission.PURGE, body, queue);
+
                 long purged = queue.clearQueue(channel.getStoreContext());
 
 

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueUnbindHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueUnbindHandler.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueUnbindHandler.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueUnbindHandler.java Thu Feb 28 09:31:56 2008
@@ -1,110 +1,113 @@
-package org.apache.qpid.server.handler;
-
-import org.apache.log4j.Logger;
-
-import org.apache.qpid.framing.*;
-import org.apache.qpid.framing.amqp_0_9.MethodRegistry_0_9;
-import org.apache.qpid.server.state.StateAwareMethodListener;
-import org.apache.qpid.server.state.AMQStateManager;
-import org.apache.qpid.server.protocol.AMQProtocolSession;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.exchange.Exchange;
-import org.apache.qpid.server.queue.QueueRegistry;
-import org.apache.qpid.server.queue.AMQQueue;
-import org.apache.qpid.server.AMQChannel;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.AMQInvalidRoutingKeyException;
-import org.apache.qpid.protocol.AMQConstant;
-
-public class QueueUnbindHandler implements StateAwareMethodListener<QueueUnbindBody>
-{
-    private static final Logger _log = Logger.getLogger(QueueUnbindHandler.class);
-
-    private static final QueueUnbindHandler _instance = new QueueUnbindHandler();
-
-    public static QueueUnbindHandler getInstance()
-    {
-        return _instance;
-    }
-
-    private QueueUnbindHandler()
-    {
-    }
-
-    public void methodReceived(AMQStateManager stateManager, QueueUnbindBody body, int channelId) throws AMQException
-    {
-        AMQProtocolSession session = stateManager.getProtocolSession();
-        VirtualHost virtualHost = session.getVirtualHost();
-        ExchangeRegistry exchangeRegistry = virtualHost.getExchangeRegistry();
-        QueueRegistry queueRegistry = virtualHost.getQueueRegistry();
-
-
-        final AMQQueue queue;
-        final AMQShortString routingKey;
-
-        if (body.getQueue() == null)
-        {
-            AMQChannel channel = session.getChannel(channelId);
-
-            if (channel == null)
-            {
-                throw body.getChannelNotFoundException(channelId);
-            }
-
-            queue = channel.getDefaultQueue();
-
-            if (queue == null)
-            {
-                throw body.getConnectionException(AMQConstant.NOT_FOUND, "No default queue defined on channel and queue was null");
-            }
-
-            routingKey = body.getRoutingKey() == null ? null : body.getRoutingKey().intern();
-
-        }
-        else
-        {
-            queue = queueRegistry.getQueue(body.getQueue());
-            routingKey = body.getRoutingKey() == null ? null : body.getRoutingKey().intern();
-        }
-
-        if (queue == null)
-        {
-            throw body.getConnectionException(AMQConstant.NOT_FOUND, "Queue " + body.getQueue() + " does not exist.");
-        }
-        final Exchange exch = exchangeRegistry.getExchange(body.getExchange());
-        if (exch == null)
-        {
-            throw body.getChannelException(AMQConstant.NOT_FOUND, "Exchange " + body.getExchange() + " does not exist.");
-        }
-
-
-        try
-        {
-            queue.unBind(routingKey, body.getArguments(), exch);
-        }
-        catch (AMQInvalidRoutingKeyException rke)
-        {
-            throw body.getChannelException(AMQConstant.INVALID_ROUTING_KEY, routingKey.toString());
-        }
-        catch (AMQException e)
-        {
-            if(e.getErrorCode() == AMQConstant.NOT_FOUND)
-            {
-                throw body.getConnectionException(AMQConstant.NOT_FOUND,e.getMessage(),e);
-            }
-            throw body.getChannelException(AMQConstant.CHANNEL_ERROR, e.toString());
-        }
-
-        if (_log.isInfoEnabled())
-        {
-            _log.info("Binding queue " + queue + " to exchange " + exch + " with routing key " + routingKey);
-        }
-
-        MethodRegistry_0_9 methodRegistry = (MethodRegistry_0_9) session.getMethodRegistry();
-        AMQMethodBody responseBody = methodRegistry.createQueueUnbindOkBody();
-        session.writeFrame(responseBody.generateFrame(channelId));
-
-
-    }
-}
+package org.apache.qpid.server.handler;
+
+import org.apache.log4j.Logger;
+
+import org.apache.qpid.framing.*;
+import org.apache.qpid.framing.amqp_0_9.MethodRegistry_0_9;
+import org.apache.qpid.server.state.StateAwareMethodListener;
+import org.apache.qpid.server.state.AMQStateManager;
+import org.apache.qpid.server.protocol.AMQProtocolSession;
+import org.apache.qpid.server.virtualhost.VirtualHost;
+import org.apache.qpid.server.exchange.ExchangeRegistry;
+import org.apache.qpid.server.exchange.Exchange;
+import org.apache.qpid.server.queue.QueueRegistry;
+import org.apache.qpid.server.queue.AMQQueue;
+import org.apache.qpid.server.AMQChannel;
+import org.apache.qpid.server.security.access.Permission;
+import org.apache.qpid.AMQException;
+import org.apache.qpid.AMQInvalidRoutingKeyException;
+import org.apache.qpid.protocol.AMQConstant;
+
+public class QueueUnbindHandler implements StateAwareMethodListener<QueueUnbindBody>
+{
+    private static final Logger _log = Logger.getLogger(QueueUnbindHandler.class);
+
+    private static final QueueUnbindHandler _instance = new QueueUnbindHandler();
+
+    public static QueueUnbindHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private QueueUnbindHandler()
+    {
+    }
+
+    public void methodReceived(AMQStateManager stateManager, QueueUnbindBody body, int channelId) throws AMQException
+    {
+        AMQProtocolSession session = stateManager.getProtocolSession();
+        VirtualHost virtualHost = session.getVirtualHost();
+        ExchangeRegistry exchangeRegistry = virtualHost.getExchangeRegistry();
+        QueueRegistry queueRegistry = virtualHost.getQueueRegistry();
+
+
+        final AMQQueue queue;
+        final AMQShortString routingKey;
+
+        if (body.getQueue() == null)
+        {
+            AMQChannel channel = session.getChannel(channelId);
+
+            if (channel == null)
+            {
+                throw body.getChannelNotFoundException(channelId);
+            }
+
+            queue = channel.getDefaultQueue();
+
+            if (queue == null)
+            {
+                throw body.getConnectionException(AMQConstant.NOT_FOUND, "No default queue defined on channel and queue was null");
+            }
+
+            routingKey = body.getRoutingKey() == null ? null : body.getRoutingKey().intern();
+
+        }
+        else
+        {
+            queue = queueRegistry.getQueue(body.getQueue());
+            routingKey = body.getRoutingKey() == null ? null : body.getRoutingKey().intern();
+        }
+
+        if (queue == null)
+        {
+            throw body.getConnectionException(AMQConstant.NOT_FOUND, "Queue " + body.getQueue() + " does not exist.");
+        }
+        final Exchange exch = exchangeRegistry.getExchange(body.getExchange());
+        if (exch == null)
+        {
+            throw body.getChannelException(AMQConstant.NOT_FOUND, "Exchange " + body.getExchange() + " does not exist.");
+        }
+
+        //Perform ACLs
+        virtualHost.getAccessManager().authorise(session, Permission.UNBIND, body, queue);
+
+        try
+        {
+            queue.unBind(routingKey, body.getArguments(), exch);
+        }
+        catch (AMQInvalidRoutingKeyException rke)
+        {
+            throw body.getChannelException(AMQConstant.INVALID_ROUTING_KEY, routingKey.toString());
+        }
+        catch (AMQException e)
+        {
+            if(e.getErrorCode() == AMQConstant.NOT_FOUND)
+            {
+                throw body.getConnectionException(AMQConstant.NOT_FOUND,e.getMessage(),e);
+            }
+            throw body.getChannelException(AMQConstant.CHANNEL_ERROR, e.toString());
+        }
+
+        if (_log.isInfoEnabled())
+        {
+            _log.info("Binding queue " + queue + " to exchange " + exch + " with routing key " + routingKey);
+        }
+
+        MethodRegistry_0_9 methodRegistry = (MethodRegistry_0_9) session.getMethodRegistry();
+        AMQMethodBody responseBody = methodRegistry.createQueueUnbindOkBody();
+        session.writeFrame(responseBody.generateFrame(channelId));
+
+
+    }
+}

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java Thu Feb 28 09:31:56 2008
@@ -20,7 +20,7 @@
  */
 package org.apache.qpid.server.management;
 
-import org.apache.qpid.server.security.access.UserManagement;
+import org.apache.qpid.server.security.access.management.UserManagement;
 import org.apache.log4j.Logger;
 
 import javax.management.remote.MBeanServerForwarder;

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMinaProtocolSession.java Thu Feb 28 09:31:56 2008
@@ -109,7 +109,7 @@
     private FieldTable _clientProperties;
     private final List<Task> _taskList = new CopyOnWriteArrayList<Task>();
 
-    private List<Integer> _closingChannelsList = new ArrayList<Integer>();
+    private List<Integer> _closingChannelsList = new CopyOnWriteArrayList<Integer>();
     private ProtocolOutputConverter _protocolOutputConverter;
     private Principal _authorizedID;
     private MethodDispatcher _dispatcher;
@@ -208,9 +208,39 @@
         {
             _logger.debug("Frame Received: " + frame);
         }
+
+        // Check that this channel is not closing
+        if (channelAwaitingClosure(channelId))
+        {
+            if ((frame.getBodyFrame() instanceof ChannelCloseOkBody))
+            {
+                if (_logger.isInfoEnabled())
+                {
+                    _logger.info("Channel[" + channelId + "] awaiting closure - processing close-ok");
+                }
+            }
+            else
+            {
+                if (_logger.isInfoEnabled())
+                {
+                    _logger.info("Channel[" + channelId + "] awaiting closure ignoring");
+                }
+
+                return;
+            }
+        }
                 
 
-        body.handle(channelId, this);
+
+        try
+        {
+            body.handle(channelId, this);
+        }
+        catch (AMQException e)
+        {
+            closeChannel(channelId);
+            throw e;
+        }
 
     }
 
@@ -259,27 +289,6 @@
 
         final AMQMethodEvent<AMQMethodBody> evt = new AMQMethodEvent<AMQMethodBody>(channelId, methodBody);
 
-        // Check that this channel is not closing
-        if (channelAwaitingClosure(channelId))
-        {
-            if ((evt.getMethod() instanceof ChannelCloseOkBody))
-            {
-                if (_logger.isInfoEnabled())
-                {
-                    _logger.info("Channel[" + channelId + "] awaiting closure - processing close-ok");
-                }
-            }
-            else
-            {
-                if (_logger.isInfoEnabled())
-                {
-                    _logger.info("Channel[" + channelId + "] awaiting closure ignoring");
-                }
-
-                return;
-            }
-        }
-
         try
         {
             try
@@ -341,6 +350,7 @@
                     _logger.info("Closing connection due to: " + e.getMessage());
                 }
 
+                markChannelawaitingCloseOk(channelId);
                 closeSession();
                 _stateManager.changeState(AMQState.CONNECTION_CLOSING);
                 writeFrame(e.getCloseFrame(channelId));

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQMessage.java Thu Feb 28 09:31:56 2008
@@ -806,10 +806,6 @@
         _transientMessageData = transientMessageData;
     }
 
-    public void clearTransientMessageData()
-    {
-        _transientMessageData = null;
-    }
 
     public String toString()
     {

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionSet.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionSet.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionSet.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SubscriptionSet.java Thu Feb 28 09:31:56 2008
@@ -271,8 +271,4 @@
         _exclusive = exclusive;
     }
 
-    public boolean getExcBoolean()
-    {
-        return _exclusive;
-    }
 }

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java Thu Feb 28 09:31:56 2008
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -39,8 +39,8 @@
 import org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatabaseManager;
 import org.apache.qpid.server.security.auth.database.PrincipalDatabaseManager;
 import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
-import org.apache.qpid.server.security.access.AccessManager;
-import org.apache.qpid.server.security.access.AccessManagerImpl;
+import org.apache.qpid.server.security.access.ACLPlugin;
+import org.apache.qpid.server.security.access.ACLManager;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
 import org.apache.qpid.AMQException;
@@ -52,13 +52,14 @@
 
     private AuthenticationManager _authenticationManager;
 
-    private AccessManager _accessManager;
+    private ACLPlugin _accessManager;
 
     private PrincipalDatabaseManager _databaseManager;
 
     private VirtualHostRegistry _virtualHostRegistry;
 
 
+    //fixme Why is this not used.
     private final Map<String, VirtualHost> _virtualHosts = new ConcurrentHashMap<String, VirtualHost>();
 
     private PluginManager _pluginManager;
@@ -110,7 +111,7 @@
 
         _virtualHostRegistry = new VirtualHostRegistry();
 
-        _accessManager = new AccessManagerImpl("default", _configuration);
+        _accessManager = ACLManager.loadACLManager("default", _configuration);
 
         _databaseManager = new ConfigurationFilePrincipalDatabaseManager();
 
@@ -121,7 +122,7 @@
         _managedObjectRegistry.start();
 
         _pluginManager = new PluginManager(_configuration.getString("plugin-directory"));
-        
+
         initialiseVirtualHosts();
 
     }
@@ -154,7 +155,7 @@
         return _virtualHostRegistry;
     }
 
-    public AccessManager getAccessManager()
+    public ACLPlugin getAccessManager()
     {
         return _accessManager;
     }
@@ -178,7 +179,7 @@
     {
         return getConfiguration().getList("virtualhosts.virtualhost.name");
     }
-    
+
     public PluginManager getPluginManager()
     {
         return _pluginManager;

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java Thu Feb 28 09:31:56 2008
@@ -27,7 +27,7 @@
 import org.apache.qpid.server.plugins.PluginManager;
 import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
 import org.apache.qpid.server.security.auth.database.PrincipalDatabaseManager;
-import org.apache.qpid.server.security.access.AccessManager;
+import org.apache.qpid.server.security.access.ACLPlugin;
 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
 
 public interface IApplicationRegistry
@@ -68,8 +68,8 @@
 
     VirtualHostRegistry getVirtualHostRegistry();
 
-    AccessManager getAccessManager();
-    
+    ACLPlugin getAccessManager();
+
     PluginManager getPluginManager();
     
 }

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AccessResult.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AccessResult.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AccessResult.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/AccessResult.java Thu Feb 28 09:31:56 2008
@@ -30,15 +30,15 @@
     StringBuilder _authorizer;
     AccessStatus _status;
 
-    public AccessResult(AccessManager authorizer, AccessStatus status)
+    public AccessResult(ACLPlugin authorizer, AccessStatus status)
     {
         _status = status;
-        _authorizer = new StringBuilder(authorizer.getName());        
+        _authorizer = new StringBuilder(authorizer.getPluginName());
     }
 
-    public void setAuthorizer(AccessManager authorizer)
+    public void setAuthorizer(ACLPlugin authorizer)
     {
-        _authorizer.append(authorizer.getName());
+        _authorizer.append(authorizer.getPluginName());
     }
 
     public String getAuthorizer()
@@ -56,10 +56,10 @@
         return _status;
     }
 
-    public void addAuthorizer(AccessManager accessManager)
+    public void addAuthorizer(ACLPlugin accessManager)
     {
         _authorizer.insert(0, "->");
-        _authorizer.insert(0, accessManager.getName());
+        _authorizer.insert(0, accessManager.getPluginName());
     }
 
 

Propchange: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/plugins/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Feb 28 09:31:56 2008
@@ -0,0 +1 @@
+Caching.java

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java Thu Feb 28 09:31:56 2008
@@ -24,7 +24,7 @@
 import org.apache.qpid.server.security.auth.sasl.AuthenticationProviderInitialiser;
 import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
 import org.apache.qpid.server.security.auth.sasl.crammd5.CRAMMD5HashedInitialiser;
-import org.apache.qpid.server.security.access.AMQUserManagementMBean;
+import org.apache.qpid.server.security.access.management.AMQUserManagementMBean;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.EncoderException;
 
@@ -45,7 +45,6 @@
 import java.util.concurrent.locks.ReentrantLock;
 import java.security.Principal;
 import java.security.NoSuchAlgorithmException;
-import java.security.MessageDigest;
 
 /**
  * Represents a user database where the account information is stored in a simple flat file.

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/ConfigurationFilePrincipalDatabaseManager.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/ConfigurationFilePrincipalDatabaseManager.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/ConfigurationFilePrincipalDatabaseManager.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/ConfigurationFilePrincipalDatabaseManager.java Thu Feb 28 09:31:56 2008
@@ -41,6 +41,8 @@
 import org.apache.qpid.server.security.access.AMQUserManagementMBean;
 import org.apache.qpid.server.security.auth.database.PrincipalDatabase;
 import org.apache.qpid.server.security.auth.database.PrincipalDatabaseManager;
+import org.apache.qpid.server.security.access.management.AMQUserManagementMBean;
+import org.apache.qpid.AMQException;
 
 public class ConfigurationFilePrincipalDatabaseManager implements PrincipalDatabaseManager
 {

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java Thu Feb 28 09:31:56 2008
@@ -82,14 +82,6 @@
             if (databaseName == null)
             {
 
-                if (hostConfig instanceof SubsetConfiguration)
-                {
-                    _logger.warn("No authentication specified for '" + ((SubsetConfiguration) hostConfig).getPrefix() + "'. Using Default authentication manager");
-                }
-                else
-                {
-                    _logger.warn("No authentication specified. Using Default authentication manager");
-                }
                 _default = ApplicationRegistry.getInstance().getAuthenticationManager();
                 return;
             }

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/util/NullApplicationRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/util/NullApplicationRegistry.java?rev=632068&r1=632067&r2=632068&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/util/NullApplicationRegistry.java (original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/main/java/org/apache/qpid/server/util/NullApplicationRegistry.java Thu Feb 28 09:31:56 2008
@@ -35,8 +35,8 @@
 import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
 import org.apache.qpid.server.security.auth.database.PrincipalDatabaseManager;
 import org.apache.qpid.server.security.auth.database.PropertiesPrincipalDatabaseManager;
-import org.apache.qpid.server.security.access.AccessManager;
-import org.apache.qpid.server.security.access.AllowAll;
+import org.apache.qpid.server.security.access.ACLPlugin;
+import org.apache.qpid.server.security.access.plugins.AllowAll;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
 
@@ -48,7 +48,7 @@
 
     private VirtualHostRegistry _virtualHostRegistry;
 
-    private AccessManager _accessManager;
+    private ACLPlugin _accessManager;
 
     private PrincipalDatabaseManager _databaseManager;
 
@@ -121,7 +121,7 @@
         return _virtualHostRegistry;
     }
 
-    public AccessManager getAccessManager()
+    public ACLPlugin getAccessManager()
     {
         return _accessManager;
     }