Author: ron.sigal(a)jboss.com
Date: 2008-04-11 21:45:57 -0400 (Fri, 11 Apr 2008)
New Revision: 3968
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterServer.java
Log:
JBREM-934: Replaced AccessController.doPrivileged() call with
SecurityUtility.createMBeanServer() call.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterServer.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterServer.java 2008-04-12
01:45:35 UTC (rev 3967)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterServer.java 2008-04-12
01:45:57 UTC (rev 3968)
@@ -26,6 +26,7 @@
import org.jboss.remoting.ServerInvocationHandler;
import org.jboss.remoting.detection.multicast.MulticastDetector;
import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.util.SecurityUtility;
import org.w3c.dom.Element;
import javax.management.MBeanServer;
@@ -220,21 +221,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();
Show replies by date