J2EEAppListerpublic class J2EEAppLister extends org.jboss.console.plugins.helpers.AbstractPluginWrapper As the number of MBeans is very big, we use a real Java class which is far
faster than beanshell |
Fields Summary |
---|
private static final long | serialVersionUID | protected static final String | JMX_JSR77_DOMAIN |
Constructors Summary |
---|
public J2EEAppLister()
super();
|
Methods Summary |
---|
org.jboss.console.manager.interfaces.ResourceTreeNode[] | createModules(java.lang.String[] modules)
ResourceTreeNode[] deployed = new ResourceTreeNode[modules.length];
for (int i = 0; i < modules.length; i++)
{
//J2EEApplication earProxy = (J2EEApplication)
// MBeanProxy.create(J2EEApplication.class, objName, getMBeanServer());
ObjectName objectName = new ObjectName(modules[i]);
deployed[i] = createResourceNode (
objectName.getKeyProperty ("name"), // name
"", // description
"images/EspressoMaker.gif", // Icon URL
null, // "J2EEApp.jsp?ObjectName=" + encode (objName.toString ()), // Default URL
null,
null, // sub nodes
null, //createEARSubModules (objName), // Sub-Resources
modules[i].toString (),
this.mbeanServer.getMBeanInfo (objectName).getClassName ()
).setVisibility (ResourceTreeNode.INVISIBLE_IF_SUBNODE_EXISTS);
}
return deployed;
| protected org.jboss.console.manager.interfaces.TreeNode | getTreeForResource(java.lang.String profile, org.jboss.console.manager.interfaces.ManageableResource resource)
try
{
ObjectName objName = ((MBeanResource)resource).getObjectName();
J2EEApplicationMBean appProxy = (J2EEApplicationMBean)
MBeanProxyExt.create (J2EEApplicationMBean.class, objName, getMBeanServer());
return createTreeNode
(
objName.getKeyProperty("name"), // name
"", // description
"images/EspressoMaker.gif", // Icon URL
"J2EEApp.jsp?ObjectName=" + encode (objName.toString ()), // Default URL
null,
null, // sub nodes
createModules (appProxy.getmodules()) // Sub-Resources
).setMasterNode(true);
}
catch (Exception e)
{
e.printStackTrace ();
System.out.println (checker);
return null;
}
|
|