qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1765987 - in /qpid/java/branches/transfer-queue: ./ bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/ broker-core/src/main/java/org/apache/qpid/server/ broker-core/src/main/java/org/apache/qpid/server/exchange/ broker-c...
Date Fri, 21 Oct 2016 10:45:30 GMT
Author: rgodfrey
Date: Fri Oct 21 10:45:30 2016
New Revision: 1765987

URL: http://svn.apache.org/viewvc?rev=1765987&view=rev
Log:
merge up to r1764865 from trunk

Added:
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/protocol/PublishAuthorisationCache.java
      - copied unchanged from r1764865, qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/protocol/PublishAuthorisationCache.java
    qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/CachedFrame.java
      - copied unchanged from r1764865, qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/CachedFrame.java
    qpid/java/branches/transfer-queue/perftests/etc/chartdefs/timeseries/combined_transient_transaction_plain.chartdef
      - copied unchanged from r1764865, qpid/java/trunk/perftests/etc/chartdefs/timeseries/combined_transient_transaction_plain.chartdef
    qpid/java/branches/transfer-queue/perftests/etc/chartdefs/timeseries/combined_transient_transaction_ssl.chartdef
      - copied unchanged from r1764865, qpid/java/trunk/perftests/etc/chartdefs/timeseries/combined_transient_transaction_ssl.chartdef
Modified:
    qpid/java/branches/transfer-queue/   (props changed)
    qpid/java/branches/transfer-queue/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBHAReplicaVirtualHostImpl.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/BrokerOptions.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/DefaultDestination.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
    qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/RedirectingVirtualHostImpl.java
    qpid/java/branches/transfer-queue/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/LegacyAccessControlAdapterTest.java
    qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSession.java
    qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
    qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
    qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQPConnection_0_8Impl.java
    qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/BrokerDecoder.java
    qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java
    qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java
    qpid/java/branches/transfer-queue/perftests/etc/testdefs/defaultTests.js
    qpid/java/branches/transfer-queue/pom.xml
    qpid/java/branches/transfer-queue/test-profiles/CPPExcludes   (contents, props changed)

Propchange: qpid/java/branches/transfer-queue/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 21 10:45:30 2016
@@ -9,5 +9,5 @@
 /qpid/branches/java-broker-vhost-refactor/java:1493674-1494547
 /qpid/branches/java-network-refactor/qpid/java:805429-821809
 /qpid/branches/qpid-2935/qpid/java:1061302-1072333
-/qpid/java/trunk:1763546-1764308
+/qpid/java/trunk:1763546-1764865
 /qpid/trunk/qpid:796646-796653

Modified: qpid/java/branches/transfer-queue/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBHAReplicaVirtualHostImpl.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBHAReplicaVirtualHostImpl.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBHAReplicaVirtualHostImpl.java (original)
+++ qpid/java/branches/transfer-queue/bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBHAReplicaVirtualHostImpl.java Fri Oct 21 10:45:30 2016
@@ -459,7 +459,7 @@ public class BDBHAReplicaVirtualHostImpl
     }
 
     @Override
-    public Map<String, Object> exportConfig(boolean includeSecureAttributes)
+    public Map<String, Object> extractConfig(boolean includeSecureAttributes)
     {
         return Collections.emptyMap();
     }

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/BrokerOptions.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/BrokerOptions.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/BrokerOptions.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/BrokerOptions.java Fri Oct 21 10:45:30 2016
@@ -283,30 +283,37 @@ public class BrokerOptions
         return Collections.unmodifiableMap(properties);
     }
 
-    private String getWorkDir()
+    private String getProperty(String propName, String altPropName, String defaultValue)
     {
-        if(!_configProperties.containsKey(QPID_WORK_DIR))
+        String value = getProperty(propName);
+        if(value == null)
         {
-            String qpidWork = System.getProperty(BrokerProperties.PROPERTY_QPID_WORK);
-            if (qpidWork == null)
+            value = getProperty(altPropName);
+            if(value == null)
             {
-                return FALLBACK_WORK_DIR.getAbsolutePath();
+                value = defaultValue;
             }
-
-            return qpidWork;
         }
+        return value;
+    }
 
-        return _configProperties.get(QPID_WORK_DIR);
+    private String getProperty(String propName)
+    {
+        return _configProperties.containsKey(propName)
+                ? _configProperties.get(propName)
+                : System.getProperties().containsKey(propName)
+                        ? System.getProperty(propName)
+                        : System.getenv(propName);
     }
 
-    private String getHomeDir()
+    private String getWorkDir()
     {
-        if(!_configProperties.containsKey(QPID_HOME_DIR))
-        {
-            return System.getProperty(BrokerProperties.PROPERTY_QPID_HOME);
-        }
+        return getProperty(QPID_WORK_DIR, BrokerProperties.PROPERTY_QPID_WORK, FALLBACK_WORK_DIR.getAbsolutePath());
+    }
 
