ContextManager.add(new ManagedContext(), event);
}*/
@SuppressWarnings("unchecked")
public void registerAvailableManagedTypes(@Observes final AfterDeploymentValidation event, BeanManager beanManager) {
ResourceBundle bundle = new ResourceBundle("demoiselle-core-bundle", Locale.getDefault());
Management monitoringManager = Beans.getReference(Management.class);
for (AnnotatedType<?> type : types) {
if (type.getJavaClass().isInterface() || Modifier.isAbstract(type.getJavaClass().getModifiers())) {
throw new DemoiselleException(bundle.getString("management-abstract-class-defined", type.getJavaClass()
.getCanonicalName()));
}
ManagedType managedType = new ManagedType(type.getJavaClass());
monitoringManager.addManagedType(managedType);