Package org.apache.webbeans.container

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


                //Get observer parameter instance
                @SuppressWarnings("unchecked")
                Bean<Object> injectedBean = (Bean<Object>)getWebBeansContext().getBeanManagerImpl().getInjectionResolver().getInjectionPointBean(point);
               
                CreationalContextImpl<Object> creational = manager.createCreationalContext(injectedBean);
                creational.putInjectionPoint(metadata.getInjectionPoint());
                creational.putInjectionPoint(point);
                Object instance;
                try
                {
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);
        }
        if (!(creationalContext instanceof CreationalContextImpl))
        {
            creationalContext = webBeansContext.getCreationalContextFactory().wrappedCreationalContext(creationalContext, bean);
        }
View Full Code Here

                if (bm != null && bm.isInUse()) {
                    try {
                        final Set<Bean<?>> beans = bm.getBeans(clazz);
                        if (beans != null && !beans.isEmpty()) {
                            final Bean<?> bean = bm.resolve(beans);
                            final CreationalContextImpl<?> creationalContext = bm.createCreationalContext(bean);
                            instances.add(bm.getReference(bean, clazz, creationalContext));
                            toRelease.add(creationalContext);
                            continue;
                        }
                    } catch (final Throwable th) {
View Full Code Here

        final BeanManagerImpl bm = findBeanManager(ctx);
        if (bm != null && bm.isInUse()) {
            try {
                final Set<Bean<?>> beans = bm.getBeans(testInstance.getClass());
                final Bean<?> bean = bm.resolve(beans);
                final CreationalContext<?> cc = bm.createCreationalContext(bean);
                if (context != null) {
                    context.set(CreationalContext.class, cc);
                }
                OWBInjector.inject(bm, testInstance, cc);
            } catch (Throwable t) {
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);
        }
        if (!(creationalContext instanceof CreationalContextImpl))
        {
            creationalContext = webBeansContext.getCreationalContextFactory().wrappedCreationalContext(creationalContext, bean);
        }
View Full Code Here

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

                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

        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

                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

                        {
                            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

                    {
                        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.