• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMX question...needs answer immediately

 
Akhil Jain
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.
 
Henry Wong
author
Sheriff
Posts: 22518
109
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,
Henry
 
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, "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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!