[jboss-remoting-commits] JBoss Remoting SVN: r3965 - 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:44:50 EDT 2008
Author: ron.sigal at jboss.com
Date: 2008-04-11 21:44:49 -0400 (Fri, 11 Apr 2008)
New Revision: 3965
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/InternalTransporterServices.java
Log:
JBREM-934: Replaced AccessController.doPrivileged() call with SecurityUtility.registerMBean() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/InternalTransporterServices.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/InternalTransporterServices.java 2008-04-12 01:43:43 UTC (rev 3964)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/InternalTransporterServices.java 2008-04-12 01:44:49 UTC (rev 3965)
@@ -10,6 +10,7 @@
import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.remoting.detection.Detector;
import org.jboss.remoting.network.NetworkRegistry;
+import org.jboss.remoting.util.SecurityUtility;
import javax.management.MBeanServer;
import javax.management.ObjectName;
@@ -239,21 +240,7 @@
if (registerDetector)
{
- try
- {
- AccessController.doPrivileged( new PrivilegedExceptionAction()
- {
- public Object run() throws Exception
- {
- m_mBeanServer.registerMBean(m_detector, m_detectorName);
- return null;
- }
- });
- }
- catch (PrivilegedActionException e)
- {
- throw (Exception) e.getCause();
- }
+ SecurityUtility.registerMBean(m_mBeanServer, m_detector, m_detectorName);
}
}
@@ -311,22 +298,8 @@
m_networkRegistryName = registryName;
if (registerRegistry)
- {
- try
- {
- AccessController.doPrivileged( new PrivilegedExceptionAction()
- {
- public Object run() throws Exception
- {
- m_mBeanServer.registerMBean(m_networkRegistry, m_networkRegistryName);
- return null;
- }
- });
- }
- catch (PrivilegedActionException e)
- {
- throw (Exception) e.getCause();
- }
+ {
+ SecurityUtility.registerMBean(m_mBeanServer, m_networkRegistry, m_networkRegistryName);
}
}
More information about the jboss-remoting-commits
mailing list