1 7 8 package test.compliance.server.support; 9 10 import javax.management.MBeanServer; 11 import javax.management.MBeanServerBuilder; 12 import javax.management.MBeanServerDelegate; 13 14 20 public class TestMBeanServerBuilder 21 extends MBeanServerBuilder 22 { 23 public TestMBeanServerBuilder() 24 { 25 } 26 27 public MBeanServer newMBeanServer(String domain, MBeanServer outer, MBeanServerDelegate delegate) 28 { 29 MBeanServer original = super.newMBeanServer(domain, outer, delegate); 30 MBeanServer wrapper = MBeanServerWrapper.getWrapper(); 31 MBeanServerWrapper.getHandler(wrapper).server = original; 32 return wrapper; 33 } 34 35 public MBeanServerDelegate newMBeanServerDelegate() 36 { 37 return new TestMBeanServerDelegate(); 38 } 39 } 40 | Popular Tags |