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

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


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

Modified:
   remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/EmptyURITestCase.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/http/EmptyURITestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/EmptyURITestCase.java	2010-07-03 19:00:36 UTC (rev 5894)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/EmptyURITestCase.java	2010-07-03 19:01:00 UTC (rev 5895)
@@ -24,6 +24,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;
 
@@ -85,7 +87,14 @@
          ConsoleAppender consoleAppender = new ConsoleAppender(layout);
          Logger.getRootLogger().addAppender(consoleAppender);
          
-         InvokerRegistry.registerInvokerFactories("http", TransportClientFactory.class, TestCoyoteInvokerFactory.class);
+         AccessController.doPrivileged( new PrivilegedAction()
+         {
+            public Object run()
+            {
+               InvokerRegistry.registerInvokerFactories("http", TransportClientFactory.class, TestCoyoteInvokerFactory.class);
+               return null;
+            }
+         });
       }
    }
 



More information about the jboss-remoting-commits mailing list