Example usage for javax.jms MapMessage toString

List of usage examples for javax.jms MapMessage toString

Introduction

In this page you can find the example usage for javax.jms MapMessage toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:org.apache.falcon.messaging.FeedProducerTest.java

private void verifyMesssage(MessageConsumer consumer) throws JMSException {
    for (String instancePath : instancePaths) {
        // receive call is blocking
        MapMessage m = (MapMessage) consumer.receive();

        System.out.println("Received JMS message {}" + m.toString());
        System.out.println("Consumed: " + m.toString());
        assertMessage(m);/*from  w w  w  .  ja  va 2  s .c o m*/
        Assert.assertEquals(m.getString(WorkflowExecutionArgs.OUTPUT_FEED_PATHS.getName()), instancePath);
    }
}

From source file:org.apache.falcon.messaging.ProcessProducerTest.java

private void consumer() throws JMSException {
    ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(BROKER_URL);
    Connection connection = connectionFactory.createConnection();
    connection.start();// w w  w  .  j a va 2s  . c o  m

    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    Destination destination = session.createTopic(getTopicName());
    MessageConsumer consumer = session.createConsumer(destination);

    latch.countDown();

    for (int index = 0; index < outputFeedNames.length; ++index) {
        MapMessage m = (MapMessage) consumer.receive();
        System.out.println("Consumed: " + m.toString());
        assertMessage(m);
        Assert.assertEquals(m.getString(WorkflowExecutionArgs.OUTPUT_FEED_NAMES.getName()),
                outputFeedNames[index]);
        Assert.assertEquals(m.getString(WorkflowExecutionArgs.OUTPUT_FEED_PATHS.getName()),
                outputFeedPaths[index]);
    }
    connection.close();
}

From source file:org.apache.falcon.oozie.workflow.FalconPostProcessingTest.java

private void verifyMesssage(MessageConsumer consumer) throws JMSException {
    for (int index = 0; index < outputFeedPaths.length; ++index) {
        // receive call is blocking
        MapMessage m = (MapMessage) consumer.receive();

        System.out.println("Received JMS message {}" + m.toString());
        System.out.println("Consumed: " + m.toString());
        assertMessage(m);/*from  ww w  .ja  v a 2 s .c o m*/
        Assert.assertEquals(m.getString(WorkflowExecutionArgs.OUTPUT_FEED_NAMES.getName()),
                outputFeedNames[index]);
        Assert.assertEquals(m.getString(WorkflowExecutionArgs.OUTPUT_FEED_PATHS.getName()),
                outputFeedPaths[index]);
    }
}