use of org.exoplatform.management.jmx.impl.ExoMBeanInfoBuilder in project kernel by exoplatform.
the class AbstractExoMBeanTest method register.
protected Bean register(String name, Class clazz) {
try {
ObjectName objectName = ObjectName.getInstance(name);
ModelMBeanInfo info = new ExoMBeanInfoBuilder(clazz).build();
RequiredModelMBean mbean = new RequiredModelMBean(info);
mbean.setManagedResource(clazz.newInstance(), "ObjectReference");
server.registerMBean(mbean, objectName);
return new Bean(objectName, (ModelMBeanInfo) server.getMBeanInfo(objectName));
} catch (Exception e) {
throw new AssertionError(e);
}
}
use of org.exoplatform.management.jmx.impl.ExoMBeanInfoBuilder in project kernel by exoplatform.
the class AbstractExoMBeanTest method assertNotBuildable.
protected void assertNotBuildable(Class clazz) {
try {
new ExoMBeanInfoBuilder(clazz).build();
fail();
} catch (Exception ignore) {
}
}
Aggregations