* if there is no managed context of the provided type and scope.
*/
public static synchronized void deactivate(Class<? extends CustomContext> customContextClass,
Class<? extends Annotation> scope) {
if (!initialized) {
throw new DemoiselleException(getBundle().getString("custom-context-manager-not-initialized"));
}
for (CustomContextCounter context : contexts) {
if (context.isSame(customContextClass, scope)) {
context.deactivate();
return;
}
}
throw new DemoiselleException(getBundle().getString("custom-context-not-found",
customContextClass.getCanonicalName(), scope.getSimpleName()));
}