• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic