aspose file tools
The moose likes Distributed Java and the fly likes JMX question...needs answer immediately Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "JMX question...needs answer immediately" Watch "JMX question...needs answer immediately" New topic
Author

JMX question...needs answer immediately

Akhil Jain
Ranch Hand

Joined: Oct 14, 2004
Posts: 74
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.


-------------------------------<br />you can't move ahead, unless you try for it.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 16692
    
  19

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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Akhil Jain
Ranch Hand

Joined: Oct 14, 2004
Posts: 74
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JMX question...needs answer immediately
 
Similar Threads
How to Start JMX
JMX In Action by Benjamin Sullins Mark Whipple
what is jxm console?
How do you retrieve all the sessions?
Persistent scheduler