-        return _configProperties.get(QPID_HOME_DIR);
+    private String getHomeDir()
+    {
+        return getProperty(QPID_HOME_DIR, BrokerProperties.PROPERTY_QPID_HOME, null);
     }
 
     /*

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java Fri Oct 21 10:45:30 2016
@@ -83,6 +83,7 @@ public abstract class AbstractExchange<T
         implements Exchange<T>
 {
     private static final Logger _logger = LoggerFactory.getLogger(AbstractExchange.class);
+    private static final Operation PUBLISH_ACTION = Operation.ACTION("publish");
     private final AtomicBoolean _closed = new AtomicBoolean();
 
     @ManagedAttributeField(beforeSet = "preSetAlternateExchange", afterSet = "postSetAlternateExchange" )
@@ -956,6 +957,6 @@ public abstract class AbstractExchange<T
     public void authorisePublish(final SecurityToken token, final Map<String, Object> arguments)
             throws AccessControlException
     {
-        authorise(token, Operation.ACTION("publish"), arguments);
+        authorise(token, PUBLISH_ACTION, arguments);
     }
 }

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/DefaultDestination.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/DefaultDestination.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/DefaultDestination.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/exchange/DefaultDestination.java Fri Oct 21 10:45:30 2016
@@ -42,6 +42,7 @@ import org.apache.qpid.server.util.Actio
 public class DefaultDestination implements MessageDestination, PermissionedObject
 {
 
+    private static final Operation PUBLISH_ACTION = Operation.ACTION("publish");
     private final AccessControl _accessControl;
     private VirtualHost<?> _virtualHost;
 
@@ -71,7 +72,7 @@ public class DefaultDestination implemen
 
         if(_accessControl != null)
         {
-            Result result = _accessControl.authorise(token, Operation.ACTION("publish"), this, arguments);
+            Result result = _accessControl.authorise(token, PUBLISH_ACTION, this, arguments);
             if (result == Result.DEFER)
             {
                 result = _accessControl.getDefault();

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/Session.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/Session.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/Session.java Fri Oct 21 10:45:30 2016
@@ -37,6 +37,18 @@ public interface Session<X extends Sessi
                            description = "Frequency, in milliseconds, with which transaction timeout warnings will be repeated.")
     long TRANSACTION_TIMEOUT_NOTIFICATION_REPEAT_PERIOD_DEFAULT = 10000;
 
+    String PRODUCER_AUTH_CACHE_SIZE = "producer.authCacheSize";
+    @ManagedContextDefault(name = PRODUCER_AUTH_CACHE_SIZE,
+                           description = "Maximum number of distinct destinations for which a cached auth value may be held")
+    int PRODUCER_AUTH_CACHE_SIZE_DEFAULT = 20;
+
+
+    String PRODUCER_AUTH_CACHE_TIMEOUT = "producer.authCacheTimeout";
+    @ManagedContextDefault(name = PRODUCER_AUTH_CACHE_TIMEOUT,
+            description = "Maximum time, in milliseconds, for which a cached auth value may be retained")
+    long PRODUCER_AUTH_CACHE_TIMEOUT_DEFAULT = 300000L;
+
+
     @DerivedAttribute
     int getChannelId();
 

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java Fri Oct 21 10:45:30 2016
@@ -223,7 +223,7 @@ public interface VirtualHost<X extends V
             description = "Extract configuration",
             paramRequiringSecure = "includeSecureAttributes",
             changesConfiguredObjectState = false)
-    Map<String,Object> exportConfig(@Param(name="includeSecureAttributes",
+    Map<String,Object> extractConfig(@Param(name="includeSecureAttributes",
                                             description = "include attributes that may contain passwords or other "
                                                           + "confidential information",
                                             defaultValue = "false") boolean includeSecureAttributes);

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/queue/AbstractQueue.java Fri Oct 21 10:45:30 2016
@@ -142,6 +142,7 @@ public abstract class AbstractQueue<X ex
 
     private static final long INITIAL_TARGET_QUEUE_SIZE = 102400l;
     private static final String UTF8 = StandardCharsets.UTF_8.name();
+    private static final Operation PUBLISH_ACTION = Operation.ACTION("publish");
 
     private final VirtualHost<?> _virtualHost;
     private final DeletedChildListener _deletedChildListener = new DeletedChildListener();
@@ -3571,7 +3572,7 @@ public abstract class AbstractQueue<X ex
     public void authorisePublish(final SecurityToken token, final Map<String, Object> arguments)
             throws AccessControlException
     {
-        authorise(token, Operation.ACTION("publish"), arguments);
+        authorise(token, PUBLISH_ACTION, arguments);
     }
 
     private class DeletedChildListener extends AbstractConfigurationChangeListener

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/NetworkConnectionScheduler.java Fri Oct 21 10:45:30 2016
@@ -38,6 +38,7 @@ public class NetworkConnectionScheduler
 {
     private static final Logger LOGGER = LoggerFactory.getLogger(NetworkConnectionScheduler.class);
     private final ThreadFactory _factory;
+    private final String _selectorThreadName;
     private volatile ThreadPoolExecutor _executor;
     private final AtomicInteger _running = new AtomicInteger();
     private final int _poolSize;
@@ -89,6 +90,7 @@ public class NetworkConnectionScheduler
         _threadKeepAliveTimeout = threadKeepAliveTimeout;
         _factory = factory;
         _numberOfSelectors = numberOfSelectors;
+        _selectorThreadName = "Selector-"+name;
     }
 
 
@@ -189,6 +191,11 @@ public class NetworkConnectionScheduler
         return _name;
     }
 
+    public String getSelectorThreadName()
+    {
+        return _selectorThreadName;
+    }
+
     public void addAcceptingSocket(final ServerSocketChannel serverSocket,
                                    final NonBlockingNetworkTransport nonBlockingNetworkTransport)
     {

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java Fri Oct 21 10:45:30 2016
@@ -280,7 +280,7 @@ class SelectorThread extends Thread
                         {
                             if (!_closed.get())
                             {
-                                Thread.currentThread().setName("Selector-" + _scheduler.getName());
+                                Thread.currentThread().setName(_scheduler.getSelectorThreadName());
                                 _inSelect.set(true);
                                 try
                                 {

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java Fri Oct 21 10:45:30 2016
@@ -825,7 +825,7 @@ public abstract class AbstractVirtualHos
     }
 
     @Override
-    public Map<String, Object> exportConfig(final boolean includeSecureAttributes)
+    public Map<String, Object> extractConfig(final boolean includeSecureAttributes)
     {
         return doSync(doOnConfigThread(new Task<ListenableFuture<Map<String,Object>>, RuntimeException>()
         {
@@ -847,7 +847,7 @@ public abstract class AbstractVirtualHos
             @Override
             public String getAction()
             {
-                return "exportConfig";
+                return "extractConfig";
             }
 
             @Override

Modified: qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/RedirectingVirtualHostImpl.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/RedirectingVirtualHostImpl.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/RedirectingVirtualHostImpl.java (original)
+++ qpid/java/branches/transfer-queue/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/RedirectingVirtualHostImpl.java Fri Oct 21 10:45:30 2016
@@ -318,7 +318,7 @@ class RedirectingVirtualHostImpl
     }
 
     @Override
-    public Map<String, Object> exportConfig(boolean includeSecureAttributes)
+    public Map<String, Object> extractConfig(boolean includeSecureAttributes)
     {
         return Collections.emptyMap();
     }

Modified: qpid/java/branches/transfer-queue/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/LegacyAccessControlAdapterTest.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/LegacyAccessControlAdapterTest.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/LegacyAccessControlAdapterTest.java (original)
+++ qpid/java/branches/transfer-queue/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/LegacyAccessControlAdapterTest.java Fri Oct 21 10:45:30 2016
@@ -101,7 +101,7 @@ public class LegacyAccessControlAdapterT
     {
         AccessControlProvider accessControlProvider = mock(AccessControlProvider.class);
         when(accessControlProvider.getParent(Broker.class)).thenReturn(_broker);
-        when(accessControlProvider.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(accessControlProvider.getName()).thenReturn("TEST");
         when(accessControlProvider.getCategoryClass()).thenReturn(AccessControlProvider.class);
 
         assertBrokerChildCreateAuthorization(accessControlProvider);
@@ -114,6 +114,7 @@ public class LegacyAccessControlAdapterT
         Exchange exchange = mock(Exchange.class);
         when(exchange.getParent(VirtualHost.class)).thenReturn(_virtualHost);
         when(exchange.getAttribute(Exchange.NAME)).thenReturn(TEST_EXCHANGE);
+        when(exchange.getName()).thenReturn(TEST_EXCHANGE);
         when(exchange.getCategoryClass()).thenReturn(Exchange.class);
         when(exchange.getParent(VirtualHost.class)).thenReturn(vh);
         when(exchange.getModel()).thenReturn(BrokerModel.getInstance());
@@ -121,6 +122,7 @@ public class LegacyAccessControlAdapterT
         Queue queue = mock(Queue.class);
         when(queue.getParent(VirtualHost.class)).thenReturn(_virtualHost);
         when(queue.getAttribute(Queue.NAME)).thenReturn(TEST_QUEUE);
+        when(queue.getName()).thenReturn(TEST_QUEUE);
         when(queue.getAttribute(Queue.DURABLE)).thenReturn(true);
         when(queue.getAttribute(Queue.LIFETIME_POLICY)).thenReturn(LifetimePolicy.PERMANENT);
         when(queue.getCategoryClass()).thenReturn(Queue.class);
@@ -138,6 +140,8 @@ public class LegacyAccessControlAdapterT
         when(binding.getParent(Exchange.class)).thenReturn(exchange);
         when(binding.getParent(Queue.class)).thenReturn(queue);
         when(binding.getAttribute(Binding.NAME)).thenReturn("bindingKey");
+        when(binding.getName()).thenReturn("bindingKey");
+
         when(binding.getCategoryClass()).thenReturn(Binding.class);
 
         assertCreateAuthorization(binding, LegacyOperation.BIND, ObjectType.EXCHANGE, properties, exchange, queue);
@@ -179,7 +183,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseUpdatePort()
     {
         Port mock = mock(Port.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(Port.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildUpdateAuthorization(mock);
@@ -191,10 +195,10 @@ public class LegacyAccessControlAdapterT
         when(authenticationProvider.getCategoryClass()).thenReturn(AuthenticationProvider.class);
         when(authenticationProvider.getName()).thenReturn("testAuthenticationProvider");
         User mock = mock(User.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(User.class);
         when(mock.getParent(AuthenticationProvider.class)).thenReturn(authenticationProvider);
-        ObjectProperties properties = new ObjectProperties((String)mock.getAttribute(ConfiguredObject.NAME));
+        ObjectProperties properties = new ObjectProperties((String)mock.getName());
         assertUpdateAuthorization(mock, LegacyOperation.UPDATE, ObjectType.USER, properties, authenticationProvider);
     }
 
@@ -204,10 +208,11 @@ public class LegacyAccessControlAdapterT
         VirtualHostNode vhn = getMockVirtualHostNode();
 
         VirtualHost mock = mock(VirtualHost.class);
+        when(mock.getName()).thenReturn("test");
         when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(VirtualHost.class);
         when(mock.getParent(VirtualHostNode.class)).thenReturn(vhn);
-        ObjectProperties properties = new ObjectProperties((String)mock.getAttribute(ConfiguredObject.NAME));
+        ObjectProperties properties = new ObjectProperties((String)mock.getName());
         assertDeleteAuthorization(mock, LegacyOperation.DELETE, ObjectType.VIRTUALHOST, properties, vhn);
     }
 
@@ -215,11 +220,13 @@ public class LegacyAccessControlAdapterT
     {
         Exchange exchange = mock(Exchange.class);
         when(exchange.getParent(VirtualHost.class)).thenReturn(_virtualHost);
+        when(exchange.getName()).thenReturn(TEST_EXCHANGE);
         when(exchange.getAttribute(Exchange.NAME)).thenReturn(TEST_EXCHANGE);
         when(exchange.getCategoryClass()).thenReturn(Exchange.class);
 
         Queue queue = mock(Queue.class);
         when(queue.getParent(VirtualHost.class)).thenReturn(_virtualHost);
+        when(queue.getName()).thenReturn(TEST_QUEUE);
         when(queue.getAttribute(Queue.NAME)).thenReturn(TEST_QUEUE);
         when(queue.getAttribute(Queue.DURABLE)).thenReturn(true);
         when(queue.getAttribute(Queue.LIFETIME_POLICY)).thenReturn(LifetimePolicy.PERMANENT);
@@ -228,7 +235,7 @@ public class LegacyAccessControlAdapterT
         Binding binding = mock(Binding.class);
         when(binding.getParent(Exchange.class)).thenReturn(exchange);
         when(binding.getParent(Queue.class)).thenReturn(queue);
-        when(binding.getAttribute(Binding.NAME)).thenReturn("bindingKey");
+        when(binding.getName()).thenReturn("bindingKey");
         when(binding.getCategoryClass()).thenReturn(Binding.class);
 
         ObjectProperties properties = new ObjectProperties();
@@ -246,7 +253,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseDeleteKeyStore()
     {
         KeyStore mock = mock(KeyStore.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(KeyStore.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildDeleteAuthorization(mock);
@@ -255,7 +262,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseDeleteTrustStore()
     {
         TrustStore mock = mock(TrustStore.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(TrustStore.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildDeleteAuthorization(mock);
@@ -267,10 +274,10 @@ public class LegacyAccessControlAdapterT
         when(groupProvider.getCategoryClass()).thenReturn(GroupProvider.class);
         when(groupProvider.getName()).thenReturn("testGroupProvider");
         Group mock = mock(Group.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(Group.class);
         when(mock.getParent(GroupProvider.class)).thenReturn(groupProvider);
-        ObjectProperties properties = new ObjectProperties((String)mock.getAttribute(ConfiguredObject.NAME));
+        ObjectProperties properties = new ObjectProperties((String)mock.getName());
         assertDeleteAuthorization(mock, LegacyOperation.DELETE, ObjectType.GROUP, properties, groupProvider);
     }
 
@@ -280,10 +287,10 @@ public class LegacyAccessControlAdapterT
         when(group.getCategoryClass()).thenReturn(Group.class);
         when(group.getName()).thenReturn("testGroup");
         GroupMember mock = mock(GroupMember.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(GroupMember.class);
         when(mock.getParent(Group.class)).thenReturn(group);
-        ObjectProperties properties = new ObjectProperties((String)mock.getAttribute(ConfiguredObject.NAME));
+        ObjectProperties properties = new ObjectProperties((String)mock.getName());
         assertDeleteAuthorization(mock, LegacyOperation.UPDATE, ObjectType.GROUP, properties, group);
     }
 
@@ -293,10 +300,10 @@ public class LegacyAccessControlAdapterT
         when(authenticationProvider.getCategoryClass()).thenReturn(AuthenticationProvider.class);
         when(authenticationProvider.getName()).thenReturn("testAuthenticationProvider");
         User mock = mock(User.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(User.class);
         when(mock.getParent(AuthenticationProvider.class)).thenReturn(authenticationProvider);
-        ObjectProperties properties = new ObjectProperties((String)mock.getAttribute(ConfiguredObject.NAME));
+        ObjectProperties properties = new ObjectProperties((String)mock.getName());
         assertDeleteAuthorization(mock, LegacyOperation.DELETE, ObjectType.USER, properties, authenticationProvider);
     }
 
@@ -306,7 +313,7 @@ public class LegacyAccessControlAdapterT
         ObjectProperties expectedProperties = createExpectedExchangeObjectProperties();
 
         Exchange exchange = mock(Exchange.class);
-        when(exchange.getAttribute(ConfiguredObject.NAME)).thenReturn(TEST_EXCHANGE);
+        when(exchange.getName()).thenReturn(TEST_EXCHANGE);
         when(exchange.getAttribute(ConfiguredObject.LIFETIME_POLICY)).thenReturn(LifetimePolicy.DELETE_ON_CONNECTION_CLOSE);
         when(exchange.getAttribute(Exchange.DURABLE)).thenReturn(false);
         when(exchange.getAttribute(Exchange.TYPE)).thenReturn(TEST_EXCHANGE_TYPE);
@@ -322,6 +329,7 @@ public class LegacyAccessControlAdapterT
         ObjectProperties expectedProperties = createExpectedQueueObjectProperties();
 
         Queue queue = mock(Queue.class);
+        when(queue.getName()).thenReturn(TEST_QUEUE);
         when(queue.getAttribute(ConfiguredObject.NAME)).thenReturn(TEST_QUEUE);
         when(queue.getAttribute(ConfiguredObject.LIFETIME_POLICY)).thenReturn(LifetimePolicy.DELETE_ON_CONNECTION_CLOSE);
         when(queue.getAttribute(Queue.OWNER)).thenReturn(null);
@@ -374,7 +382,7 @@ public class LegacyAccessControlAdapterT
         ObjectProperties expectedProperties = createExpectedExchangeObjectProperties();
 
         Exchange exchange = mock(Exchange.class);
-        when(exchange.getAttribute(Exchange.NAME)).thenReturn(TEST_EXCHANGE);
+        when(exchange.getName()).thenReturn(TEST_EXCHANGE);
         when(exchange.getAttribute(Exchange.LIFETIME_POLICY)).thenReturn(LifetimePolicy.DELETE_ON_CONNECTION_CLOSE);
         when(exchange.getAttribute(Exchange.DURABLE)).thenReturn(false);
         when(exchange.getAttribute(Exchange.TYPE)).thenReturn(TEST_EXCHANGE_TYPE);
@@ -391,6 +399,7 @@ public class LegacyAccessControlAdapterT
 
         Exchange exchange = mock(Exchange.class);
         when(exchange.getAttribute(Exchange.NAME)).thenReturn(TEST_EXCHANGE);
+        when(exchange.getName()).thenReturn(TEST_EXCHANGE);
         when(exchange.getAttribute(Exchange.LIFETIME_POLICY)).thenReturn(LifetimePolicy.DELETE_ON_CONNECTION_CLOSE);
         when(exchange.getAttribute(Exchange.DURABLE)).thenReturn(false);
         when(exchange.getAttribute(Exchange.TYPE)).thenReturn(TEST_EXCHANGE_TYPE);
@@ -404,11 +413,13 @@ public class LegacyAccessControlAdapterT
     {
         Exchange exchange = mock(Exchange.class);
         when(exchange.getParent(VirtualHost.class)).thenReturn(_virtualHost);
+        when(exchange.getName()).thenReturn(TEST_EXCHANGE);
         when(exchange.getAttribute(Exchange.NAME)).thenReturn(TEST_EXCHANGE);
         when(exchange.getCategoryClass()).thenReturn(Exchange.class);
 
         Queue queue = mock(Queue.class);
         when(queue.getParent(VirtualHost.class)).thenReturn(_virtualHost);
+        when(queue.getName()).thenReturn(TEST_QUEUE);
         when(queue.getAttribute(Queue.NAME)).thenReturn(TEST_QUEUE);
         when(queue.getAttribute(Queue.DURABLE)).thenReturn(true);
         when(queue.getAttribute(Queue.LIFETIME_POLICY)).thenReturn(LifetimePolicy.PERMANENT);
@@ -417,6 +428,7 @@ public class LegacyAccessControlAdapterT
         Binding binding = mock(Binding.class);
         when(binding.getParent(Exchange.class)).thenReturn(exchange);
         when(binding.getParent(Queue.class)).thenReturn(queue);
+        when(binding.getName()).thenReturn("bindingKey");
         when(binding.getAttribute(Binding.NAME)).thenReturn("bindingKey");
         when(binding.getCategoryClass()).thenReturn(Binding.class);
 
@@ -441,7 +453,7 @@ public class LegacyAccessControlAdapterT
     {
         Port port = mock(Port.class);
         when(port.getParent(Broker.class)).thenReturn(_broker);
-        when(port.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(port.getName()).thenReturn("TEST");
         when(port.getCategoryClass()).thenReturn(Port.class);
 
         assertBrokerChildCreateAuthorization(port);
@@ -451,7 +463,7 @@ public class LegacyAccessControlAdapterT
     {
         AuthenticationProvider authenticationProvider = mock(AuthenticationProvider.class);
         when(authenticationProvider.getParent(Broker.class)).thenReturn(_broker);
-        when(authenticationProvider.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(authenticationProvider.getName()).thenReturn("TEST");
         when(authenticationProvider.getCategoryClass()).thenReturn(AuthenticationProvider.class);
 
         assertBrokerChildCreateAuthorization(authenticationProvider);
@@ -461,7 +473,7 @@ public class LegacyAccessControlAdapterT
     {
         GroupProvider groupProvider = mock(GroupProvider.class);
         when(groupProvider.getParent(Broker.class)).thenReturn(_broker);
-        when(groupProvider.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(groupProvider.getName()).thenReturn("TEST");
         when(groupProvider.getCategoryClass()).thenReturn(GroupProvider.class);
 
         assertBrokerChildCreateAuthorization(groupProvider);
@@ -472,7 +484,7 @@ public class LegacyAccessControlAdapterT
     {
         KeyStore keyStore = mock(KeyStore.class);
         when(keyStore.getParent(Broker.class)).thenReturn(_broker);
-        when(keyStore.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(keyStore.getName()).thenReturn("TEST");
         when(keyStore.getCategoryClass()).thenReturn(KeyStore.class);
 
         assertBrokerChildCreateAuthorization(keyStore);
@@ -482,7 +494,7 @@ public class LegacyAccessControlAdapterT
     {
         TrustStore trustStore = mock(TrustStore.class);
         when(trustStore.getParent(Broker.class)).thenReturn(_broker);
-        when(trustStore.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(trustStore.getName()).thenReturn("TEST");
         when(trustStore.getCategoryClass()).thenReturn(TrustStore.class);
 
         assertBrokerChildCreateAuthorization(trustStore);
@@ -493,12 +505,14 @@ public class LegacyAccessControlAdapterT
         GroupProvider groupProvider = mock(GroupProvider.class);
         when(groupProvider.getCategoryClass()).thenReturn(GroupProvider.class);
         when(groupProvider.getAttribute(GroupProvider.NAME)).thenReturn("testGroupProvider");
+        when(groupProvider.getName()).thenReturn("testGroupProvider");
         when(groupProvider.getModel()).thenReturn(BrokerModel.getInstance());
 
         Group group = mock(Group.class);
         when(group.getCategoryClass()).thenReturn(Group.class);
         when(group.getParent(GroupProvider.class)).thenReturn(groupProvider);
         when(group.getAttribute(Group.NAME)).thenReturn("test");
+        when(group.getName()).thenReturn("test");
 
         assertCreateAuthorization(group, LegacyOperation.CREATE, ObjectType.GROUP, new ObjectProperties("test"), groupProvider);
     }
@@ -508,12 +522,14 @@ public class LegacyAccessControlAdapterT
         Group group = mock(Group.class);
         when(group.getCategoryClass()).thenReturn(Group.class);
         when(group.getAttribute(Group.NAME)).thenReturn("testGroup");
+        when(group.getName()).thenReturn("testGroup");
         when(group.getModel()).thenReturn(BrokerModel.getInstance());
 
         GroupMember groupMember = mock(GroupMember.class);
         when(groupMember.getCategoryClass()).thenReturn(GroupMember.class);
         when(groupMember.getParent(Group.class)).thenReturn(group);
         when(groupMember.getAttribute(Group.NAME)).thenReturn("test");
+        when(groupMember.getName()).thenReturn("test");
 
         assertCreateAuthorization(groupMember, LegacyOperation.UPDATE, ObjectType.GROUP, new ObjectProperties("test"), group);
     }
@@ -528,6 +544,7 @@ public class LegacyAccessControlAdapterT
         User user = mock(User.class);
         when(user.getCategoryClass()).thenReturn(User.class);
         when(user.getAttribute(User.NAME)).thenReturn("test");
+        when(user.getName()).thenReturn("test");
         when(user.getParent(AuthenticationProvider.class)).thenReturn(authenticationProvider);
         when(user.getModel()).thenReturn(BrokerModel.getInstance());
 
@@ -550,7 +567,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseUpdateAuthenticationProvider()
     {
         AuthenticationProvider mock = mock(AuthenticationProvider.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(AuthenticationProvider.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildUpdateAuthorization(mock);
@@ -559,7 +576,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseUpdateGroupProvider()
     {
         GroupProvider mock = mock(GroupProvider.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(GroupProvider.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildUpdateAuthorization(mock);
@@ -568,7 +585,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseUpdateAccessControlProvider()
     {
         AccessControlProvider mock = mock(AccessControlProvider.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(AccessControlProvider.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildUpdateAuthorization(mock);
@@ -577,7 +594,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseUpdateKeyStore()
     {
         KeyStore mock = mock(KeyStore.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(KeyStore.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildUpdateAuthorization(mock);
@@ -586,7 +603,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseUpdateTrustStore()
     {
         TrustStore mock = mock(TrustStore.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(TrustStore.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildUpdateAuthorization(mock);
@@ -598,10 +615,10 @@ public class LegacyAccessControlAdapterT
         when(groupProvider.getCategoryClass()).thenReturn(GroupProvider.class);
         when(groupProvider.getName()).thenReturn("testGroupProvider");
         Group mock = mock(Group.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(Group.class);
         when(mock.getParent(GroupProvider.class)).thenReturn(groupProvider);
-        ObjectProperties properties = new ObjectProperties((String)mock.getAttribute(ConfiguredObject.NAME));
+        ObjectProperties properties = new ObjectProperties((String)mock.getName());
         assertUpdateAuthorization(mock, LegacyOperation.UPDATE, ObjectType.GROUP, properties, groupProvider);
     }
 
@@ -611,10 +628,10 @@ public class LegacyAccessControlAdapterT
         when(group.getCategoryClass()).thenReturn(Group.class);
         when(group.getName()).thenReturn("testGroup");
         GroupMember mock = mock(GroupMember.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(GroupMember.class);
         when(mock.getParent(Group.class)).thenReturn(group);
-        ObjectProperties properties = new ObjectProperties((String)mock.getAttribute(ConfiguredObject.NAME));
+        ObjectProperties properties = new ObjectProperties((String)mock.getName());
         assertUpdateAuthorization(mock, LegacyOperation.UPDATE, ObjectType.GROUP, properties, group);
     }
 
@@ -623,10 +640,11 @@ public class LegacyAccessControlAdapterT
         VirtualHostNode vhn = getMockVirtualHostNode();
 
         VirtualHost mock = mock(VirtualHost.class);
+        when(mock.getName()).thenReturn("test");
         when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(VirtualHost.class);
         when(mock.getParent(VirtualHostNode.class)).thenReturn(vhn);
-        ObjectProperties properties = new ObjectProperties((String)mock.getAttribute(ConfiguredObject.NAME));
+        ObjectProperties properties = new ObjectProperties((String)mock.getName());
         assertUpdateAuthorization(mock, LegacyOperation.UPDATE, ObjectType.VIRTUALHOST, properties, vhn);
     }
 
@@ -639,7 +657,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseDeletePort()
     {
         Port mock = mock(Port.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(Port.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildDeleteAuthorization(mock);
@@ -648,7 +666,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseDeleteAuthenticationProvider()
     {
         AuthenticationProvider mock = mock(AuthenticationProvider.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(AuthenticationProvider.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildDeleteAuthorization(mock);
@@ -657,7 +675,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseDeleteGroupProvider()
     {
         GroupProvider mock = mock(GroupProvider.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(GroupProvider.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildDeleteAuthorization(mock);
@@ -666,7 +684,7 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseDeleteAccessControlProvider()
     {
         AccessControlProvider mock = mock(AccessControlProvider.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         when(mock.getCategoryClass()).thenReturn(AccessControlProvider.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildDeleteAuthorization(mock);
@@ -675,12 +693,12 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseBrokerLoggerOperations()
     {
         BrokerLogger mock = mock(BrokerLogger.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(mock.getName()).thenReturn("TEST");
         when(mock.getCategoryClass()).thenReturn(BrokerLogger.class);
         when(mock.getParent(Broker.class)).thenReturn(_broker);
         assertBrokerChildCreateAuthorization(mock);
 
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         assertBrokerChildUpdateAuthorization(mock);
         assertBrokerChildDeleteAuthorization(mock);
     }
@@ -688,18 +706,18 @@ public class LegacyAccessControlAdapterT
     public void testAuthoriseBrokerLogInclusionRuleOperations()
     {
         BrokerLogger bl = mock(BrokerLogger.class);
-        when(bl.getAttribute(ConfiguredObject.NAME)).thenReturn("LOGGER");
+        when(bl.getName()).thenReturn("LOGGER");
         when(bl.getCategoryClass()).thenReturn(BrokerLogger.class);
         when(bl.getParent(Broker.class)).thenReturn(_broker);
 
         BrokerLogInclusionRule mock = mock(BrokerLogInclusionRule.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(mock.getName()).thenReturn("TEST");
         when(mock.getCategoryClass()).thenReturn(BrokerLogInclusionRule.class);
         when(mock.getParent(BrokerLogger.class)).thenReturn(bl);
         when(mock.getModel()).thenReturn(BrokerModel.getInstance());
         assertBrokerChildCreateAuthorization(mock, bl);
 
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
         assertBrokerChildUpdateAuthorization(mock, bl);
         assertBrokerChildDeleteAuthorization(mock, bl);
     }
@@ -710,14 +728,14 @@ public class LegacyAccessControlAdapterT
         ObjectProperties properties = new ObjectProperties(TEST_VIRTUAL_HOST);
 
         VirtualHostLogger<?> mock = mock(VirtualHostLogger.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(mock.getName()).thenReturn("TEST");
         doReturn(VirtualHostLogger.class).when(mock).getCategoryClass();
         when(mock.getParent(VirtualHost.class)).thenReturn(_virtualHost);
         when(mock.getModel()).thenReturn(BrokerModel.getInstance());
 
         assertCreateAuthorization(mock, LegacyOperation.CREATE, ObjectType.VIRTUALHOST, properties, _virtualHost);
 
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
 
         assertUpdateAuthorization(mock, LegacyOperation.UPDATE, ObjectType.VIRTUALHOST, properties, _virtualHost);
         assertDeleteAuthorization(mock, LegacyOperation.DELETE, ObjectType.VIRTUALHOST, properties, _virtualHost);
@@ -728,20 +746,20 @@ public class LegacyAccessControlAdapterT
         ObjectProperties properties = new ObjectProperties(TEST_VIRTUAL_HOST);
 
         VirtualHostLogger<?> vhl = mock(VirtualHostLogger.class);
-        when(vhl.getAttribute(ConfiguredObject.NAME)).thenReturn("LOGGER");
+        when(vhl.getName()).thenReturn("LOGGER");
         doReturn(VirtualHostLogger.class).when(vhl).getCategoryClass();
         when(vhl.getParent(VirtualHost.class)).thenReturn(_virtualHost);
         when(vhl.getModel()).thenReturn(BrokerModel.getInstance());
 
         VirtualHostLogInclusionRule<?> mock = mock(VirtualHostLogInclusionRule.class);
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("TEST");
+        when(mock.getName()).thenReturn("TEST");
         doReturn(VirtualHostLogInclusionRule.class).when(mock).getCategoryClass();
         when(mock.getParent(VirtualHostLogger.class)).thenReturn(vhl);
         when(mock.getModel()).thenReturn(BrokerModel.getInstance());
 
         assertCreateAuthorization(mock, LegacyOperation.CREATE, ObjectType.VIRTUALHOST, properties, vhl);
 
-        when(mock.getAttribute(ConfiguredObject.NAME)).thenReturn("test");
+        when(mock.getName()).thenReturn("test");
 
         assertUpdateAuthorization(mock, LegacyOperation.UPDATE, ObjectType.VIRTUALHOST, properties, vhl);
         assertDeleteAuthorization(mock, LegacyOperation.DELETE, ObjectType.VIRTUALHOST, properties, vhl);
@@ -840,7 +858,7 @@ public class LegacyAccessControlAdapterT
 
         Exchange exchange = mock(Exchange.class);
         when(exchange.getCategoryClass()).thenReturn(Exchange.class);
-        when(exchange.getParent(eq(VirtualHost.class))).thenReturn(_virtualHost);
+        when(exchange.getAddressSpace()).thenReturn(_virtualHost);
         when(exchange.getName()).thenReturn(exchangeName);
         Map<String,Object> args = new HashMap<>();
         args.put("routingKey",routingKey);
@@ -922,7 +940,7 @@ public class LegacyAccessControlAdapterT
         String description = String.format("%s %s '%s'",
                                            LegacyOperation.UPDATE.name().toLowerCase(),
                                            configuredObject.getCategoryClass().getSimpleName().toLowerCase(),
-                                           configuredObject.getAttribute(ConfiguredObject.NAME));
+                                           configuredObject.getName());
         ObjectProperties properties = new OperationLoggingDetails(description);
 
         assertUpdateAuthorization(configuredObject, LegacyOperation.CONFIGURE, ObjectType.BROKER,
@@ -944,7 +962,7 @@ public class LegacyAccessControlAdapterT
         String description = String.format("%s %s '%s'",
                                            LegacyOperation.DELETE.name().toLowerCase(),
                                            configuredObject.getCategoryClass().getSimpleName().toLowerCase(),
-                                           configuredObject.getAttribute(ConfiguredObject.NAME));
+                                           configuredObject.getName());
         ObjectProperties properties = new OperationLoggingDetails(description);
 
         assertDeleteAuthorization(configuredObject, LegacyOperation.CONFIGURE, ObjectType.BROKER,

Modified: qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSession.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSession.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSession.java (original)
+++ qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSession.java Fri Oct 21 10:45:30 2016
@@ -76,6 +76,7 @@ import org.apache.qpid.server.model.Queu
 import org.apache.qpid.server.protocol.AMQSessionModel;
 import org.apache.qpid.server.protocol.CapacityChecker;
 import org.apache.qpid.server.protocol.ConsumerListener;
+import org.apache.qpid.server.protocol.PublishAuthorisationCache;
 import org.apache.qpid.server.security.SecurityToken;
 import org.apache.qpid.server.store.MessageStore;
 import org.apache.qpid.server.store.StoreException;
@@ -144,11 +145,8 @@ public class ServerSession extends Sessi
     private long _blockingTimeout;
     private boolean _wireBlockingState;
     private final List<ConsumerTarget> _consumersWithPendingWork = new ArrayList<>();
+    private final PublishAuthorisationCache _publishAuthCahe;
 
-    public SecurityToken getToken()
-    {
-        return _token;
-    }
 
     public static interface MessageDispositionChangeListener
     {
@@ -208,9 +206,11 @@ public class ServerSession extends Sessi
             _token = amqpConnection.getBroker().newToken(_subject);
         }
 
-        _blockingTimeout = serverConnection.getBroker().getContextValue(Long.class,
-                                                                                       Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT);
+        _blockingTimeout = serverConnection.getBroker().getContextValue(Long.class, Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT);
         _maxUncommittedInMemorySize = getConnection().getAmqpConnection().getContextProvider().getContextValue(Long.class, org.apache.qpid.server.model.Connection.MAX_UNCOMMITTED_IN_MEMORY_SIZE);
+        _publishAuthCahe = new PublishAuthorisationCache(_token,
+                                                         amqpConnection.getContextValue(Long.class, org.apache.qpid.server.model.Session.PRODUCER_AUTH_CACHE_TIMEOUT),
+                                                         amqpConnection.getContextValue(Integer.class, org.apache.qpid.server.model.Session.PRODUCER_AUTH_CACHE_SIZE));
 
     }
 
@@ -271,6 +271,13 @@ public class ServerSession extends Sessi
         invoke(mf);
     }
 
+    void authorisePublish(final MessageDestination destination,
+                          final String routingKey,
+                          final boolean immediate,
+                          final long currentTime)
+    {
+        _publishAuthCahe.authorisePublish(destination, routingKey, immediate, currentTime);
+    }
 
     @Override
     protected boolean isFull(int id)

Modified: qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java (original)
+++ qpid/java/branches/transfer-queue/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java Fri Oct 21 10:45:30 2016
@@ -20,8 +20,6 @@
  */
 package org.apache.qpid.server.protocol.v0_10;
 
