Package org.apache.webbeans.container

Examples of org.apache.webbeans.container.BeanManagerImpl.createCreationalContext()


                if (ifExist && object == null)
                {
                    return;
                }

                creationalContext = manager.createCreationalContext(component);

                if (isPrivateMethod)
                {
                    // since private methods cannot be intercepted, we can just call them directly
                    // so we get the contextual instance directly from the context because we do not
View Full Code Here


                    if (isEventProviderInjection(point))
                    {
                        EventBean.local.set(point);
                    }
                   
                    CreationalContext<Object> creational = manager.createCreationalContext(injectedBean);
                    Object instance = manager.getReference(injectedBean, null, creational);
                    if (injectionPointBeanLocalSetOnStack)
                    {
                        InjectionPointBean.unsetThreadLocal();
                    }
View Full Code Here

                if (isEventProviderInjection(point))
                {
                    EventBean.local.set(point);
                }
               
                CreationalContext<Object> creational = manager.createCreationalContext(injectedBean);
                Object instance = manager.getReference(injectedBean, null, creational);
               
                if (injectionPointBeanLocalSetOnStack)
                {
                    InjectionPointBean.unsetThreadLocal();
View Full Code Here

        boolean isDependentBean = WebBeansUtil.isDependent(bean);

        if (!isDependentBean)
        {
            // but for all NormalScoped beans we will need to create a fresh CreationalContext
            creationalContext = beanManager.createCreationalContext(bean);
        }

        instance = (T) beanManager.getReference(bean, null, creationalContext);

        if (isDependentBean && ownerInstance != null && creationalContext instanceof CreationalContextImpl)
View Full Code Here

            if (interceptor == null)
            {
                BeanManagerImpl manager = webBeansContext.getBeanManagerImpl();

                WebBeansInterceptor<Object> actualInterceptor = (WebBeansInterceptor<Object>) webBeansInterceptor;
                CreationalContext<Object> creationalContext = manager.createCreationalContext(actualInterceptor);
                interceptor = manager.getReference(actualInterceptor, actualInterceptor.getBeanClass(), creationalContext);

                actualInterceptor.setInjections(interceptor, creationalContext);

                ownerCreationalContext.addDependent(ownerInstance, (WebBeansInterceptor<Object>) webBeansInterceptor, interceptor);
View Full Code Here

            }
            Bean<?> simulatedStatelessEjbBean = beansIterator.next();

            return (X)beanManager.getReference(simulatedStatelessEjbBean,
                                               resourceType,
                                               beanManager.createCreationalContext(simulatedStatelessEjbBean));
        }
    }
}
View Full Code Here

    public OWBInjector inject(Object javaEeComponentInstance, CreationalContext<?> creationalContext) throws Exception {
        BeanManagerImpl beanManager = webBeansContext.getBeanManagerImpl();
        try {
            this.javaEEInstance = javaEeComponentInstance;
            if (creationalContext == null) {
                this.ownerCreationalContext = (CreationalContextImpl<?>) beanManager.createCreationalContext(null);
            }

            Class<Object> injectableComponentClass = (Class<Object>) javaEeComponentInstance.getClass();

            //Look for custom InjectionTarget
View Full Code Here

        try
        {
            this.javaEEInstance = javaEeComponentInstance;
            if(creationalContext == null)
            {
                this.ownerCreationalContext = (CreationalContextImpl<?>) beanManager.createCreationalContext(null);  
            }

            Class<Object> injectableComponentClass = (Class<Object>)javaEeComponentInstance.getClass();

            //Look for custom InjectionTarget
View Full Code Here

                    // this may happen if we try to e.g. send an event to a @ConversationScoped bean from a ServletListener
                    logger.info(OWBLogConst.INFO_0010, bean);
                    return;
                }
               
                creationalContext = manager.createCreationalContext(specializedComponent);
               
                // on Reception.IF_EXISTS: ignore this bean if a the contextual instance doesn't already exist
                if (ifExist && context.get(specializedComponent) == null)
                {
                    return;
View Full Code Here

                        {
                            InjectionPointBean.local.set(point);  
                        }
                    }                          
                   
                    CreationalContext<Object> creational = manager.createCreationalContext(injectedBean);
                    Object instance = manager.getInstance(injectedBean, creational);
                   
                    param = new ObserverParams();
                    param.isBean = true;
                    param.creational = creational;
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.