
Originally Posted by
aravind.sure
Thanks Wilkinson.
From the Jconsole i am able to see methods under Catalina-->Serverability from this I am trying to invoke the operation(listApplications)but it is giving the method not found exception.
MBeanServerConnection mbsc = jmxconn.getMBeanServerConnection();
ObjectName obj = null;
Vector paramsdata= new Vector();
paramsdata.add(new String("Catalina"));
paramsdata.add(new String("localhost"));
Object[] params = {productData};
obj = new ObjectName("tcServer:type=Serviceability,name=Depl oyer");
String[] signs = {productData.getClass().getName()};
Object o = mbsc.invoke(obj2, "listApplications", params, signs);
is anything i missed out for invoking the Mbean operation
You're not invoking the MBean operation correctly. The listApplications method has two arguments; the service name and the host name, both of which are Strings. To invoke this operation you'll need code something like the following:
Code:
mbsc.invoke(obj2, "listApplications", new String[] {"Catalina", "localhost"}, new String[] {String.class.getName(), String.class.getName()});