Examples of HandlerChains


Examples of org.apache.openejb.jee.HandlerChains

                    portComponent.setProtocolBinding(JaxWsUtils.getBindingUriFromAnn(ejbClass));
                }

                // handlers
                if (portComponent.getHandlerChains() == null) {
                    HandlerChains handlerChains = getHandlerChains(ejbClass, sessionBean.getServiceEndpoint(), ejbModule.getClassLoader());
                    portComponent.setHandlerChains(handlerChains);

                }
            } else {
                // todo location JAX-RPC services comes from wsdl file
View Full Code Here

Examples of org.apache.openejb.jee.HandlerChains

                declaringClass = classLoader.loadClass(serviceEndpoint);
                handlerChain = declaringClass.getAnnotation(HandlerChain.class);
            } catch (ClassNotFoundException ignored) {
            }
        }
        HandlerChains handlerChains = null;
        if (handlerChain != null) {
            try {
                URL handlerFileURL = declaringClass.getResource(handlerChain.file());
                handlerChains = ReadDescriptors.readHandlerChains(handlerFileURL);
            } catch (Throwable e) {
View Full Code Here

Examples of org.apache.openejb.jee.HandlerChains

    public void setUp() throws Exception {
        new Assembler();
    }
   
    public void testBasic() throws Exception {
        HandlerChains handlerChains = readHandlerChains("/handlers.xml");
        assertEquals(3, handlerChains.getHandlerChain().size());

        List<HandlerChainInfo> handlerChainInfos = ConfigurationFactory.toHandlerChainInfo(handlerChains);
        List<HandlerChainData> handlerChainDatas = WsBuilder.toHandlerChainData(handlerChainInfos, getClass().getClassLoader());
        HandlerResolverImpl resolver = new HandlerResolverImpl(handlerChainDatas, null, new InitialContext());
View Full Code Here

Examples of org.apache.openejb.jee.HandlerChains

        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, null));
        assertEquals(3, handlers.size());
    }

    public void testServiceMatching() throws Exception {
        HandlerChains handlerChains = readHandlerChains("/handlers_service.xml");
        assertEquals(3, handlerChains.getHandlerChain().size());

        List<HandlerChainInfo> handlerChainInfos = ConfigurationFactory.toHandlerChainInfo(handlerChains);
        List<HandlerChainData> handlerChainDatas = WsBuilder.toHandlerChainData(handlerChainInfos, getClass().getClassLoader());
        HandlerResolverImpl resolver = new HandlerResolverImpl(handlerChainDatas, null, new InitialContext());
View Full Code Here

Examples of org.apache.openejb.jee.HandlerChains

        handlers = resolver.getHandlerChain(new TestPortInfo(null, null, serviceName4));
        assertEquals(0, handlers.size());
    }

    public void testBindingMatching() throws Exception {
        HandlerChains handlerChains = readHandlerChains("/handlers_bindings.xml");
        assertEquals(3, handlerChains.getHandlerChain().size());

        List<HandlerChainInfo> handlerChainInfos = ConfigurationFactory.toHandlerChainInfo(handlerChains);
        List<HandlerChainData> handlerChainDatas = WsBuilder.toHandlerChainData(handlerChainInfos, getClass().getClassLoader());
        HandlerResolverImpl resolver = new HandlerResolverImpl(handlerChainDatas, null, new InitialContext());
View Full Code Here

Examples of org.apache.openejb.jee.HandlerChains

        handlers = resolver.getHandlerChain(new TestPortInfo("##SOAP11_HTTP_MTOM", null, null));
        assertEquals(1, handlers.size());
    }

    public void testPortMatching() throws Exception {
        HandlerChains handlerChains = readHandlerChains("/handlers_port.xml");
        assertEquals(3, handlerChains.getHandlerChain().size());

        List<HandlerChainInfo> handlerChainInfos = ConfigurationFactory.toHandlerChainInfo(handlerChains);
        List<HandlerChainData> handlerChainDatas = WsBuilder.toHandlerChainData(handlerChainInfos, getClass().getClassLoader());
        HandlerResolverImpl resolver = new HandlerResolverImpl(handlerChainDatas, null, new InitialContext());
View Full Code Here

Examples of org.apache.openejb.jee.HandlerChains

        handlers = resolver.getHandlerChain(new TestPortInfo(null, portName4, null));
        assertEquals(0, handlers.size());
    }

    public void testMixedMatching() throws Exception {
        HandlerChains handlerChains = readHandlerChains("/handlers_mixed.xml");
        assertEquals(3, handlerChains.getHandlerChain().size());

        List<HandlerChainInfo> handlerChainInfos = ConfigurationFactory.toHandlerChainInfo(handlerChains);
        List<HandlerChainData> handlerChainDatas = WsBuilder.toHandlerChainData(handlerChainInfos, getClass().getClassLoader());
        HandlerResolverImpl resolver = new HandlerResolverImpl(handlerChainDatas, null, new InitialContext());
View Full Code Here

Examples of org.apache.openejb.jee.HandlerChains

    }

    private HandlerChains readHandlerChains(String filePath) throws Exception {
        URL url = getClass().getResource(filePath);
        assertNotNull("Could not find handler chains file " + filePath, url);
        HandlerChains handlerChains = ReadDescriptors.readHandlerChains(url);
        return handlerChains;
    }
View Full Code Here

Examples of org.apache.openejb.jee.HandlerChains

            // handlers
            if (serviceRef.getHandlerChains() == null && handlerChain != null) {
                try {
                    URL handlerFileURL = member.getDeclaringClass().getResource(handlerChain.file());
                    HandlerChains handlerChains = ReadDescriptors.readHandlerChains(handlerFileURL);
                    serviceRef.setHandlerChains(handlerChains);
                } catch (Throwable e) {
                    throw new OpenEJBException("Unable to load handler chain file: " + handlerChain.file(), e);
                }
            }
View Full Code Here

Examples of org.apache.openejb.jee.HandlerChains

            final Set<Class<?>> handlerClasses = new HashSet<Class<?>>();
            do {
                // get unprocessed handler classes
                handlerClasses.clear();
                for (ServiceRef serviceRef : consumer.getServiceRef()) {
                    HandlerChains chains = serviceRef.getAllHandlers();
                    if (chains == null) continue;
                    for (org.apache.openejb.jee.HandlerChain handlerChain : chains.getHandlerChain()) {
                        for (Handler handler : handlerChain.getHandler()) {
                            if (handler.getHandlerClass() != null) {
                                try {
                                    Class clazz = classLoader.loadClass(handler.getHandlerClass());
                                    handlerClasses.add(clazz);
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.