Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

JMX question...needs answer immediately  RSS feed

Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to JMX and trying to get all the MBeanServer list using findMBeanServer(null) method of MbeanServerFactory which returns an ArrayList of MBeanServers.

I Dont know how to do this when the MBeanServers i am trying to get is on remote WAS6 server and i am trying to get that list on SUN Client.

Can Anybody tell me or suggest me what to do to exactly get all the MBeanServers remotely.
Posts: 23832
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on the application server, there may be a couple of ways to get to the mbean server connector. (Note: It is not possible to get the mbean server directly remotely -- you need to go through the mbean server connector, which is almost the same thing)

Now... unfortunately, I have never worked with the WAS mbean server, so I don't know which technique is available, or best.

If the application server has a mbean server connector directly accessable, you can access it via the JMXConnectorFactory class. However, you still need to know the service URL, which is generally different for every application server that I have encountered.

IMHO, with working with Weblogic and JBoss, this is probably not the best way to get to the JMX connector. But if you find a reference to a JMX service URL, in any of the IBM help pages, you can try using it.

The recommended way is probably through JNDI -- or at least, this is preferred method for Weblogic and JBoss. Unfortunately, this means that you will have to include the WAS client jar file in your classpath. The exact calling procedure and pathname is also probably WAS specific.

You probably have to check the IBM help site to see what jar files you need, and getting a JNDI example on how to get the mbean server connector.

Hope this helps,
Akhil Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
connectProps.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP);

connectProps.setProperty(AdminClient.CONNECTOR_HOST, "");
connectProps.setProperty(AdminClient.CONNECTOR_PORT, "8880");
connectProps.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "false");

i am using following connector properties. but i am getting some errors with privilages. i do not have any global or java2 security enabled on my WAS6.
No, tomorrow we rule the world! With this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!