[jboss-remoting-commits] JBoss Remoting SVN: r5885 - remoting2/branches/2.x/src/main/org/jboss/remoting.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Sat Jul 3 13:16:09 EDT 2010


Author: ron.sigal at jboss.com
Date: 2010-07-03 13:16:08 -0400 (Sat, 03 Jul 2010)
New Revision: 5885

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerLocator.java
Log:
JBREM-1231: Wrapped all state changing calls to InvokerRegistry in PrivilegedAction.

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerLocator.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerLocator.java	2010-07-03 16:11:42 UTC (rev 5884)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerLocator.java	2010-07-03 17:16:08 UTC (rev 5885)
@@ -867,8 +867,21 @@
     * @throws Exception
     */
    public ClientInvoker narrow() throws Exception
-   {
-      return InvokerRegistry.createClientInvoker(this);
+   {  
+      try
+      {
+         return (ClientInvoker) AccessController.doPrivileged( new PrivilegedExceptionAction()
+         {
+            public Object run() throws Exception
+            {
+               return InvokerRegistry.createClientInvoker(InvokerLocator.this);
+            }
+         });
+      }
+      catch (PrivilegedActionException pae)
+      {
+         throw pae.getException();
+      }
    }
 
 



More information about the jboss-remoting-commits mailing list