Package org.apache.webbeans.container

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


            }
            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

           
            //Found?
            if(beans != null && !beans.isEmpty())
            {
                bean = (Bean<Object>)beans.iterator().next();
                creationalContext = manager.createCreationalContext(bean);                   
                //Already registered in store
                if(bean.getScope().equals(Dependent.class))
                {
                    object = store.getDependent(bean);
                }                   
View Full Code Here

    public String echo()
    {
        BeanManagerImpl manager = BeanManagerImpl.getManager();
        Bean<?> b = manager.getBeans("injected").iterator().next();
        InjectionTargetBean bean = (InjectionTargetBean)manager.getReference(b, InjectionTargetBean.class, manager.createCreationalContext(b));
       
        System.out.println("EMF --> " + bean.getFactory().equals(this.emf));
       
        //Call for contextual
        this.text = echo.echo(name);
View Full Code Here

    public String echo()
    {
        BeanManagerImpl manager = BeanManagerImpl.getManager();
        Bean<?> b = manager.getBeans("injected").iterator().next();
        InjectionTargetBean bean = (InjectionTargetBean)manager.getReference(b, InjectionTargetBean.class, manager.createCreationalContext(b));
       
        System.out.println("EMF --> " + bean.getFactory().equals(this.emf));
       
        this.text = echo.echo(name);
       
View Full Code Here

            Set<Bean<?>> beans = manager.getBeans(name);
           
            if(beans != null && !beans.isEmpty())
            {
                bean = (Bean<Object>)beans.iterator().next();
                creationalContext = manager.createCreationalContext(bean);                   
               
                if(bean.getScope().equals(Dependent.class))
                {
                    if(canBe)
                    {
View Full Code Here

            {
                BeanManagerImpl manager = BeanManagerImpl.getManager();
                specializedComponent = (AbstractOwbBean<Object>)WebBeansUtil.getMostSpecializedBean(manager, baseComponent);       
                Context context = manager.getContext(specializedComponent.getScope());
               
                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

                    if (bindingTypes.length > 0)
                    {
                        InjectionPoint point = InjectionPointFactory.getPartialInjectionPoint(null, type, null, null, bindingTypes);
                        @SuppressWarnings("unchecked")
                        Bean<Object> bean = (Bean<Object>)InjectionResolver.getInstance().getInjectionPointBean(point);
                        CreationalContext<Object> creational = manager.createCreationalContext(bean);
                        Object instance = manager.getInstance(bean, creational);
                       
                        param = new ObserverParams();
                        param.isBean = true;
                        param.creational = creational;
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 (final Throwable t) {
View Full Code Here

                    try {
                        final Set<Bean<?>> beans = bm.getBeans(handler.getHandlerClass());
                        final Bean<?> bean = bm.resolve(beans);
                        if (bean != null) { // proxy so faster to do it
                            final boolean normalScoped = bm.isNormalScope(bean.getScope());
                            final CreationalContextImpl<?> creationalContext = bm.createCreationalContext(bean);
                            final Handler instance = Handler.class.cast(bm.getReference(bean, bean.getBeanClass(), creationalContext));

                            // hack for destroyHandlers()
                            handlers.add(instance);
                            handlerInstances.add(new InjectionProcessor<Handler>(instance, Collections.<Injection>emptySet(), null) {
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.