You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2016/12/28 14:47:37 UTC

svn commit: r1776287 - /qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java

Author: kwall
Date: Wed Dec 28 14:47:37 2016
New Revision: 1776287

URL: http://svn.apache.org/viewvc?rev=1776287&view=rev
Log:
QPID-7600: [Java Broker] Ensure IO thread calling AMQChannel#receivedComplete runs with the session's principal

Modified:
    qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java

Modified: qpid/java/trunk/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/trunk/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java?rev=1776287&r1=1776286&r2=1776287&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java (original)
+++ qpid/java/trunk/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java Wed Dec 28 14:47:37 2016
@@ -352,7 +352,16 @@ public class AMQChannel
 
     public void receivedComplete()
     {
-        sync();
+        AccessController.doPrivileged(new PrivilegedAction<Void>()
+        {
+            @Override
+            public Void run()
+            {
+                sync();
+                return null;
+            }
+        }, getAccessControllerContext());
+
     }
 
     private void incrementOutstandingTxnsIfNecessary()
@@ -1825,7 +1834,7 @@ public class AMQChannel
         _unfinishedCommandsQueue.add(new AsyncCommand(future, action));
     }
 
-    public void sync()
+    private void sync()
     {
         if(_logger.isDebugEnabled())
         {



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