[jboss-remoting-commits] JBoss Remoting SVN: r5897 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/shutdown.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Sat Jul 3 15:01:53 EDT 2010


Author: ron.sigal at jboss.com
Date: 2010-07-03 15:01:53 -0400 (Sat, 03 Jul 2010)
New Revision: 5897

Modified:
   remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/shutdown/ProcessInvocationShutdownTestCase.java
Log:
JBREM-1231: Wrapped all state changing calls to InvokerRegistry in PrivilegedAction.

Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/shutdown/ProcessInvocationShutdownTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/shutdown/ProcessInvocationShutdownTestCase.java	2010-07-03 19:01:29 UTC (rev 5896)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/shutdown/ProcessInvocationShutdownTestCase.java	2010-07-03 19:01:53 UTC (rev 5897)
@@ -23,6 +23,8 @@
 
 import java.io.IOException;
 import java.net.InetAddress;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -147,7 +149,15 @@
 
    protected void setupServer() throws Exception
    {
-      InvokerRegistry.registerInvokerFactories(getTransport(), TransportClientFactory.class, TestTransportServerFactory.class);
+      AccessController.doPrivileged( new PrivilegedAction()
+      {
+         public Object run()
+         {
+            InvokerRegistry.registerInvokerFactories(getTransport(), TransportClientFactory.class, TestTransportServerFactory.class);
+            return null;
+         }
+      });
+      
       host = InetAddress.getLocalHost().getHostAddress();
       port = PortUtil.findFreePort(host);
       locatorURI = getTransport() + "://" + host + ":" + port;



More information about the jboss-remoting-commits mailing list