Package org.apache.webbeans.context

Examples of org.apache.webbeans.context.AbstractContext


        try
        {
            Context webbeansContext = getBeanManager().getContext(bean.getScope());
            if (webbeansContext instanceof AbstractContext)
            {
                AbstractContext owbContext = (AbstractContext)webbeansContext;
                owbContext.initContextualBag(bean, creationalContext);
            }           
        }
        catch(ContextNotActiveException e)
        {
            //Nothing
View Full Code Here


        //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>) 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

        //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

    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

        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

    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

        try
        {
            Context webbeansContext = getBeanManager().getContext(bean.getScope());
            if (webbeansContext instanceof AbstractContext)
            {
                AbstractContext owbContext = (AbstractContext)webbeansContext;
                owbContext.initContextualBag(bean, creationalContext);
            }           
        }
        catch(ContextNotActiveException e)
        {
            //Nothing
View Full Code Here

        OwbBean<Object> contextual = (OwbBean<Object>)this.bean;
        //Context of the bean
        Context webbeansContext = getBeanManager().getContext(bean.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.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

        try
        {
            Context webbeansContext = getBeanManager().getContext(bean.getScope());
            if (webbeansContext instanceof AbstractContext)
            {
                AbstractContext owbContext = (AbstractContext)webbeansContext;
                owbContext.initContextualBag(bean, creationalContext);
            }           
        }
        catch(ContextNotActiveException e)
        {
            //Nothing
View Full Code Here

        OwbBean<Object> contextual = (OwbBean<Object>)this.bean;
        //Context of the bean
        Context webbeansContext = getBeanManager().getContext(bean.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.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

TOP

Related Classes of org.apache.webbeans.context.AbstractContext

Copyright © 2018 www.massapicom. 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.