public MBeanValidator() {
mbs = MBeanServerFactory.newMBeanServer();
}
public ObjectName registerTestMBean(final Map<String, String> params, final Map<String, String> attributes) throws RuntimeException {
try {
CustomMBeanRegistration cmr = new CustomMBeanRegistrationImpl(mbs);
final Mbean m = toMbean(params, attributes, true);
final ObjectName ron = cmr.registerMBean(m);
return ( ron );
} catch (final Exception e) {
throw new RuntimeException(e);
}