1 29 30 package com.caucho.jmx; 31 32 import com.caucho.log.Log; 33 import com.caucho.util.L10N; 34 35 import javax.management.MBeanServerDelegate ; 36 import javax.management.MBeanServerDelegateMBean ; 37 import java.util.logging.Level ; 38 import java.util.logging.Logger ; 39 40 43 class MBeanServerImpl extends AbstractMBeanServer { 44 private static final L10N L = new L10N(MBeanServerImpl.class); 45 46 private static final Logger log = Log.open(MBeanServerImpl.class); 47 48 private MBeanContext _context; 49 50 53 public MBeanServerImpl(String domain, MBeanServerDelegate delegate) 54 { 55 super(domain); 56 57 ClassLoader loader = Thread.currentThread().getContextClassLoader(); 58 59 _context = new MBeanContext(this, loader, delegate); 60 61 try { 62 IntrospectionMBean mbean; 63 mbean = new IntrospectionMBean(delegate, MBeanServerDelegateMBean .class); 64 65 registerMBean(mbean, SERVER_DELEGATE_NAME); 66 } catch (Exception e) { 67 log.log(Level.WARNING, e.toString(), e); 68 } 69 } 70 71 74 protected MBeanContext getContext(ClassLoader loader) 75 { 76 return _context; 77 } 78 79 82 protected MBeanContext getExistingContext(ClassLoader loader) 83 { 84 return _context; 85 } 86 } 87 | Popular Tags |