Package org.apache.cxf.common.injection

Examples of org.apache.cxf.common.injection.ResourceInjector


            // Now we call the setActivationNamespaces method directly here
            if (e.getNamespaces() != null && !e.getNamespaces().isEmpty()) {
                invokeSetterActivationNSMethod(obj, e.getNamespaces());
            }
           
            ResourceInjector injector = new ResourceInjector(resourceManager);
           
            try {           
                injector.inject(obj);
                injector.construct(obj);
            } finally {
                if (null != namespacesResolver) {
                    resourceManager.removeResourceResolver(namespacesResolver);
                }
            }
View Full Code Here


            && ex.getNamespaces().contains(value);
    }
    public void destroyBeans() {
        for (Extension ex : all.values()) {
            if (ex.getLoadedObject() != null) {
                ResourceInjector injector = new ResourceInjector(resourceManager);
                injector.destroy(ex.getLoadedObject());
            }
        }       
    }
View Full Code Here

            if (!chain.isEmpty()) {
                ResourceManager resourceManager = getBus().getExtension(ResourceManager.class);
                List<ResourceResolver> resolvers = resourceManager.getResourceResolvers();
                resourceManager = new DefaultResourceManager(resolvers);
                resourceManager.addResourceResolver(new WebServiceContextResourceResolver());
                ResourceInjector injector = new ResourceInjector(resourceManager);
                for (Handler<?> h : chain) {
                    if (Proxy.isProxyClass(h.getClass()) && getServiceClass() != null) {
                        injector.inject(h, getServiceClass());
                        injector.construct(h, getServiceClass());
                    } else {
                        injector.inject(h);
                        injector.construct(h);
                    }
                }
            }

            ((JaxWsEndpointImpl)client.getEndpoint()).getJaxwsBinding().setHandlerChain(chain);
View Full Code Here

       
        // Since we need to support spring2.5 by removing @Resource("activationNamespaces")
        // Now we call the setActivationNamespaces method directly here
        invokeSetterActivationNSMethod(obj, e.getNamespaces());
       
        ResourceInjector injector = new ResourceInjector(resourceManager);
       
        try {           
            injector.inject(obj);
            injector.construct(obj);
        } finally {
            if (null != namespacesResolver) {
                resourceManager.removeResourceResolver(namespacesResolver);
            }
        }
View Full Code Here

        if (instance != null) {
            ResourceManager resourceManager = getBus().getExtension(ResourceManager.class);
            List<ResourceResolver> resolvers = resourceManager.getResourceResolvers();
            resourceManager = new DefaultResourceManager(resolvers);
            resourceManager.addResourceResolver(new WebServiceContextResourceResolver());
            ResourceInjector injector = new ResourceInjector(resourceManager);
            if (Proxy.isProxyClass(instance.getClass()) && getServiceClass() != null) {
                injector.inject(instance, getServiceClass());
                if (!blockPostConstruct) {
                    injector.construct(instance, getServiceClass());
                }
            } else {
                injector.inject(instance);
                if (!blockPostConstruct) {
                    injector.construct(instance);
                }
            }
        }
    }
View Full Code Here

            }
            return bean;
        }
        if (bean != null
            && injectable(bean, beanId)) {
            new ResourceInjector(getResourceManager(bean)).construct(bean);
        }
        return bean;
    }
View Full Code Here

        }
        */
       
        if (bean != null
            && injectable(bean, beanId)) {
            new ResourceInjector(getResourceManager(bean)).inject(bean);
            /*
            System.out.println("p :" + (++count) + ": " + bean.getClass().getName() + " " + beanId);
        } else if (bean != null) {
            System.out.println("np: " + (++count2)
                               + ": " + bean.getClass().getName() + " " + beanId);
View Full Code Here

        if (!isProcessing) {
            return;
        }
        if (bean != null
            && injectable(bean, beanId)) {
            new ResourceInjector(getResourceManager(bean)).destroy(bean);
        }
    }
View Full Code Here

            if (!chain.isEmpty()) {
                ResourceManager resourceManager = getBus().getExtension(ResourceManager.class);
                List<ResourceResolver> resolvers = resourceManager.getResourceResolvers();
                resourceManager = new DefaultResourceManager(resolvers);
                resourceManager.addResourceResolver(new WebServiceContextResourceResolver());
                ResourceInjector injector = new ResourceInjector(resourceManager);
                for (Handler<?> h : chain) {
                    if (Proxy.isProxyClass(h.getClass()) && getServiceClass() != null) {
                        injector.inject(h, getServiceClass());
                        injector.construct(h, getServiceClass());
                    } else {
                        injector.inject(h);
                        injector.construct(h);
                    }
                }
            }

            ((JaxWsEndpointImpl)client.getEndpoint()).getJaxwsBinding().setHandlerChain(chain);
View Full Code Here

            if (!chain.isEmpty()) {
                ResourceManager resourceManager = getBus().getExtension(ResourceManager.class);
                List<ResourceResolver> resolvers = resourceManager.getResourceResolvers();
                resourceManager = new DefaultResourceManager(resolvers);
                resourceManager.addResourceResolver(new WebServiceContextResourceResolver());
                ResourceInjector injector = new ResourceInjector(resourceManager);
                for (Handler<?> h : chain) {
                    if (Proxy.isProxyClass(h.getClass()) && getServiceClass() != null) {
                        injector.inject(h, getServiceClass());
                        injector.construct(h, getServiceClass());
                    } else {
                        injector.inject(h);
                        injector.construct(h);
                    }
                }
            }

            ((JaxWsEndpointImpl)client.getEndpoint()).getJaxwsBinding().setHandlerChain(chain);
View Full Code Here

TOP

Related Classes of org.apache.cxf.common.injection.ResourceInjector

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.