-import static org.apache.qpid.server.transport.AbstractAMQPConnection.PUBLISH_ACTION_MAP_CREATOR;
-
 import java.nio.charset.StandardCharsets;
 import java.security.AccessControlException;
 import java.util.Collection;
@@ -443,10 +441,7 @@ public class ServerSessionDelegate exten
                 try
                 {
                     serverSession.getAMQPConnection().checkAuthorizedMessagePrincipal(getMessageUserId(xfr));
-                    destination.authorisePublish(serverSession.getToken(),
-                                                 PUBLISH_ACTION_MAP_CREATOR.createMap(messageMetaData.getRoutingKey(),
-                                                                                      messageMetaData.isImmediate()));
-
+                    serverSession.authorisePublish(destination, messageMetaData.getRoutingKey(), messageMetaData.isImmediate(), serverSession.getAMQPConnection().getLastReadTime());
 
                 }
                 catch (AccessControlException e)

Modified: qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java (original)
+++ qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java Fri Oct 21 10:45:30 2016
@@ -99,6 +99,7 @@ import org.apache.qpid.server.model.Unkn
 import org.apache.qpid.server.protocol.AMQSessionModel;
 import org.apache.qpid.server.protocol.CapacityChecker;
 import org.apache.qpid.server.protocol.ConsumerListener;
