Examples of ResourceInjector


Examples of com.sun.xml.internal.ws.api.server.ResourceInjector

            return r;
        }
    }

    protected static ResourceInjector getResourceInjector(WSEndpoint endpoint) {
        ResourceInjector ri = endpoint.getContainer().getSPI(ResourceInjector.class);
        if(ri==null)
            ri = ResourceInjector.STANDALONE;
        return ri;
    }
View Full Code Here

Examples of com.sun.xml.ws.api.server.ResourceInjector

    public void dispose() {
        resolver.dispose();
    }
   
    private ResourceInjector getResourceInjector(WSEndpoint endpoint) {
        ResourceInjector ri = endpoint.getContainer().getSPI(ResourceInjector.class);
        if(ri==null)
            ri = ResourceInjector.STANDALONE;
        return ri;
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.server.endpoint.injection.ResourceInjector

    public void testInjectionOnField(){
        Object serviceInstance = new ResourceInjectionTestImpl1();
        TestLogger.logger.debug("------------------------------");
        TestLogger.logger.debug("Test : " + getName());
        try{
            ResourceInjector injector = ResourceInjectionFactory.createResourceInjector(WebServiceContext.class);
            injector.inject(resource, serviceInstance);
            ResourceInjectionTestImpl1 serviceImpl =(ResourceInjectionTestImpl1)serviceInstance;
            assertNotNull(serviceImpl.ctx);
            TestLogger.logger.debug("Resource Injected on Field");
            TestLogger.logger.debug("------------------------------");
        }catch(Exception e){
View Full Code Here

Examples of org.apache.axis2.jaxws.server.endpoint.injection.ResourceInjector

    public void testInjectionOnMethod(){
        Object serviceInstance = new ResourceInjectionTestImpl2();
        TestLogger.logger.debug("------------------------------");
        TestLogger.logger.debug("Test : " + getName());
        try{
            ResourceInjector injector = ResourceInjectionFactory.createResourceInjector(WebServiceContext.class);
            injector.inject(resource, serviceInstance);
            ResourceInjectionTestImpl2 serviceImpl =(ResourceInjectionTestImpl2)serviceInstance;
            assertNotNull(serviceImpl.ctx);
            TestLogger.logger.debug("Resource Injected on Method");
            TestLogger.logger.debug("------------------------------");
        }catch(Exception e){
View Full Code Here

Examples of org.apache.axis2.jaxws.server.endpoint.injection.ResourceInjector

    public void testInjectionOnPrivateField(){
        Object serviceInstance = new ResourceInjectionTestImpl3();
        TestLogger.logger.debug("------------------------------");
        TestLogger.logger.debug("Test : " + getName());
        try{
            ResourceInjector injector = ResourceInjectionFactory.createResourceInjector(WebServiceContext.class);
            injector.inject(resource, serviceInstance);
            ResourceInjectionTestImpl3 serviceImpl =(ResourceInjectionTestImpl3)serviceInstance;
            assertNotNull(serviceImpl.getCtx());
            TestLogger.logger.debug("Resource Injected on Private Field");
            TestLogger.logger.debug("------------------------------");
        }catch(Exception e){
View Full Code Here

Examples of org.apache.axis2.jaxws.server.endpoint.injection.ResourceInjector

    public void testInjectionOnProvateMethod(){
        Object serviceInstance = new ResourceInjectionTestImpl4();
        TestLogger.logger.debug("------------------------------");
        TestLogger.logger.debug("Test : " + getName());
        try{
            ResourceInjector injector = ResourceInjectionFactory.createResourceInjector(WebServiceContext.class);
            injector.inject(resource, serviceInstance);
            ResourceInjectionTestImpl4 serviceImpl =(ResourceInjectionTestImpl4)serviceInstance;
            assertNotNull(serviceImpl.getCtx());
            TestLogger.logger.debug("Resource Injected using private Method");
            TestLogger.logger.debug("------------------------------");
        }catch(Exception e){
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

       
        // 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
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.