JCDIService jcdiService = habitat.getByContract(JCDIService.class);
if( (jcdiService != null) && jcdiService.isCurrentModuleJCDIEnabled() ) {
// If 299-enabled always delegate to managed bean manager
managedBeanMgr.destroyManagedBean(managedObject, validate);
} else {
// If the object's class has @ManagedBean it's a managed bean. Otherwise, ask
// managed bean manager.