@RemoteMethod
public Tree getJMXInformation() {
//build "All MBeans" Node
TreeEntry allMBeansEntry = new TreeEntry("All MBeans");
allMBeansEntry.addChild(new TreeEntry("geronimo", All_TYPE));
allMBeansEntry.addChild(new TreeEntry("geronimo.config", All_TYPE));
//add place holder
this.addPlaceholder(allMBeansEntry.getChildren());
//build "JavaEE MBean" Node
TreeEntry javaEEMBeansEntry = new TreeEntry("J2EE MBeans");
javaEEMBeansEntry.addChild(new TreeEntry("AppClientModule", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("EJBModule", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("EntityBean", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("J2EEApplication", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("J2EEDomain", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("J2EEServer", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JavaMailResource", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JCAConnectionFactory", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JCAManagedConnectionFactory", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JCAResource", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JDBCDataSource", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JDBCDriver", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JDBCResource", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JMSResource", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JNDIResource", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JTAResource", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("JVM", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("MessageDrivenBean", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("PersistenceUnit", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("ResourceAdapter", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("ResourceAdapterModule", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("RMI_IIOPResource", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("Servlet", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("StatefulSessionBean", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("StatelessSessionBean", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("URLResource", JAVAEE_TYPE));
javaEEMBeansEntry.addChild(new TreeEntry("WebModule", JAVAEE_TYPE));
//add place holder
this.addPlaceholder(javaEEMBeansEntry.getChildren());
//build "Geronimo MBean" Node
TreeEntry geronimoMBeansEntry = new TreeEntry("Geronimo MBeans" );
geronimoMBeansEntry.addChild(new TreeEntry("AppClient", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ArtifactManager", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ArtifactResolver", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("AttributeStore", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ConfigBuilder", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ConfigurationEntry", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ConfigurationManager", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ConfigurationStore", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("CORBABean", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("CORBACSS", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("CORBATSS", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("Deployer", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("DeploymentConfigurer", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("GBean", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("Host", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JaasLoginService", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JACCManager", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JAXRConnectionFactory", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JCAActivationSpec", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JCAAdminObject", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JCAConnectionManager", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JCAConnectionTracker", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JCAResourceAdapter", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JCAWorkManager", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JMSConnector", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JMSPersistence", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("JMSServer", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("KeyGenerator", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("Keystore", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("LoginModule", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("LoginModuleUse", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("MEJB", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ModuleBuilder", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("PersistentConfigurationList", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("RealmBridge", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("Repository", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("RoleMapper", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("SecurityRealm", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ServiceModule", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ServletTemplate", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ServletWebFilterMapping", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("ServletWebServiceTemplate", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("SystemLog", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("TomcatValve", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("TransactionContextManager", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("TransactionLog", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("TransactionManager", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("URLPattern", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("URLWebFilterMapping", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("WebFilter", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("WSLink", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("XIDFactory", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("XIDImporter", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("XmlAttributeBuilder", GERONIMO_TYPE));
geronimoMBeansEntry.addChild(new TreeEntry("XmlReferenceBuilder", GERONIMO_TYPE));
//add place holder
this.addPlaceholder(geronimoMBeansEntry.getChildren());
//build "Geronimo Service Module MBeans" node
TreeEntry geronimoServiceEntry = new TreeEntry("Geronimo Service Module MBeans" );
Collection<String> serviceModules = this.getServiceModules();
Iterator<String> it = serviceModules.iterator();
while (it.hasNext()){
String abstractName = it.next();
geronimoServiceEntry.addChild(new TreeEntry(abstractName, GERONIMO_SERVICE_TYPE));
}
//add place holder
this.addPlaceholder(geronimoServiceEntry.getChildren());
//build "Stats Provider MBeans" node
TreeEntry statsProviderEntry = new TreeEntry("Stats Provider MBeans", STATS_PROVIDER_TYPE);
this.addPlaceholder(statsProviderEntry);
//build "Search Results" node
TreeEntry searchNodeEntry = new TreeEntry("Search Results", SEARCHNODE_TYPE);
this.addPlaceholder(searchNodeEntry);
//build the tree
Tree tree = new Tree(null, "name"); //id = null means the id will be auto-generated
tree.addItem(allMBeansEntry);