1 29 30 package com.caucho.jmx; 31 32 import com.caucho.log.Log; 33 import com.caucho.util.L10N; 34 35 import java.util.logging.Logger ; 36 37 40 public class GlobalMBeanServer extends AbstractMBeanServer { 41 private static final L10N L = new L10N(GlobalMBeanServer.class); 42 private static final Logger log = Log.open(GlobalMBeanServer.class); 43 44 private ClassLoader _loader; 45 46 49 public GlobalMBeanServer() 50 { 51 this(Thread.currentThread().getContextClassLoader()); 52 } 53 54 57 public GlobalMBeanServer(ClassLoader loader) 58 { 59 super(Jmx.getMBeanServer().getDefaultDomain()); 60 61 _loader = loader; 62 } 63 64 67 protected MBeanContext getContext(ClassLoader loader) 68 { 69 AbstractMBeanServer envServer = Jmx.getMBeanServer(); 70 71 return envServer.getContext(_loader); 72 } 73 74 77 protected MBeanContext getExistingContext(ClassLoader loader) 78 { 79 AbstractMBeanServer envServer = Jmx.getMBeanServer(); 80 81 return envServer.getExistingContext(_loader); 82 } 83 84 87 protected MBeanView getView() 88 { 89 return getContext().getGlobalView(); 90 } 91 92 95 public String toString() 96 { 97 return "GlobalMBeanServer[]"; 98 } 99 } 100 | Popular Tags |