// if the class is a seam component
if (d.isAnnotationPresent(Name.class)) {
String name = d.getAnnotation(Name.class).value();
Component component = Component.forName(name);
if (component != null) {
ScopeType scope = component.getScope();
if (scope != ScopeType.STATELESS && scope.isContextActive()) {
scope.getContext().remove(name);
}
Init.instance().removeObserverMethods(component);
}
Contexts.getApplicationContext().remove(name + Initialization.COMPONENT_SUFFIX);
}