The MBeanServerConnection class contains many methods that will help you find what you need. See http://www.jboss.com/index.html?module=bb&op=viewtopic&t=84303
for some example code.
See http://java.sun.com/j2ee/1.4/docs/api/javax/management/MBeanServerConnection.html for the API.
Thanks for that info. I didn't state my question too clearly but I was actually asking a slitly different question. For example, after I establish a connection with the JBoss AS, if I wanted to get the version number I would do the following:
ObjectName on = new ObjectName("jboss.system:type=Server");
Object ver = server.getAttribute(on, "VersionName");
System.out.println("Version " + ver);
After starting the server, from the web-console page, under "System->JMX Mbeans", there is a list of mbeans and associated attributes. I am having trouble finding the MBeans and attributes that I need. For example, JVM heap size, current heap usage, JDBCDataSourceRuntime info, ExecuteQueue info, OpenSocketsCurrentCount, SocketsOpenedTotalCount.
Here are a few to get started with:
Data source connection pool information for datasource named XXX: jboss.jca:name=XXX,service=ManagedConnectionPool
Heap info: jboss.system:type=ServerInfo
Socket information (aka threads) for port 8080: jboss.web:name=http-0.0.0.0-8080,type=ThreadPool
By the way, it might be easier to use the jmx-console than the web console to locate and browse through the mbeans.
Could you please post how you are doing the connection to the remote Jboss Server?
Did you see the link to the example code in my earlier reply? That is a stand-alone client application that connects to an mbean server. Just change the "localhost" in the URL to your remote host name.
When I try to run the java program I got the following Exception
javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.jmx.adaptor.rmi.RMIAdaptor (no security manager: RMI class loader disabled)]
at javax.naming.InitialContext.lookup(Unknown Source)
Any Help would be appreciated!