Package org.jboss.weld.bean.builtin

Examples of org.jboss.weld.bean.builtin.BeanManagerProxy


        beanManager = null;
    }

    @Override
    public BeanManager getValue() throws IllegalStateException, IllegalArgumentException {
        return new BeanManagerProxy(beanManager);
    }
View Full Code Here


public class WeldProvider implements CDIProvider {

    private static final ConcurrentMap<Container, CdiImpl> containers = new ConcurrentHashMap<>();

    static void containerInitialized(Container container, BeanManagerImpl rootBeanManager, WeldDeployment deployment) {
        containers.put(container, new WeldProvider.CdiImpl(container, new BeanManagerProxy(rootBeanManager), deployment));
    }
View Full Code Here

            final ClassLoader tccl = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
            final Class<?> callerClass = Reflections.loadClass(callerName, tccl);
            if (callerClass != null) {
                final BeanDeploymentArchive bda = deployment.getBeanDeploymentArchive(callerClass);
                if (bda != null) {
                    return new BeanManagerProxy(container.beanDeploymentArchives().get(bda));
                }
            }
            // fallback for cases when we are unable to load the class or no BeanManager exists yet for the given BDA
            return rootBeanManager;
        }
View Full Code Here

                elContext, expectedParams);
    }

    public ELContext createELContext(BeanManager beanManager) {
        if (beanManager instanceof BeanManagerProxy) {
            BeanManagerProxy proxy = (BeanManagerProxy) beanManager;
            beanManager = proxy.delegate();
        }
        if (beanManager instanceof BeanManagerImpl) {
            return createELContext((BeanManagerImpl) beanManager);
        } else {
            throw new IllegalStateException("Wrong manager");
View Full Code Here

        event.addAnnotatedType(bar);
    }

    protected <T> EnhancedAnnotatedType<T> getEnhancedAnnotatedType(BeanManager manager, Class<T> javaClass) {
        if (manager instanceof BeanManagerProxy) {
            BeanManagerProxy proxy = (BeanManagerProxy) manager;
            manager = proxy.delegate();
        }
        if (manager instanceof BeanManagerImpl) {
            BeanManagerImpl bmi = (BeanManagerImpl) manager;
            return ((BeanManagerImpl) manager).createEnhancedAnnotatedType(javaClass);
        } else {
View Full Code Here

        /**
         * Determines the correct {@link BeanManagerImpl} based on a class name of the caller.
         */
        @Override
        public BeanManagerProxy apply(String callerClassName) {
            return new BeanManagerProxy(findBeanManager(callerClassName));
        }
View Full Code Here

TOP

Related Classes of org.jboss.weld.bean.builtin.BeanManagerProxy

Copyright © 2018 www.massapicom. 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.