1 12 13 package org.ejtools.jmx.browser.model.connector; 14 15 16 17 import java.util.ArrayList ; 18 19 20 21 import javax.management.MBeanServer ; 22 23 import javax.management.MBeanServerFactory ; 24 25 26 27 28 29 46 47 public class LocalConnectionService extends AbstractConnectionService 48 49 { 50 51 60 61 public void createMBeanServer() 62 63 throws Exception 64 65 { 66 67 MBeanServer server = null; 68 69 70 71 ArrayList servers = MBeanServerFactory.findMBeanServer(null); 72 73 if ((servers == null) || (servers.size() == 0)) 74 75 { 76 77 throw new Exception ("No MBeanServer found !!!"); 78 79 } 80 81 server = (MBeanServer ) servers.get(0); 82 83 this.setMBeanServer(server); 84 85 } 86 87 } 88 89 | Popular Tags |