qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1152484 - /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
Date Sat, 30 Jul 2011 15:00:54 GMT
Author: robbie
Date: Sat Jul 30 15:00:54 2011
New Revision: 1152484

URL: http://svn.apache.org/viewvc?rev=1152484&view=rev
Log:
QPID-3339: set the security Subject during the closed() invocation to prevent the spurious
ACL denies causing occasional test failures from ExternalACLTest under the Java 0.10 profiles

Applied patch from Keith Wall<keith.wall@gmail.com>

Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java?rev=1152484&r1=1152483&r2=1152484&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
Sat Jul 30 15:00:54 2011
@@ -106,8 +106,7 @@ public class ServerSessionDelegate exten
     @Override
     public void command(Session session, Method method)
     {
-        final ServerConnection scon = (ServerConnection) session.getConnection();
-        SecurityManager.setThreadSubject(scon.getAuthorizedSubject());
+        setThreadSubject(session);
 
         if(!session.isClosing())
         {
@@ -125,8 +124,6 @@ public class ServerSessionDelegate exten
         ((ServerSession)session).accept(method.getTransfers());
     }
 
-
-
     @Override
     public void messageReject(Session session, MessageReject method)
     {
@@ -1225,6 +1222,8 @@ public class ServerSessionDelegate exten
     @Override
     public void closed(Session session)
     {
+        setThreadSubject(session);
+
         for(Subscription_0_10 sub : getSubscriptions(session))
         {
             ((ServerSession)session).unregister(sub);
@@ -1243,4 +1242,9 @@ public class ServerSessionDelegate exten
         return ((ServerSession)session).getSubscriptions();
     }
 
+    private void setThreadSubject(Session session)
+    {
+        final ServerConnection scon = (ServerConnection) session.getConnection();
+        SecurityManager.setThreadSubject(scon.getAuthorizedSubject());
+    }
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message