private static void deployMBean(final BeanManager bm, final ClassLoader cl, final String mbeanClass, final Properties appMbeans, final String id) {
final Class<?> clazz;
try {
clazz = cl.loadClass(mbeanClass);
} catch (ClassNotFoundException e) {
throw new OpenEJBRuntimeException(e);
}
final Set<Bean<?>> beans = bm.getBeans(clazz);
final Bean bean = bm.resolve(beans);
final Object instance;
if (bean == null) {