Package org.apache.webbeans.container

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


        {
            startContainer(Collections.<Class<?>> emptyList());
            final BeanManagerImpl manager = WebBeansContext.getInstance().getBeanManagerImpl();
            AnnotatedType<CustomTarget> annotatedType = manager.createAnnotatedType(CustomTarget.class);
            InjectionTarget<CustomTarget> injectionTarget = manager.createInjectionTarget(annotatedType);
            CreationalContext<CustomTarget> context = manager.createCreationalContext(null);
            try
            {
                injectionTarget.produce(context);
            }
            catch (Exception e)
View Full Code Here


        CustomTarget instance = null;
        try
        {
            startContainer(Collections.<Class<?>> emptyList());
            manager = WebBeansContext.getInstance().getBeanManagerImpl();
            context = manager.createCreationalContext(null);
            AnnotatedType<CustomTarget> annotatedType = manager.createAnnotatedType(CustomTarget.class);
            InjectionTarget<CustomTarget> injectionTarget = manager.createInjectionTarget(annotatedType);
            try
            {
                instance = new CustomTarget("Hiho");
View Full Code Here

            }
            Bean<?> simulatedStatelessEjbBean = beansIterator.next();

            return (X)beanManager.getReference(simulatedStatelessEjbBean,
                                               resourceType,
                                               beanManager.createCreationalContext(simulatedStatelessEjbBean));
        }
    }
}
View Full Code Here

            return clazz.newInstance();
        }

        final AnnotatedType<T> annotatedType = beanManager.createAnnotatedType(clazz);
        final InjectionTarget<T> it = beanManager.createInjectionTarget(annotatedType);
        final CreationalContext<T> context = beanManager.createCreationalContext(null);
        final T instance = it.produce(context);
        it.inject(instance, context);
        it.postConstruct(instance);

        config.releasables.add(new Releasable<T>(context, it, instance));
View Full Code Here

        Object object = null;
       
        List<ObserverParams> methodArgsMap = getMethodArguments(event, metadata);
       
        BeanManagerImpl manager = bean.getWebBeansContext().getBeanManagerImpl();
        CreationalContextImpl<Object> creationalContext = manager.createCreationalContext(component);
        if (metadata != null)
        {
            creationalContext.putInjectionPoint(metadata.getInjectionPoint());
            creationalContext.putEventMetadata(metadata);
        }
View Full Code Here

        for (InjectionPoint injectionPoint: injectionPoints)
        {
            Bean<Object> injectedBean = (Bean<Object>)manager.getInjectionResolver().getInjectionPointBean(injectionPoint);
           
            CreationalContextImpl<Object> creational = manager.createCreationalContext(injectedBean);
            creational.putInjectionPoint(metadata.getInjectionPoint());
            creational.putInjectionPoint(injectionPoint);
            creational.putEventMetadata(metadata);
            Object instance;
            try
View Full Code Here

        Object object = null;
       
        List<ObserverParams> methodArgsMap = getMethodArguments(event, metadata);
       
        BeanManagerImpl manager = bean.getWebBeansContext().getBeanManagerImpl();
        CreationalContextImpl<Object> creationalContext = manager.createCreationalContext(component);
        if (metadata != null)
        {
            creationalContext.putInjectionPoint(metadata.getInjectionPoint());
            creationalContext.putEventMetadata(metadata);
        }
View Full Code Here

        for (InjectionPoint injectionPoint: injectionPoints)
        {
            Bean<Object> injectedBean = (Bean<Object>)manager.getInjectionResolver().getInjectionPointBean(injectionPoint);
           
            CreationalContextImpl<Object> creational = manager.createCreationalContext(injectedBean);
            creational.putInjectionPoint(metadata.getInjectionPoint());
            creational.putInjectionPoint(injectionPoint);
            creational.putEventMetadata(metadata);
            Object instance;
            try
View Full Code Here

        Object object = null;
       
        List<ObserverParams> methodArgsMap = getMethodArguments(event, metadata);
       
        BeanManagerImpl manager = bean.getWebBeansContext().getBeanManagerImpl();
        CreationalContextImpl<Object> creationalContext = manager.createCreationalContext(component);
        if (metadata != null)
        {
            creationalContext.putInjectionPoint(metadata.getInjectionPoint());
            creationalContext.putEventMetadata(metadata);
        }
View Full Code Here

        for (InjectionPoint injectionPoint: injectionPoints)
        {
            Bean<Object> injectedBean = (Bean<Object>)manager.getInjectionResolver().getInjectionPointBean(injectionPoint);
           
            CreationalContextImpl<Object> creational = manager.createCreationalContext(injectedBean);
            creational.putInjectionPoint(metadata.getInjectionPoint());
            creational.putInjectionPoint(injectionPoint);
            creational.putEventMetadata(metadata);
            Object instance;
            try
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.