Title: Message
You are trying to match on the attribute of an mbean, not a property in the ObjectName. For this you need to
only specify the scope value of the match call. For example, to find all mbeans in the jboss domain with
the service=invoker property in their ObjectName:
 
import java.util.*;
import javax.management.*;
 
   QueryExp nameExp = null;
   QueryExp exp = nameExp;
   ObjectName scope = new ObjectName("jboss:*");
   System.out.println("Query _expression_="+ exp);
   System.out.println("Scope="+ scope);
 
   ArrayList mbeanServers = MBeanServerFactory.findMBeanServer(null);
   Iterator iter = mbeanServers.iterator();
   while (iter.hasNext()) {
      MBeanServer mbeanServer = (MBeanServer) iter.next();
      Set names = mbeanServer.queryNames(scope, exp);
      System.out.println("Found invokers: " + names);
   }
08:57:10,489 INFO  [STDOUT] Query _expression_=null
08:57:10,489 INFO  [STDOUT] Scope=jboss:service=invoker,*
08:57:10,519 INFO  [STDOUT] Found invokers: [jboss:service=invoker,type=http,target=Naming,readonly=true, jb
oss:service=invoker,type=jrmp, jboss:service=invoker,type=local, jboss:service=invoker,type=httpHA, jboss:se
rvice=invoker,type=pooled, jboss:service=invoker,type=http, jboss:service=invoker,type=http,target=Naming]
 
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
Sent: Wednesday, June 11, 2003 9:13 AM
Subject: RE: [JBoss-user] MBeanServer.queryNames() not working

I just tried that and it didn't work.
 
When you say "the standard mbean naming convention", to what are you referring?  The JBoss deployment files all use lowercase for MBean ObjectName property names.  The examples in Juha and Mark's JMX book also use lowercase.  Are you saying that JBoss's JMX implementation uppercases the first letter of ObjectName property names somewhere along the line?

Reply via email to