+import org.apache.qpid.server.protocol.PublishAuthorisationCache;
 import org.apache.qpid.server.queue.QueueArgumentsConverter;
 import org.apache.qpid.server.security.SecurityToken;
 import org.apache.qpid.server.store.MessageHandle;
@@ -106,7 +107,6 @@ import org.apache.qpid.server.store.Mess
 import org.apache.qpid.server.store.StoredMessage;
 import org.apache.qpid.server.store.TransactionLogResource;
 import org.apache.qpid.server.transport.AMQPConnection;
-import org.apache.qpid.server.transport.AbstractAMQPConnection;
 import org.apache.qpid.server.txn.AsyncAutoCommitTransaction;
 import org.apache.qpid.server.txn.LocalTransaction;
 import org.apache.qpid.server.txn.LocalTransaction.ActivityTimeAccessor;
@@ -140,6 +140,10 @@ public class AMQChannel
     private final AccessControlContext _accessControllerContext;
     private final SecurityToken _token;
 
+    private final PublishAuthorisationCache _publishAuthCahe;
+
+
+
     /**
      * The delivery tag is unique per channel. This is pre-incremented before putting into the deliver frame so that
      * value of this represents the <b>last</b> tag sent out
@@ -228,6 +232,8 @@ public class AMQChannel
      */
     private boolean _logChannelFlowMessages = true;
 
