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

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


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

Modified:
   remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ErrorTestCase.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/ErrorTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ErrorTestCase.java	2010-07-03 19:01:00 UTC (rev 5895)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ErrorTestCase.java	2010-07-03 19:01:29 UTC (rev 5896)
@@ -27,6 +27,8 @@
 import java.io.OutputStream;
 import java.net.InetAddress;
 import java.net.Socket;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
@@ -94,7 +96,16 @@
          ConsoleAppender consoleAppender = new ConsoleAppender(layout);
          Logger.getRootLogger().addAppender(consoleAppender);  
       }
-      InvokerRegistry.registerInvokerFactories(getTransport(), TestClientFactory.class, TestServerFactory.class);
+
+      AccessController.doPrivileged( new PrivilegedAction()
+      {
+         public Object run()
+         {
+            InvokerRegistry.registerInvokerFactories(getTransport(), TestClientFactory.class, TestServerFactory.class);
+            return null;
+         }
+      });
+      
       TestServerThread.threadCounter = 0;
    }
 



More information about the jboss-remoting-commits mailing list