Author: ron.sigal(a)jboss.com
Date: 2010-07-03 14:27:59 -0400 (Sat, 03 Jul 2010)
New Revision: 5893
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java
Log:
JBREM-1231: Wrapped all state changing calls to InvokerRegistry in PrivilegedAction.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java 2010-07-03
17:27:13 UTC (rev 5892)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java 2010-07-03
18:27:59 UTC (rev 5893)
@@ -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;
@@ -475,8 +477,16 @@
protected void setupServer() throws Exception
- {
- InvokerRegistry.registerInvokerFactories("socket",
org.jboss.remoting.transport.socket.TransportClientFactory.class,
TestServerInvokerFactory.class);
+ {
+ AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ InvokerRegistry.registerInvokerFactories("socket",
org.jboss.remoting.transport.socket.TransportClientFactory.class,
TestServerInvokerFactory.class);
+ return null;
+ }
+ });
+
host = InetAddress.getLocalHost().getHostAddress();
port = PortUtil.findFreePort(host);
locatorURI = getTransport() + "://" + host + ":" + port +
"/?x=x";
Show replies by date