Hi All,
I have TWO MBeans named "AxielleConfiguration" and "AxielleTest1". I
registered them with MBeanServer. Now when i want to access those MBeans.
When i say mbeanServer.queryMBeans(null, null); I am getting all the MBeans
in the Server. But I want only those MBeans written by me.
How can i get them?
Any help is much appreciated.
ObjectName objectName = new
ObjectName("DefaultDomain:service=AxielleConfiguration");
ObjectName testName = new
ObjectName("DefaultDomain:service=AxielleTest1");
mbeanServer = MBeanServerDelegator.getMBeanServer();
System.out.println("in the dopost method **** Test1");
object = mbeanServer.invoke(objectName, "registerMBean",
new Object []{(Object)new First(), testName}, new
String[]{"java.lang.Object","javax.management.ObjectName"});
System.out.println("after invoking **** ="+object);
ObjectInstance oInstance = (ObjectInstance)object;
System.out.println("after invoking objectName ****
="+oInstance.getObjectName());
QueryExp qexp = Query.match(Query.attr("ObjectName"),
Query.value("DefaulDomain:service=Axielle*"));
qexp.setMBeanServer(mbeanServer);
System.out.println("********** qexp="+qexp);
ObjectName obj = new ObjectName("*:service=Axielle,*");
Set set = mbeanServer.queryMBeans(obj, null);
System.out.println("********** setSize ="+set.size());
raj
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development