Examples of AbstractContext


Examples of org.apache.webbeans.context.AbstractContext

        //Context of the bean
        Context webbeansContext = getBeanManager().getContext(bean.getScope());
        CreationalContextFactory contextFactory = bean.getWebBeansContext().getCreationalContextFactory();
        if (webbeansContext instanceof AbstractContext)
        {
            AbstractContext owbContext = (AbstractContext)webbeansContext;
            creationalContext = owbContext.getCreationalContext(contextual);

            //No creational context means that no BeanInstanceBag
            //Actually this can be occurs like scenarions
            //@SessionScoped bean injected into @ApplicationScopedBean
            //And session is destroyed and restarted but proxy still
            //contained in @ApplicationScopedBean
            if(creationalContext == null)
            {
                creationalContext = contextFactory.getCreationalContext(contextual);
                owbContext.initContextualBag((OwbBean<Object>)this.bean, creationalContext);
            }
        }

        // for 3rd party contexts (actually all contexts provided via portable extensions)
        // we don't have all the stuff of AbstractContext available
View Full Code Here

Examples of org.apache.webbeans.context.AbstractContext

        //Context of the bean
        Context webbeansContext = webBeansContext.getBeanManagerImpl().getContext(this.ejbBean.getScope());
        CreationalContext<Object> cc = null;
        if (webbeansContext instanceof AbstractContext)
        {
            AbstractContext owbContext = (AbstractContext)webbeansContext;
            cc = owbContext.getCreationalContext(contextual);

            //No creational context means that no BeanInstanceBag
            //Actually this can be occurs like scenarions
            //@SessionScoped bean injected into @ApplicationScopedBean
            //And session is destroyed and restarted but proxy still
            //contained in @ApplicationScopedBean
            if(cc == null)
            {
                cc = webBeansContext.getCreationalContextFactory().getCreationalContext(contextual);
                owbContext.initContextualBag((OwbBean<Object>)this.ejbBean, cc);
            }           
        }
               
        return cc;
    }
View Full Code Here

Examples of org.apache.webbeans.context.AbstractContext

    private void initiateBeanBag(OwbBean<Object> bean, CreationalContext<Object> creationalContext)
    {
        Context webbeansContext =  webBeansContext.getBeanManagerImpl().getContext(bean.getScope());
        if (webbeansContext instanceof AbstractContext)
        {
            AbstractContext owbContext = (AbstractContext)webbeansContext;
            owbContext.initContextualBag(bean, creationalContext);
        }
    }   
View Full Code Here

Examples of org.apache.webbeans.context.AbstractContext

        //Context of the bean
        Context webbeansContext = webBeansContext.getBeanManagerImpl().getContext(this.ejbBean.getScope());
        CreationalContext<Object> cc = null;
        if (webbeansContext instanceof AbstractContext)
        {
            AbstractContext owbContext = (AbstractContext)webbeansContext;
            cc = owbContext.getCreationalContext(contextual);

            //No creational context means that no BeanInstanceBag
            //Actually this can be occurs like scenarions
            //@SessionScoped bean injected into @ApplicationScopedBean
            //And session is destroyed and restarted but proxy still
            //contained in @ApplicationScopedBean
            if(cc == null)
            {
                cc = webBeansContext.getCreationalContextFactory().getCreationalContext(contextual);
                owbContext.initContextualBag((OwbBean<Object>)this.ejbBean, cc);
            }           
        }
               
        return cc;
    }
View Full Code Here

Examples of org.apache.webbeans.context.AbstractContext

    private void initiateBeanBag(OwbBean<Object> bean, CreationalContext<Object> creationalContext)
    {
        Context webbeansContext =  webBeansContext.getBeanManagerImpl().getContext(bean.getScope());
        if (webbeansContext instanceof AbstractContext)
        {
            AbstractContext owbContext = (AbstractContext)webbeansContext;
            owbContext.initContextualBag(bean, creationalContext);
        }
    }   
View Full Code Here

Examples of org.apache.webbeans.context.AbstractContext

        OwbBean<Object> contextual = (OwbBean<Object>)this.ejbBean;
        //Context of the bean
        Context webbeansContext = BeanManagerImpl.getManager().getContext(this.ejbBean.getScope());
        if (webbeansContext instanceof AbstractContext)
        {
            AbstractContext owbContext = (AbstractContext)webbeansContext;
            creationalContext = owbContext.getCreationalContext(contextual);

            //No creational context means that no BeanInstanceBag
            //Actually this can be occurs like scenarions
            //@SessionScoped bean injected into @ApplicationScopedBean
            //And session is destroyed and restarted but proxy still
            //contained in @ApplicationScopedBean
            if(creationalContext == null)
            {
                creationalContext = CreationalContextFactory.getInstance().getCreationalContext(contextual);
                owbContext.initContextualBag((OwbBean<Object>)this.ejbBean, creationalContext);
            }           
        }
               
        return creationalContext;
    }
View Full Code Here

Examples of org.apache.webbeans.context.AbstractContext

    private void initiateBeanBag(OwbBean<Object> bean, CreationalContext<Object> creationalContext)
    {
        Context webbeansContext =  BeanManagerImpl.getManager().getContext(bean.getScope());
        if (webbeansContext instanceof AbstractContext)
        {
            AbstractContext owbContext = (AbstractContext)webbeansContext;
            owbContext.initContextualBag(bean, creationalContext);
        }
    }   
View Full Code Here

Examples of org.deuce.transaction.AbstractContext

  private String id;
     
  public BankAccount(String id) {
    this.id = id;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      new GlobalObject(this, ((AbstractDistinguishable)this).getId())// publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
View Full Code Here

Examples of org.deuce.transaction.AbstractContext

 
  public Node(String id, Integer value) {
    this.id = id;
    this.value = value;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      new GlobalObject(this, ((AbstractDistinguishable)this).getId())// publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
View Full Code Here

Examples of org.deuce.transaction.AbstractContext

    this.id = id;
    this.price = price;
    this.total = INITIAL;
    this.used = 0;
   
    AbstractContext context = ContextDelegator.getInstance();
    if(context.getContextId()==null)
      new GlobalObject(this, ((AbstractDistinguishable)this).getId())// publish it now 
    else
      context.newObject(this)// add it to context publish-set
  }
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.