Package org.springframework.jms.core

Examples of org.springframework.jms.core.JmsTemplate.receiveAndConvert()


            return null;
        }
        LOGGER.info("waiting {}ms for response on call with id {}", timeout, callId);
        JmsTemplate createJMSTemplate = createJMSTemplate(destination);
        createJMSTemplate.setReceiveTimeout(timeout);
        Object receiveAndConvert = createJMSTemplate.receiveAndConvert(callId);
        if (receiveAndConvert == null) {
            throw new RuntimeException("JMS Receive Timeout reached");
        }
        LOGGER.info("response for call with id {} received", callId);
        return (String) receiveAndConvert;
View Full Code Here


    ConnectionFactory connectionFactory =
        new ActiveMQConnectionFactory("vm://localhost");
    JmsTemplate jmsTemplate = new JmsTemplate(connectionFactory);
    jmsTemplate.setDefaultDestination(new ActiveMQQueue("siia.queue"));
    jmsTemplate.convertAndSend("hello world");
    System.out.println("received: " + jmsTemplate.receiveAndConvert());
  }
}
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.