Author: ron.sigal(a)jboss.com
Date: 2008-03-27 02:54:43 -0400 (Thu, 27 Mar 2008)
New Revision: 3796
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/AbstractDetector.java
Log:
JBREM-934: Put NetworkRegistryMBean.getServers() in AccessController.doPrivileged() call.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/AbstractDetector.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/AbstractDetector.java 2008-03-27
05:50:00 UTC (rev 3795)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/AbstractDetector.java 2008-03-27
06:54:43 UTC (rev 3796)
@@ -38,6 +38,9 @@
import javax.management.MBeanServer;
import javax.management.MBeanServerInvocationHandler;
import javax.management.ObjectName;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -420,7 +423,13 @@
forceHeartbeat();
if(networkRegistry != null)
{
- return networkRegistry.getServers();
+ return (NetworkInstance[]) AccessController.doPrivileged( new
PrivilegedAction()
+ {
+ public Object run()
+ {
+ return networkRegistry.getServers();
+ }
+ });
}
else
{
Show replies by date