aspose file tools*
The moose likes Websphere and the fly likes JMX: How to list all the application servers on the node regardless of their statuses Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "JMX: How to list all the application servers on the node regardless of their statuses" Watch "JMX: How to list all the application servers on the node regardless of their statuses" New topic
Author

JMX: How to list all the application servers on the node regardless of their statuses

Eric Liao
Greenhorn

Joined: Sep 10, 2010
Posts: 2
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMX: How to list all the application servers on the node regardless of their statuses
 
Similar Threads
WASv5.1.1.6: JMX NotificationListener not working for ListenerPort events?
Newbie question(s) re: MBeans in WAS 6.1
JMX in cluster on WS 5.1
Can not get MBean-JMX
Websphere variables