• 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 question...needs answer immediately

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
Henry
 
Akhil Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
connectProps.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP);

connectProps.setProperty(AdminClient.CONNECTOR_HOST, "20.20.83.251");
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic