try {
// Get the class of the object
MBeanServer server = QueryEval.getMBeanServer();
return server.getObjectInstance(name).getClassName();
} catch (Exception re) {
return null;
/* In principle the MBean does exist because otherwise we
wouldn't be evaluating the query on it. But it could
potentially have disappeared in between the time we
discovered it and the time the query is evaluated.
Also, the exception could be a SecurityException.
Returning null from here will cause
BadAttributeValueExpException, which will in turn cause
this MBean to be omitted from the query result. */
}