use of org.jboss.weld.context.ManagedContext in project core by weld.
the class ContextsImpl method destroyContext.
public void destroyContext(Context context) {
context = ForwardingContext.unwrap(context);
if (context instanceof ManagedContext) {
ManagedContext managedContext = (ManagedContext) context;
managedContext.invalidate();
managedContext.deactivate();
managedContext.activate();
} else if (context instanceof ApplicationContext) {
((ApplicationContext) context).invalidate();
} else {
throw new UnsupportedOperationException();
}
}
Aggregations