1 22 package org.jboss.test.jmx.compliance.server.support; 23 24 import javax.management.MBeanServer ; 25 import javax.management.MBeanServerBuilder ; 26 import javax.management.MBeanServerDelegate ; 27 28 34 public class TestMBeanServerBuilder 35 extends MBeanServerBuilder 36 { 37 public TestMBeanServerBuilder() 38 { 39 } 40 41 public MBeanServer newMBeanServer(String domain, MBeanServer outer, MBeanServerDelegate delegate) 42 { 43 MBeanServer original = super.newMBeanServer(domain, outer, delegate); 44 MBeanServer wrapper = MBeanServerWrapper.getWrapper(); 45 MBeanServerWrapper.getHandler(wrapper).server = original; 46 return wrapper; 47 } 48 49 public MBeanServerDelegate newMBeanServerDelegate() 50 { 51 return new TestMBeanServerDelegate(); 52 } 53 } 54 | Popular Tags |