Examples of CreationalContextFactory


Examples of org.apache.webbeans.context.creational.CreationalContextFactory

        CreationalContext<Object> creationalContext = null;
       
        OwbBean<Object> contextual = (OwbBean<Object>) bean;
        //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
        // In this case we may safely simply create a fresh CreationalContext, because
        // if an 'old' contextual instance exists, it would have been found by the
        // preceding call to Context.get(Contextual) (without any CreationalContext)
        if(creationalContext == null)
        {
            creationalContext = contextFactory.getCreationalContext(contextual);
        }

        return creationalContext;
    }
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextFactory

        CreationalContext<Object> creationalContext = null;
       
        OwbBean<Object> contextual = (OwbBean<Object>) bean;
        //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
        // In this case we may safely simply create a fresh CreationalContext, because
        // if an 'old' contextual instance exists, it would have been found by the
        // preceding call to Context.get(Contextual) (without any CreationalContext)
        if(creationalContext == null)
        {
            creationalContext = contextFactory.getCreationalContext(contextual);
        }

        return creationalContext;
    }
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextFactory

        CreationalContext<Object> creationalContext = null;
       
        OwbBean<Object> contextual = (OwbBean<Object>) bean;
        //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
        // In this case we may safely simply create a fresh CreationalContext, because
        // if an 'old' contextual instance exists, it would have been found by the
        // preceding call to Context.get(Contextual) (without any CreationalContext)
        if(creationalContext == null)
        {
            creationalContext = contextFactory.getCreationalContext(contextual);
        }

        return creationalContext;
    }
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextFactory

        CreationalContext<Object> creationalContext = null;
       
        OwbBean<Object> contextual = (OwbBean<Object>)this.bean;
        //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
        // In this case we may safely simply create a fresh CreationalContext, because
        // if an 'old' contextual instance exists, it would have been found by the
        // preceding call to Context.get(Contextual) (without any CreationalContext)
        if(creationalContext == null)
        {
            creationalContext = contextFactory.getCreationalContext(contextual);
        }

        return creationalContext;
    }
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextFactory

        CreationalContext<Object> creationalContext = null;
       
        OwbBean<Object> contextual = (OwbBean<Object>)this.bean;
        //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
        // In this case we may safely simply create a fresh CreationalContext, because
        // if an 'old' contextual instance exists, it would have been found by the
        // preceding call to Context.get(Contextual) (without any CreationalContext)
        if(creationalContext == null)
        {
            creationalContext = contextFactory.getCreationalContext(contextual);
        }

        return creationalContext;
    }
View Full Code Here

Examples of org.apache.webbeans.context.creational.CreationalContextFactory

        CreationalContext<Object> creationalContext = null;
       
        OwbBean<Object> contextual = (OwbBean<Object>) bean;
        //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
        // In this case we may safely simply create a fresh CreationalContext, because
        // if an 'old' contextual instance exists, it would have been found by the
        // preceding call to Context.get(Contextual) (without any CreationalContext)
        if(creationalContext == null)
        {
            creationalContext = contextFactory.getCreationalContext(contextual);
        }

        return creationalContext;
    }
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.