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

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Fri Apr 11 21:45:14 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-04-11 21:45:13 -0400 (Fri, 11 Apr 2008)
New Revision: 3966

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterClient.java
Log:
JBREM-934: Replaced AccessController.doPrivileged() call with SecurityUtility.createMBeanServer() call.

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterClient.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterClient.java	2008-04-12 01:44:49 UTC (rev 3965)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterClient.java	2008-04-12 01:45:13 UTC (rev 3966)
@@ -31,9 +31,9 @@
 import org.jboss.remoting.invocation.NameBasedInvocation;
 import org.jboss.remoting.network.NetworkInstance;
 import org.jboss.remoting.network.NetworkRegistry;
+import org.jboss.remoting.util.SecurityUtility;
 
 import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
 import java.io.Serializable;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.InvocationTargetException;
@@ -41,8 +41,6 @@
 import java.lang.reflect.Proxy;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 
 /**
@@ -135,21 +133,7 @@
       if (!services.isSetup())
       {
          // we need an MBeanServer to store our network registry and multicast detector services
-         MBeanServer server = null;
-         try
-         {
-            server = (MBeanServer) AccessController.doPrivileged( new PrivilegedExceptionAction()
-            {
-               public Object run() throws Exception
-               {
-                  return MBeanServerFactory.createMBeanServer();
-               }
-            });
-         }
-         catch (PrivilegedActionException e)
-         {
-            throw (Exception) e.getCause();
-         }
+         MBeanServer server = SecurityUtility.createMBeanServer();
 
          // multicast detector will detect new network registries that come online
          MulticastDetector detector = new MulticastDetector();




More information about the jboss-remoting-commits mailing list