private <T> void addBean(BeanManagerImpl manager, Class<T> c) {
EnhancedAnnotatedType<T> clazz = manager.createEnhancedAnnotatedType(c);
RIBean<?> bean = ManagedBean.of(BeanAttributesFactory.forBean(clazz, manager), clazz, manager);
manager.addBean(bean);
manager.getBeanResolver().clear();
BeanDeployerEnvironment environment = BeanDeployerEnvironmentFactory.newEnvironment(new EjbDescriptors(), manager);
bean.initialize(environment);
}