Examples of ContextNotActiveException


Examples of javax.enterprise.context.ContextNotActiveException

       

        // Still null
        if (contexts.isEmpty())
        {
            throw new ContextNotActiveException("WebBeans context with scope type annotation @" + scopeType.getSimpleName() + " does not exist within current thread");
        }
       
        else if(contexts.size() > 1)
        {
            throw new IllegalStateException("More than one active context exists with scope type annotation @" + scopeType.getSimpleName());
View Full Code Here

Examples of javax.enterprise.context.ContextNotActiveException

    protected ViewScopeContextualStorage getContextualStorage(boolean createIfNotExist)
    {
        String viewScopeId = getCurrentViewScopeId(createIfNotExist);
        if (createIfNotExist && viewScopeId == null)
        {
            throw new ContextNotActiveException(
                "ViewScopeContextImpl: no viewScopeId set for the current view yet!");
        }
        if (viewScopeId != null)
        {
            return getViewScopeBeanHolder().getContextualStorage(beanManager, viewScopeId);
View Full Code Here

Examples of javax.enterprise.context.ContextNotActiveException

     */
    protected void checkActive()
    {
        if (!isActive())
        {
            throw new ContextNotActiveException("CDI context with scope annotation @"
                + getScope().getName() + " is not active with respect to the current thread");
        }
    }
View Full Code Here

Examples of javax.enterprise.context.ContextNotActiveException

    {
        //FacesContext facesContext = FacesContext.getCurrentInstance();
        //String clientWindowFlowId = getCurrentClientWindowFlowId(facesContext);
        if (clientWindowFlowId == null)
        {
            throw new ContextNotActiveException("FlowScopedContextImpl: no current active flow");
        }

        if (createIfNotExist)
        {
            return getFlowScopeBeanHolder().getContextualStorage(beanManager, clientWindowFlowId);
View Full Code Here

Examples of javax.enterprise.context.ContextNotActiveException

     */
    protected void checkActive(FacesContext facesContext)
    {
        if (!isActive(facesContext))
        {
            throw new ContextNotActiveException("CDI context with scope annotation @"
                + getScope().getName() + " is not active with respect to the current thread");
        }
    }
View Full Code Here

Examples of javax.enterprise.context.ContextNotActiveException

    private void checkActive()
    {
        if (!isActive())
        {
            throw new ContextNotActiveException("WebBeans context with scope annotation " +
                                                "@ViewScoped is not active with respect to the current thread");
        }
    }
View Full Code Here

Examples of javax.enterprise.context.ContextNotActiveException

    protected ViewScopeContextualStorage getContextualStorage(boolean createIfNotExist)
    {
        String viewScopeId = getCurrentViewScopeId(createIfNotExist);
        if (createIfNotExist && viewScopeId == null)
        {
            throw new ContextNotActiveException(
                "ViewScopeContextImpl: no viewScopeId set for the current view yet!");
        }
        if (viewScopeId != null)
        {
            return getViewScopeBeanHolder().getContextualStorage(beanManager, viewScopeId);
View Full Code Here

Examples of javax.enterprise.context.ContextNotActiveException

     */
    protected void checkActive()
    {
        if (!isActive())
        {
            throw new ContextNotActiveException("CDI context with scope annotation @"
                + getScope().getName() + " is not active with respect to the current thread");
        }
    }
View Full Code Here

Examples of javax.enterprise.context.ContextNotActiveException

  @Override
  public <T> T get(final Contextual<T> contextual, final CreationalContext<T> creationalContext) {
    T instance = null;

    if (!isActive()) {
      throw new ContextNotActiveException();
    }

    Class<?> type = getType(contextual);
    if (getStore().contains(type)) {
      instance = (T) getStore().get(type);
View Full Code Here

Examples of javax.enterprise.context.ContextNotActiveException

    private void checkActive()
    {
        if (!isActive())
        {
            throw new ContextNotActiveException("WebBeans context with scope annotation " +
                                                "@ViewScoped is not active with respect to the current thread");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.