+    private final CachedFrame _txCommitOkFrame;
+
     public AMQChannel(AMQPConnection_0_8 connection, int channelId, final MessageStore messageStore)
     {
         _creditManager = new Pre0_10CreditManager(0l,0l, connection);
@@ -248,13 +254,19 @@ public class AMQChannel
 
         _maxUncommittedInMemorySize = connection.getContextProvider().getContextValue(Long.class, Connection.MAX_UNCOMMITTED_IN_MEMORY_SIZE);
         _logSubject = new ChannelLogSubject(this);
-
+        _publishAuthCahe = new PublishAuthorisationCache(_token,
+                                                         connection.getContextValue(Long.class, Session.PRODUCER_AUTH_CACHE_TIMEOUT),
+                                                         connection.getContextValue(Integer.class, Session.PRODUCER_AUTH_CACHE_SIZE));
         _messageStore = messageStore;
         _blockingTimeout = connection.getBroker().getContextValue(Long.class,
                                                                   Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT);
         // by default the session is non-transactional
         _transaction = new AsyncAutoCommitTransaction(_messageStore, this);
 
+        MethodRegistry methodRegistry = _connection.getMethodRegistry();
+        AMQMethodBody responseBody = methodRegistry.createTxCommitOkBody();
+        _txCommitOkFrame = new CachedFrame(responseBody.generateFrame(_channelId));
+
         _clientDeliveryMethod = connection.createDeliveryMethod(_channelId);
 
         AccessController.doPrivileged((new PrivilegedAction<Object>()
@@ -426,7 +438,6 @@ public class AMQChannel
         {
             MessagePublishInfo info = _currentMessage.getMessagePublishInfo();
             String routingKey = AMQShortString.toString(info.getRoutingKey());
-            NamedAddressSpace virtualHost = getAddressSpace();
 
             try
             {
@@ -435,7 +446,7 @@ public class AMQChannel
                 ContentHeaderBody contentHeader = _currentMessage.getContentHeader();
                 _connection.checkAuthorizedMessagePrincipal(AMQShortString.toString(contentHeader.getProperties().getUserId()));
 
-                destination.authorisePublish(_token, AbstractAMQPConnection.PUBLISH_ACTION_MAP_CREATOR.createMap(routingKey, info.isImmediate()));
+                _publishAuthCahe.authorisePublish(destination, routingKey, info.isImmediate(), _connection.getLastReadTime());
 
                 if (_confirmOnPublish)
                 {
@@ -3616,9 +3627,7 @@ public class AMQChannel
             @Override
             public void run()
             {
-                MethodRegistry methodRegistry = _connection.getMethodRegistry();
-                AMQMethodBody responseBody = methodRegistry.createTxCommitOkBody();
-                _connection.writeFrame(responseBody.generateFrame(_channelId));
+                _connection.writeFrame(_txCommitOkFrame);
             }
         }, true);
 
@@ -3820,4 +3829,9 @@ public class AMQChannel
         MessageSource source = getAddressSpace().getAttainedMessageSource(name);
         return source instanceof Queue ? (Queue<?>) source : null;
     }
+
+    public void dispose()
+    {
+        _txCommitOkFrame.dispose();
+    }
 }

Modified: qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQPConnection_0_8Impl.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQPConnection_0_8Impl.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQPConnection_0_8Impl.java (original)
+++ qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQPConnection_0_8Impl.java Fri Oct 21 10:45:30 2016
@@ -34,7 +34,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Queue;
@@ -61,23 +60,24 @@ import org.apache.qpid.configuration.Com
 import org.apache.qpid.framing.*;
 import org.apache.qpid.properties.ConnectionStartProperties;
 import org.apache.qpid.protocol.AMQConstant;
-import org.apache.qpid.server.message.MessageInstanceConsumer;
-import org.apache.qpid.server.model.NamedAddressSpace;
-import org.apache.qpid.server.model.Protocol;
-import org.apache.qpid.server.protocol.ConnectionClosingTicker;
-import org.apache.qpid.server.security.*;
-import org.apache.qpid.server.transport.AbstractAMQPConnection;
-import org.apache.qpid.server.transport.ProtocolEngine;
 import org.apache.qpid.server.configuration.BrokerProperties;
 import org.apache.qpid.server.logging.messages.ConnectionMessages;
 import org.apache.qpid.server.message.InstanceProperties;
+import org.apache.qpid.server.message.MessageInstanceConsumer;
 import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.model.NamedAddressSpace;
+import org.apache.qpid.server.model.Protocol;
 import org.apache.qpid.server.model.Transport;
 import org.apache.qpid.server.model.port.AmqpPort;
 import org.apache.qpid.server.protocol.AMQSessionModel;
+import org.apache.qpid.server.protocol.ConnectionClosingTicker;
+import org.apache.qpid.server.security.SubjectCreator;
 import org.apache.qpid.server.security.auth.SubjectAuthenticationResult;
 import org.apache.qpid.server.store.StoreException;
+import org.apache.qpid.server.transport.AbstractAMQPConnection;
+import org.apache.qpid.server.transport.AggregateTicker;
+import org.apache.qpid.server.transport.ProtocolEngine;
 import org.apache.qpid.server.transport.ServerNetworkConnection;
 import org.apache.qpid.server.util.Action;
 import org.apache.qpid.server.util.ConnectionScopedRuntimeException;
@@ -85,7 +85,6 @@ import org.apache.qpid.server.util.Serve
 import org.apache.qpid.server.virtualhost.VirtualHostUnavailableException;
 import org.apache.qpid.transport.ByteBufferSender;
 import org.apache.qpid.transport.TransportException;
-import org.apache.qpid.server.transport.AggregateTicker;
 
 public class AMQPConnection_0_8Impl
         extends AbstractAMQPConnection<AMQPConnection_0_8Impl>
@@ -430,6 +429,7 @@ public class AMQPConnection_0_8Impl
             session = _channelMap.remove(channelId);
         }
         sessionRemoved(session);
+        session.dispose();
     }
 
     public long getMaximumNumberOfChannels()

