Just wanted to mention something I ran across so others are aware of it.
If you deploy a bean via -beans.xml (say for example an instance of ClusterPartition) and register it in JMX using the @JMX annotation, queries like this won't work any more:
MBeanServer server = MBeanServerLocator.locate();
QueryExp exp = Query.and(
Query.eq(
Query.classattr(),
Query.value(ClusterPartition.class.getName ())
),
Query.match(
Query.attr("PartitionName"),
Query.value(name)
)
);
Set mbeans = server.queryMBeans (null, exp);