Author: ron.sigal(a)jboss.com
Date: 2008-05-07 19:31:36 -0400 (Wed, 07 May 2008)
New Revision: 4128
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/AbstractDetector.java
Log:
JBREM-977: Wraps NetworkRegistry proxies.
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-05-07
23:30:30 UTC (rev 4127)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/AbstractDetector.java 2008-05-07
23:31:36 UTC (rev 4128)
@@ -31,6 +31,7 @@
import org.jboss.remoting.network.NetworkInstance;
import org.jboss.remoting.network.NetworkRegistryFinder;
import org.jboss.remoting.network.NetworkRegistryMBean;
+import org.jboss.remoting.network.NetworkRegistryWrapper;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -61,9 +62,10 @@
*/
public abstract class AbstractDetector implements AbstractDetectorMBean
{
+ static protected final Logger log = Logger.getLogger(AbstractDetector.class);
+
private long defaultTimeDelay = 5000;
private long heartbeatTimeDelay = 1000;
- protected final Logger log = Logger.getLogger(getClass());
protected MBeanServer mbeanserver;
protected ObjectName objectName;
protected ObjectName registryObjectName;
@@ -208,13 +210,11 @@
}
else
{
- networkRegistry = (NetworkRegistryMBean)AccessController.doPrivileged( new
PrivilegedAction()
- {
- public Object run()
- {
- return MBeanServerInvocationHandler.newProxyInstance(mbeanserver,
registryObjectName, NetworkRegistryMBean.class, false);
- }
- });
+ Object o = MBeanServerInvocationHandler.newProxyInstance(mbeanserver,
+ registryObjectName,
+
NetworkRegistryMBean.class,
+ false);
+ networkRegistry = new NetworkRegistryWrapper((NetworkRegistryMBean) o);
}
startPinger(getPingerDelay(), getPingerPeriod());
Show replies by date