Thanks everyone!!
For your better understanding, here is the code I am using with weblogic to fetch the
required information:
import weblogic.jndi.Environment;
| import weblogic.management.MBeanHome;
| import weblogic.management.runtime.JVMRuntimeMBean;
|
| Environment env = new Environment();
| env.setProviderUrl("t3://weblogicbox:1111");
| env.setSecurityPrincipal("abcd");
| env.setSecurityCredentials("abcd");
| Context ctx = env.getInitialContext();
| home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
|
| JVMRuntimeMBean serverRuntime = (JVMRuntimeMBean) home.getRuntimeMBean(serverName,
"JVMRuntime");
|
System.out.println((serverRuntime.getHeapSizeCurrent()-serverRuntime.getHeapFreeCurrent())/1024);
Note that this program is running on a different box & fetching information from a
different box running weblogic.
Thanks a lot
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140026#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...