Package org.apache.openejb.cdi

Examples of org.apache.openejb.cdi.ConstructorInjectionBean$ConstructorInjectionTarget


                    continue;
                }

                final Class clazz = interceptorData.getInterceptorClass();

                final ConstructorInjectionBean interceptorConstructor = new ConstructorInjectionBean(webBeansContext, clazz);
                final InjectionProcessor interceptorInjector = new InjectionProcessor(interceptorConstructor.create(creationalContext), this.getInjections(), org.apache.openejb.InjectionProcessor.unwrap(ctx));
                try {
                    final Object interceptorInstance = interceptorInjector.createInstance();

                    // TODO we likely don't want to create a new one each time -- investigate the destroy() method
                    try {
View Full Code Here


    public Object inject(Object o) throws OpenEJBException {

        try {
            final WebBeansContext webBeansContext = getAppContext().getWebBeansContext();

            final ConstructorInjectionBean<Object> beanDefinition = new ConstructorInjectionBean(webBeansContext, o.getClass()).complete();

            final CreationalContext<Object> creationalContext = webBeansContext.getBeanManagerImpl().createCreationalContext(beanDefinition);

            // Create bean instance
            final Context initialContext = (Context) new InitialContext().lookup("java:");
View Full Code Here

                    continue;
                }

                final Class clazz = interceptorData.getInterceptorClass();

                final ConstructorInjectionBean interceptorConstructor = new ConstructorInjectionBean(webBeansContext, clazz);
                final InjectionProcessor interceptorInjector = new InjectionProcessor(interceptorConstructor.create(creationalContext), this.getInjections(), org.apache.openejb.InjectionProcessor.unwrap(ctx));
                try {
                    final Object interceptorInstance = interceptorInjector.createInstance();

                    // TODO we likely don't want to create a new one each time -- investigate the destroy() method
                    try {
View Full Code Here

    public Object inject(Object o) throws OpenEJBException {

        try {
            final WebBeansContext webBeansContext = getAppContext().getWebBeansContext();

            final ConstructorInjectionBean<Object> beanDefinition = new ConstructorInjectionBean(webBeansContext, o.getClass()).complete();

            final CreationalContext<Object> creationalContext = webBeansContext.getBeanManagerImpl().createCreationalContext(beanDefinition);

            // Create bean instance
            final Context initialContext = (Context) new InitialContext().lookup("java:");
View Full Code Here

                    continue;
                }

                final Class clazz = interceptorData.getInterceptorClass();

                final ConstructorInjectionBean interceptorConstructor = new ConstructorInjectionBean(webBeansContext, clazz);
                final InjectionProcessor interceptorInjector = new InjectionProcessor(interceptorConstructor.create(creationalContext), this.getInjections(), org.apache.openejb.InjectionProcessor.unwrap(ctx));
                try {
                    final Object interceptorInstance = interceptorInjector.createInstance();

                    // TODO we likely don't want to create a new one each time -- investigate the destroy() method
                    try {
View Full Code Here

                final Class clazz = interceptorData.getInterceptorClass();

                final Object iInstance;
                if (webBeansContext != null) {
                    ConstructorInjectionBean interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                    if (interceptorConstructor == null) {
                        synchronized (this) {
                            interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                            if (interceptorConstructor == null) {
                                interceptorConstructor = new ConstructorInjectionBean(webBeansContext, clazz, webBeansContext.getAnnotatedElementFactory().newAnnotatedType(clazz));
                                interceptorData.set(ConstructorInjectionBean.class, interceptorConstructor);
                            }
                        }
                    }
                    iInstance = interceptorConstructor.create(creationalContext);
                } else {
                    iInstance = clazz.newInstance();
                }

                final InjectionProcessor interceptorInjector = new InjectionProcessor(iInstance, this.getInjections(), InjectionProcessor.unwrap(ctx));
View Full Code Here

                final Class clazz = interceptorData.getInterceptorClass();

                final Object iInstance;
                if (webBeansContext != null) {
                    ConstructorInjectionBean interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                    if (interceptorConstructor == null) {
                        synchronized (this) {
                            interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                            if (interceptorConstructor == null) {
                                interceptorConstructor = new ConstructorInjectionBean(webBeansContext, clazz, webBeansContext.getAnnotatedElementFactory().newAnnotatedType(clazz));
                                interceptorData.set(ConstructorInjectionBean.class, interceptorConstructor);
                            }
                        }
                    }
                    iInstance = interceptorConstructor.create(creationalContext);
                } else {
                    iInstance = clazz.newInstance();
                }

                final InjectionProcessor interceptorInjector = new InjectionProcessor(iInstance, this.getInjections(), InjectionProcessor.unwrap(ctx));
View Full Code Here

                final Class clazz = interceptorData.getInterceptorClass();

                final Object iInstance;
                if (webBeansContext != null) {
                    ConstructorInjectionBean interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                    if (interceptorConstructor == null) {
                        synchronized (this) {
                            interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                            if (interceptorConstructor == null) {
                                interceptorConstructor = new ConstructorInjectionBean(webBeansContext, clazz, webBeansContext.getAnnotatedElementFactory().newAnnotatedType(clazz));
                                interceptorData.set(ConstructorInjectionBean.class, interceptorConstructor);
                            }
                        }
                    }
                    iInstance = interceptorConstructor.create(creationalContext);
                } else {
                    iInstance = clazz.newInstance();
                }

                final InjectionProcessor interceptorInjector = new InjectionProcessor(iInstance, this.getInjections(), InjectionProcessor.unwrap(ctx));
View Full Code Here

                final Class clazz = interceptorData.getInterceptorClass();

                final Object iInstance;
                if (webBeansContext != null) {
                    ConstructorInjectionBean interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                    if (interceptorConstructor == null) {
                        synchronized (this) {
                            interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                            if (interceptorConstructor == null) {
                                interceptorConstructor = new ConstructorInjectionBean(webBeansContext, clazz, webBeansContext.getAnnotatedElementFactory().newAnnotatedType(clazz));
                                interceptorData.set(ConstructorInjectionBean.class, interceptorConstructor);
                            }
                        }
                    }
                    iInstance = interceptorConstructor.create(creationalContext);
                } else {
                    iInstance = clazz.newInstance();
                }

                final InjectionProcessor interceptorInjector = new InjectionProcessor(iInstance, this.getInjections(), InjectionProcessor.unwrap(ctx));
View Full Code Here

                final Class clazz = interceptorData.getInterceptorClass();

                final Object iInstance;
                if (webBeansContext != null) {
                    ConstructorInjectionBean interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                    if (interceptorConstructor == null) {
                        synchronized (this) {
                            interceptorConstructor = interceptorData.get(ConstructorInjectionBean.class);
                            if (interceptorConstructor == null) {
                                interceptorConstructor = new ConstructorInjectionBean(webBeansContext, clazz, webBeansContext.getAnnotatedElementFactory().newAnnotatedType(clazz));
                                interceptorData.set(ConstructorInjectionBean.class, interceptorConstructor);
                            }
                        }
                    }
                    iInstance = interceptorConstructor.create(creationalContext);
                } else {
                    iInstance = clazz.newInstance();
                }

                final InjectionProcessor interceptorInjector = new InjectionProcessor(iInstance, this.getInjections(), org.apache.openejb.InjectionProcessor.unwrap(ctx));
View Full Code Here

TOP

Related Classes of org.apache.openejb.cdi.ConstructorInjectionBean$ConstructorInjectionTarget

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.