Package javax.enterprise.inject.spi

Examples of javax.enterprise.inject.spi.BeanManager.resolve()


        BeanManager bm = cc.getBeanManager();
        Assert.assertNotNull(bm);

        Set<Bean<?>> beans = bm.getBeans(CarRepair.class);
        Bean<?> bean = bm.resolve(beans);

        CarRepair carRepair = (CarRepair) bm.getReference(bean, CarRepair.class, bm.createCreationalContext(bean));
        Assert.assertNotNull(carRepair);

        Assert.assertNotNull(carRepair.getCar());
View Full Code Here


        BeanManager beanManager = cdiContainer.getBeanManager();
        Assert.assertNotNull(beanManager);

        Set<Bean<?>> beans = beanManager.getBeans(CarRepair.class);
        Bean<?> bean = beanManager.resolve(beans);

        CarRepair carRepair = (CarRepair)
            beanManager.getReference(bean, CarRepair.class, beanManager.createCreationalContext(bean));

        Assert.assertNotNull(carRepair);
View Full Code Here

        // now do some randmo stuff
        BeanManager beanManager = cdiContainer.getBeanManager();
        Assert.assertNotNull(beanManager);

        Set<Bean<?>> beans = beanManager.getBeans(CarRepair.class);
        Bean<?> bean = beanManager.resolve(beans);

        CarRepair carRepair = (CarRepair)
                beanManager.getReference(bean, CarRepair.class, beanManager.createCreationalContext(bean));

        Assert.assertNotNull(carRepair);
View Full Code Here

                        "If the container wasn't started already, you have to use CdiContainer#boot before.");

                return null;
            }
            Set<Bean<?>> beans = beanManager.getBeans(ContextControl.class);
            ctxCtrlBean = (Bean<ContextControl>) beanManager.resolve(beans);

            ctxCtrlCreationalContext = getBeanManager()
                    .createCreationalContext(ctxCtrlBean);

            ctxCtrl = (ContextControl)
View Full Code Here

                    "If the container wasn't started already, you have to use CdiContainer#boot before.");

            return null;
        }
        Set<Bean<?>> beans = beanManager.getBeans(ContextControl.class);
        Bean<ContextControl> depCtxCtrlBean = (Bean<ContextControl>) beanManager.resolve(beans);

        CreationalContext<ContextControl> depCtxCtrlCreationalContext = getBeanManager()
                .createCreationalContext(ctxCtrlBean);

        return (ContextControl)
View Full Code Here

                        "If the container wasn't started already, you have to use CdiContainer#boot before.");

                return null;
            }
            Set<Bean<?>> beans = beanManager.getBeans(ContextControl.class);
            ctxCtrlBean = (Bean<ContextControl>) beanManager.resolve(beans);
            ctxCtrlCreationalContext = getBeanManager().createCreationalContext(ctxCtrlBean);
            ctxCtrl = (ContextControl)
                    getBeanManager().getReference(ctxCtrlBean, ContextControl.class, ctxCtrlCreationalContext);
        }
        return ctxCtrl;
View Full Code Here

                    "If the container wasn't started already, you have to use CdiContainer#boot before.");

            return null;
        }
        Set<Bean<?>> beans = beanManager.getBeans(ContextControl.class);
        Bean<ContextControl> depCtxCtrlBean = (Bean<ContextControl>) beanManager.resolve(beans);

        CreationalContext<ContextControl> depCtxCtrlCreationalContext = getBeanManager()
                .createCreationalContext(ctxCtrlBean);

        return (ContextControl)
View Full Code Here

                        "If the container wasn't started already, you have to use CdiContainer#boot before.");

                return null;
            }
            Set<Bean<?>> beans = beanManager.getBeans(ContextControl.class);
            ctxCtrlBean = (Bean<ContextControl>) beanManager.resolve(beans);

            ctxCtrlCreationalContext = getBeanManager().createCreationalContext(ctxCtrlBean);

            ctxCtrl = (ContextControl)
                    getBeanManager().getReference(ctxCtrlBean, ContextControl.class, ctxCtrlCreationalContext);
View Full Code Here

                    "If the container wasn't started already, you have to use CdiContainer#boot before.");

            return null;
        }
        Set<Bean<?>> beans = beanManager.getBeans(ContextControl.class);
        Bean<ContextControl> depCtxCtrlBean = (Bean<ContextControl>) beanManager.resolve(beans);

        CreationalContext<ContextControl> depCtxCtrlCreationalContext = getBeanManager()
                .createCreationalContext(ctxCtrlBean);

        return (ContextControl)
View Full Code Here

        if (beanManager == null)
        {
            return null;
        }
        Set<Bean<?>> beans = beanManager.getBeans(RequestScopedBean.class);
        Bean<RequestScopedBean> reqScpdBean = (Bean<RequestScopedBean>) beanManager.resolve(beans);

        CreationalContext<RequestScopedBean> reqScpdCC =
                beanManager.createCreationalContext(reqScpdBean);

        RequestScopedBean instance = (RequestScopedBean)
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.