Examples of ResourceInjector


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

            && 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

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

        if (instance != null && !blockInjection) {
            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

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

        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);
                }
            }
        }
       
        cp.getBinding().setHandlerChain(chain);
View Full Code Here

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

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

            && 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

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

            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

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

            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

Examples of org.apache.jasper.runtime.ResourceInjector

        // Instantiate and init our resource injector
        String resourceInjectorClassName = config.getInitParameter(
            Constants.JSP_RESOURCE_INJECTOR_CONTEXT_ATTRIBUTE);
        if (resourceInjectorClassName != null) {
            try {
                ResourceInjector ri = (ResourceInjector)
                    Class.forName(resourceInjectorClassName).newInstance();
                ri.setContext(this.context);
                this.context.setAttribute(
                    Constants.JSP_RESOURCE_INJECTOR_CONTEXT_ATTRIBUTE, ri);
            } catch (Exception e) {
                throw new ServletException(e);
      }
View Full Code Here

Examples of org.jboss.wsf.spi.invocation.ResourceInjector

         InvocationContext invContext = epInv.getInvocationContext();
         WebServiceContext wsContext = invContext.getAttachment(WebServiceContext.class);
         if (wsContext != null)
         {
            ResourceInjector injector = resourceInjectorFactory.newResourceInjector();
            injector.inject(targetBean, wsContext);
         }

         Method method = getImplMethod(targetBean.getClass(), epInv.getJavaMethod());
         Object retObj = method.invoke(targetBean, epInv.getArgs());
         epInv.setReturnValue(retObj);
View Full Code Here

Examples of org.jboss.wsf.spi.invocation.ResourceInjector

         InvocationContext invContext = epInv.getInvocationContext();
         WebServiceContext wsContext = invContext.getAttachment(WebServiceContext.class);
         if (wsContext != null)
         {
            ResourceInjector injector = resourceInjectorFactory.newResourceInjector();
            injector.inject(targetBean, wsContext);
         }

         Method method = getImplMethod(targetBean.getClass(), epInv.getJavaMethod());
         Object retObj = method.invoke(targetBean, epInv.getArgs());
         epInv.setReturnValue(retObj);
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.