1 29 30 package com.caucho.management.j2ee; 31 32 import com.caucho.Version; 33 import com.caucho.loader.EnvironmentLocal; 34 import com.caucho.server.cluster.Server; 35 36 40 public class J2EEServer extends J2EEManagedObject { 41 private static EnvironmentLocal<J2EEServer> _j2eeServerLocal 42 = new EnvironmentLocal<J2EEServer>("caucho.jmx.j2ee.J2EEServer"); 43 44 private final Server _server; 45 46 static J2EEServer getLocal() 47 { 48 return _j2eeServerLocal.get(); 49 } 50 51 public J2EEServer(Server server) 52 { 53 _server = server; 54 55 _j2eeServerLocal.set(this); 56 } 57 58 protected String getName() 59 { 60 return _server.getServerId(); 61 } 62 63 protected boolean isJ2EEServer() 64 { 65 return false; 66 } 67 68 protected boolean isJ2EEApplication() 69 { 70 return false; 71 } 72 73 80 public String []getDeployedObjects() 81 { 82 return queryObjectNamesSet( 83 new String [][] { 84 { "j2eeType", "J2EEApplication"}, 85 { "j2eeType", "AppClientModule"}, 86 { "j2eeType", "ResourceAdapterModule"}, 87 { "j2eeType", "EJBModule"}, 88 { "j2eeType", "WebModule"} 89 }); 90 } 91 92 100 public String []getResources() 101 { 102 return queryObjectNamesSet( 103 new String [][] { 104 { "j2eeType", "JCAResource" }, 105 { "j2eeType", "JavaMailResource" }, 106 { "j2eeType", "JDBCResource" }, 107 { "j2eeType", "JMSResource" }, 108 { "j2eeType", "JNDIResource" }, 109 { "j2eeType", "JTAResource" }, 110 { "j2eeType", "RMI_IIOPResource" }, 111 { "j2eeType", "URLResource" }, 112 }); 113 } 114 115 120 public String []getJavaVMs() 121 { 122 return queryObjectNames("j2eeType", "JVM"); 123 } 124 125 128 public String getServerVendor() 129 { 130 return "Caucho Technology, Inc."; 131 } 132 133 136 public String getServerVersion() 137 { 138 return Version.FULL_VERSION; 139 } 140 141 } 142 | Popular Tags |