Class ContextUtils


  • @Typed
    public abstract class ContextUtils
    extends Object
    A modified copy of org.apache.deltaspike.core.util.ContextUtils. A set of utility methods for working with contexts.
    • Method Detail

      • isContextActive

        public static boolean isContextActive​(Class<? extends Annotation> scopeAnnotationClass)
        Checks if the context for the given scope annotation is active.
        Parameters:
        scopeAnnotationClass - The scope annotation (e.g. @RequestScoped.class)
        Returns:
        If the context is active.
      • isContextActive

        public static boolean isContextActive​(Class<? extends Annotation> scopeAnnotationClass,
                                              javax.enterprise.inject.spi.BeanManager beanManager)
        Checks if the context for the given scope annotation is active.
        Parameters:
        scopeAnnotationClass - The scope annotation (e.g. @RequestScoped.class)
        beanManager - The BeanManager
        Returns:
        If the context is active.