Package org.apache.cxf.transport.jms

Examples of org.apache.cxf.transport.jms.JMSConduit


        JMSOldConfigHolder old = new JMSOldConfigHolder();
        JMSConfiguration jmsConf = old.createJMSConfigurationFromEndpointInfo(bus,
                                                                              endpointInfo,
                                                                              target,
                                                                              true);
        return new JMSConduit(endpointInfo, target, jmsConf, bus);
    }
View Full Code Here


            + "&messageType=text"
            + "&jndiConnectionFactoryName=ConnectionFactory"
            + "&jndiURL=" + BROKER_URI;
        ei.setAddress(address);
        JMSConfiguration jmsConfig = holder.createJMSConfigurationFromEndpointInfo(bus, ei , null, true);
        JMSConduit conduit = new JMSConduit(target, jmsConfig, bus);
        Exchange exchange = new ExchangeImpl();
        exchange.setSynchronous(synchronous);
        Message message = new MessageImpl();
        exchange.setOutMessage(message);
        conduit.sendExchange(exchange, "Request");
        waitForAsyncReply(exchange);
        receiver.close();
        if (exchange.getInMessage() == null) {
            throw new RuntimeException("No reply received within 2 seconds");
        }
        JMSMessageHeadersType inHeaders = (JMSMessageHeadersType)exchange.getInMessage()
            .get(JMSConstants.JMS_CLIENT_RESPONSE_HEADERS);
        Assert.assertEquals(receiver.getRequestMessageId(), inHeaders.getJMSCorrelationID());
        conduit.close();
        bus.shutdown(true);
    }
View Full Code Here

        EndpointInfo ei = new EndpointInfo();
        ei.setAddress(address);
        Bus bus = BusFactory.getDefaultBus();
        JMSConfiguration jmsConfig = JMSConfigFactory.createFromEndpointInfo(bus, ei, null);
        jmsConfig.setConnectionFactory(cf);
        JMSConduit conduit = new JMSConduit(new EndpointReferenceType(), jmsConfig, bus);

        Exchange exchange = new ExchangeImpl();
        exchange.setSynchronous(syncType == SyncType.sync);
        Message message = new MessageImpl();
        exchange.setOutMessage(message);
        conduit.sendExchange(exchange, "Request");

        waitForAsyncReply(exchange);
        receiver.close();
        if (exchange.getInMessage() == null) {
            throw new RuntimeException("No reply received within 2 seconds");
        }
        JMSMessageHeadersType inHeaders = (JMSMessageHeadersType)exchange.getInMessage()
            .get(JMSConstants.JMS_CLIENT_RESPONSE_HEADERS);
        Assert.assertEquals(receiver.getRequestMessageId(), inHeaders.getJMSCorrelationID());
        conduit.close();
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.transport.jms.JMSConduit

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.