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.getInstance(injectedBean, 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.getInstance(injectedBean, 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

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

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

            //Look for custom InjectionTarget
View Full Code Here

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

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

            }
            return rv;
        }
        else
        {
            CreationalContext<?> cc = manager.createCreationalContext(null);
            try
            {
                return runInterceptorStack(ejbBean.getInterceptorStack(), method, instance, arguments, ejbBean, cc, ejbContext);
            }
            finally
View Full Code Here

           
            List<InterceptorData> interceptorStack = bean.getInterceptorStack();
           
            if (interceptorStack.size() > 0 && WebBeansUtil.isContainsInterceptorMethod(interceptorStack, interceptorType))
            {
                localcc = manager.createCreationalContext(null);
               
                InvocationContextImpl impl = new InvocationContextImpl(null, instance, null, null,
                        InterceptorUtil.getInterceptorMethods(interceptorStack, interceptorType), interceptorType);
                impl.setCreationalContext(localcc);
               
View Full Code Here

            if(interceptor == null)
            {
                BeanManagerImpl manager = BeanManagerImpl.getManager();
               
                WebBeansInterceptor<Object> actualInterceptor = (WebBeansInterceptor<Object>)this.webBeansInterceptor;
                CreationalContext<Object> creationalContext = manager.createCreationalContext(actualInterceptor);
                interceptor = manager.getReference(actualInterceptor,actualInterceptor.getBeanClass(), creationalContext);
               
                actualInterceptor.setInjections(interceptor, creationalContext);

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

        Object object = null;
       
        List<ObserverParams> methodArgsMap = getMethodArguments(event, metadata);

        BeanManagerImpl manager = bean.getWebBeansContext().getBeanManagerImpl();
        CreationalContextImpl<Object> creationalContext = manager.createCreationalContext(component);
        if (metadata != null)
        {
            creationalContext.putInjectionPoint(metadata.getInjectionPoint());
        }
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.