• 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

Can not get MBean-JMX

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am developing a simple admin program for WebSphere Application Server. I am following the Technical Journal (from IBM) on how to accomplish this task. However, I am still not getting a populated set back. Can anyone explain or point me in the right direction?
Here is the code:
// Query for the ObjectName of the NodeAgent MBean on the given node
String query = "WebSphere:type=NodeAgent,node=" +nodeName+ ",*";
try
{
ObjectName queryName = new ObjectName(query);
Set s = adminClient.queryNames(queryName, null);
if(!s.isEmpty())
{
nodeAgent=(ObjectName)s.iterator().next();
}
if(nodeAgent == null)
{
System.out.println("Did not find this MBean >> " + queryName);
System.exit(-1);
}
}
:roll:
 
reply
    Bookmark Topic Watch Topic
  • New Topic