Modified: qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/BrokerDecoder.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/BrokerDecoder.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/BrokerDecoder.java (original)
+++ qpid/java/branches/transfer-queue/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/BrokerDecoder.java Fri Oct 21 10:45:30 2016
@@ -60,34 +60,70 @@ public class BrokerDecoder extends Serve
                 startTime = System.currentTimeMillis();
             }
             AMQChannel channel = _connection.getChannel(channelId);
-            if(channel == null)
+            if(channel != null)
             {
-                doProcessFrame(channelId, type, bodySize, in);
+                _connection.channelRequiresSync(channel);
             }
-            else
+            doProcessFrame(channelId, type, bodySize, in);
+
+        }
+        finally
+        {
+            if(_logger.isDebugEnabled())
             {
-                _connection.channelRequiresSync(channel);
+                _logger.debug("Frame handled in {} ms.", (System.currentTimeMillis() - startTime));
+            }
+        }
+    }
 
+    @Override
+    protected int processAMQPFrames(final QpidByteBuffer buf) throws AMQFrameDecodingException
+    {
+        int required = decodable(buf);
+        if (required == 0)
+        {
+            final int channelId = buf.getUnsignedShort(buf.position() + 1);
+            final AMQChannel channel = _connection.getChannel(channelId);
+
+            if (channel == null)
+            {
+                processInput(buf);
+                return 0;
+            }
+
+            else
+            {
                 try
                 {
-                    AccessController.doPrivileged(new PrivilegedExceptionAction<Object>()
+                    return AccessController.doPrivileged(new PrivilegedExceptionAction<Integer>()
                     {
                         @Override
-                        public Void run() throws IOException, AMQFrameDecodingException
+                        public Integer run() throws IOException, AMQFrameDecodingException
                         {
-                            doProcessFrame(channelId, type, bodySize, in);
-                            return null;
+                            int required;
+                            while (true)
+                            {
+                                processInput(buf);
+
+                                required = decodable(buf);
+                                if (required != 0 || buf.getUnsignedShort(buf.position() + 1) != channelId)
+                                {
+                                    break;
+                                }
+                            }
+
+                            return required;
                         }
                     }, channel.getAccessControllerContext());
                 }
                 catch (PrivilegedActionException e)
                 {
                     Throwable cause = e.getCause();
-                    if(cause instanceof AMQFrameDecodingException)
+                    if (cause instanceof AMQFrameDecodingException)
                     {
                         throw (AMQFrameDecodingException) cause;
                     }
-                    else if(cause instanceof RuntimeException)
+                    else if (cause instanceof RuntimeException)
                     {
                         throw (RuntimeException) cause;
                     }
@@ -98,16 +134,9 @@ public class BrokerDecoder extends Serve
                 }
             }
         }
-        finally
-        {
-            if(_logger.isDebugEnabled())
-            {
-                _logger.debug("Frame handled in {} ms.", (System.currentTimeMillis() - startTime));
-            }
-        }
+        return required;
     }
 
-
     private void doProcessFrame(final int channelId, final byte type, final long bodySize, final QpidByteBuffer in)
             throws AMQFrameDecodingException
     {

Modified: qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java (original)
+++ qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/bytebuffer/QpidByteBuffer.java Fri Oct 21 10:45:30 2016
@@ -93,6 +93,12 @@ public class QpidByteBuffer
         return ((int) getShort()) & 0xffff;
     }
 
+    public final int getUnsignedShort(int pos)
+    {
+        return ((int) getShort(pos)) & 0xffff;
+    }
+
+
     public final long getUnsignedInt()
     {
         return ((long) getInt()) & 0xffffffffL;
@@ -380,7 +386,6 @@ public class QpidByteBuffer
     public final short getShort()
     {
         return _buffer.getShort();
-
     }
 
     public final float getFloat()

Modified: qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java (original)
+++ qpid/java/branches/transfer-queue/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java Fri Oct 21 10:45:30 2016
@@ -108,11 +108,7 @@ public abstract class AMQDecoder<T exten
         {
             if(!_expectProtocolInitiation)
             {
-                required = decodable(buf);
-                if (required == 0)
-                {
-                    processInput(buf);
-                }
+                required = processAMQPFrames(buf);
             }
             else
             {
@@ -127,8 +123,17 @@ public abstract class AMQDecoder<T exten
         return buf.hasRemaining() ? required : 0;
     }
 
+    protected int processAMQPFrames(final QpidByteBuffer buf) throws AMQFrameDecodingException
+    {
+        final int required = decodable(buf);
+        if (required == 0)
+        {
+            processInput(buf);
+        }
+        return required;
+    }
 
-    private int decodable(final QpidByteBuffer in) throws AMQFrameDecodingException
+    protected int decodable(final QpidByteBuffer in) throws AMQFrameDecodingException
     {
         final int remainingAfterAttributes = in.remaining() - FRAME_HEADER_SIZE;
         // type, channel, body length and end byte
@@ -154,7 +159,7 @@ public abstract class AMQDecoder<T exten
 
     }
 
-    private void processInput(final QpidByteBuffer in)
+    protected void processInput(final QpidByteBuffer in)
             throws AMQFrameDecodingException, AMQProtocolVersionException
     {
         final byte type = in.get();

Modified: qpid/java/branches/transfer-queue/perftests/etc/testdefs/defaultTests.js
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/perftests/etc/testdefs/defaultTests.js?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/perftests/etc/testdefs/defaultTests.js (original)
+++ qpid/java/branches/transfer-queue/perftests/etc/testdefs/defaultTests.js Fri Oct 21 10:45:30 2016
@@ -107,25 +107,37 @@ function createTest(name, numberOfPartic
 }
 
 var jsonObject = {
-    _tests: [createTest("persistent_transaction_plain",
-        numberOfParticipantPairs,
-        ACKNOWLEDGE_MODE_SESSION_TRANSACTED,
-        DELIVERY_MODE_PERSISTENT,
-        "PLAIN"),
-             createTest("transient_autoack_plain",
-                 numberOfParticipantPairs,
-                 ACKNOWLEDGE_MODE_AUTO_ACKNOWLEDGE,
-                 DELIVERY_MODE_TRANSIENT,
-                 "PLAIN"),
-             createTest("persistent_transaction_ssl",
-                 numberOfParticipantPairs,
-                 ACKNOWLEDGE_MODE_SESSION_TRANSACTED,
-                 DELIVERY_MODE_PERSISTENT,
-                 "SSL"),
-             createTest("transient_autoack_ssl",
-                 numberOfParticipantPairs,
-                 ACKNOWLEDGE_MODE_AUTO_ACKNOWLEDGE,
-                 DELIVERY_MODE_TRANSIENT,
-                 "SSL")]
+    _tests: [
+        createTest("persistent_transaction_plain",
+            numberOfParticipantPairs,
+            ACKNOWLEDGE_MODE_SESSION_TRANSACTED,
+            DELIVERY_MODE_PERSISTENT,
+            "PLAIN"),
+        createTest("transient_autoack_plain",
+            numberOfParticipantPairs,
+            ACKNOWLEDGE_MODE_AUTO_ACKNOWLEDGE,
+            DELIVERY_MODE_TRANSIENT,
+            "PLAIN"),
+        createTest("persistent_transaction_ssl",
+            numberOfParticipantPairs,
+            ACKNOWLEDGE_MODE_SESSION_TRANSACTED,
+            DELIVERY_MODE_PERSISTENT,
+            "SSL"),
+        createTest("transient_autoack_ssl",
+            numberOfParticipantPairs,
+            ACKNOWLEDGE_MODE_AUTO_ACKNOWLEDGE,
+            DELIVERY_MODE_TRANSIENT,
+            "SSL"),
+        createTest("transient_transaction_plain",
+            numberOfParticipantPairs,
+            ACKNOWLEDGE_MODE_SESSION_TRANSACTED,
+            DELIVERY_MODE_TRANSIENT,
+            "PLAIN"),
+        createTest("transient_transaction_ssl",
+            numberOfParticipantPairs,
+            ACKNOWLEDGE_MODE_SESSION_TRANSACTED,
+            DELIVERY_MODE_TRANSIENT,
+            "SSL")
+    ]
 };
 

Modified: qpid/java/branches/transfer-queue/pom.xml
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/pom.xml?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/pom.xml (original)
+++ qpid/java/branches/transfer-queue/pom.xml Fri Oct 21 10:45:30 2016
@@ -146,7 +146,7 @@
     <mockito-version>1.9.5</mockito-version>
     <hamcrest-version>1.3</hamcrest-version>
     <httpclient-version>4.4</httpclient-version>
-    <qpid-jms-client-version>0.9.0</qpid-jms-client-version>
+    <qpid-jms-client-version>0.11.0</qpid-jms-client-version>
 
     <exec-maven-plugin-version>1.3.2</exec-maven-plugin-version>
     <javacc-maven-plugin-version>2.6</javacc-maven-plugin-version>

Modified: qpid/java/branches/transfer-queue/test-profiles/CPPExcludes
URL: http://svn.apache.org/viewvc/qpid/java/branches/transfer-queue/test-profiles/CPPExcludes?rev=1765987&r1=1765986&r2=1765987&view=diff
==============================================================================
--- qpid/java/branches/transfer-queue/test-profiles/CPPExcludes (original)
+++ qpid/java/branches/transfer-queue/test-profiles/CPPExcludes Fri Oct 21 10:45:30 2016
@@ -222,6 +222,7 @@ org.apache.qpid.server.protocol.v0_8.*
 //Broker for Java BDB System Tests
 org.apache.qpid.server.store.berkeleydb.*
 org.apache.qpid.server.store.berkeleydb.replication.*
+org.apache.qpid.server.virtualhostnode.berkeleydb.*
 
 // Broker for Java Derby Tests
 org.apache.qpid.server.store.derby.*

Propchange: qpid/java/branches/transfer-queue/test-profiles/CPPExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 21 10:45:30 2016
@@ -6,3 +6,4 @@
 /qpid/branches/java-broker-vhost-refactor/java/test-profiles/CPPExcludes:1493674-1494547
 /qpid/branches/java-network-refactor/qpid/java/test-profiles/010Excludes:805429-821809
 /qpid/branches/qpid-2935/qpid/java/test-profiles/CPPExcludes:1061302-1072333
+/qpid/java/trunk/test-profiles/CPPExcludes:1763546-1764865



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


Mime
View raw message