Hi All,
I need to write a tool that can manage all the application servers using JMX only.
But I have problem in getting all the existing Application Server names.
I don't know why but it seems like only when one Application Server is started, I can get its name by getting the MBean registered for it.
So my question is:
Is their anyway to get a list of ALL the Application Server names even if it is stopped??
------------
//The following is how I get all the running servers.
String query = "Websphere:*";
ObjectName queryName = new bjectName(query);
Set<ObjectName> set = adminClient.queryNames(queryName, null);
for(Iterator<ObjectName> i = set.iterator(); i.hasNext(); queryName = (ObjectName)i.next())
{
String type = queryName.getKeyProperty("type")
if (type!=null&&type.equals("Server"))
{
System.out.println(queryName.getKeyPropertyListString()); //print all the mbeans of type "Server"
}
}
// Through this, I can only list the ones that are started, how am I supposed to list the application servers that are not running??
Thanks in advance,
Eric