Package org.apache.webbeans.container

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


        Set<Bean<?>> beans = resolveBeans();

        BeanManagerImpl beanManager = webBeansContext.getBeanManagerImpl();

        Bean<?> bean = beanManager.resolve(beans);

        if (bean == null)
        {
            InjectionExceptionUtil.throwUnsatisfiedResolutionException(ClassUtil.getClazz(injectionClazz), injectionPoint, anns);
        }
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;
                        }
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);
View Full Code Here

        final Bean<?> bean;
        final BeanManagerImpl bm = webbeansContext.getBeanManagerImpl();
        if (bm.isInUse()) {
            try {
                final Set<Bean<?>> beans = bm.getBeans(clazz);
                bean = bm.resolve(beans);
            } catch (InjectionException ie) {
                final String msg = "Resource class " + constructor.getDeclaringClass().getName() + " can not be instantiated";
                throw new WebApplicationException(Response.serverError().entity(msg).build());
            }
View Full Code Here

        Set<Bean<?>> beans = resolveBeans();

        BeanManagerImpl beanManager = webBeansContext.getBeanManagerImpl();

        Bean<?> bean = beanManager.resolve(beans);

        if (bean == null)
        {
            InjectionExceptionUtil.throwUnsatisfiedResolutionException(ClassUtil.getClazz(injectionClazz), injectionPoint, anns);
        }
View Full Code Here

        Set<Bean<?>> beans = resolveBeans();

        BeanManagerImpl beanManager = webBeansContext.getBeanManagerImpl();

        Bean<?> bean = beanManager.resolve(beans);

        if (bean == null)
        {
            InjectionExceptionUtil.throwUnsatisfiedResolutionException(ClassUtil.getClazz(injectionClazz), injectionPoint, anns);
        }
View Full Code Here

        final BeanManagerImpl bm = ctx.getWebBeansContext().getBeanManagerImpl();
        if (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);
                }
                AbstractInjectable.instanceUnderInjection.set(testInstance);
View Full Code Here

        anns = qualifierAnnotations.toArray(anns);
       
        Set<Bean<?>> beans = resolveBeans();

        BeanManagerImpl beanManager = webBeansContext.getBeanManagerImpl();
        Bean<?> bean = beanManager.resolve(beans);
           
        if (bean == null)
        {
            InjectionExceptionUtils.throwUnsatisfiedResolutionException(ClassUtil.getClazz(injectionClazz), (InjectionPoint) null, anns);
        }
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.