Examples of toMessage()


Examples of org.springframework.jms.support.converter.SimpleMessageConverter.toMessage()

    given(session.createObjectMessage(content)).willReturn(message);
    given(message.getObject()).willReturn(content);

    SimpleMessageConverter converter = new SimpleMessageConverter();
    Message msg = converter.toMessage(content, session);
    assertEquals(content, converter.fromMessage(msg));
  }

  @Test(expected=MessageConversionException.class)
  public void testToMessageThrowsExceptionIfGivenNullObjectToConvert() throws Exception {
View Full Code Here

Examples of org.springframework.jms.support.converter.SimpleMessageConverter.toMessage()

    Session session = mock(Session.class);
    ObjectMessage message = mock(ObjectMessage.class);

    SimpleMessageConverter converter = new SimpleMessageConverter();
    Message msg = converter.toMessage(message, session);
    assertSame(message, msg);
  }

  @Test
  public void testFromMessageSimplyReturnsMessageAsIsIfSuppliedWithMessage() throws JMSException {
View Full Code Here

Examples of org.springframework.jms.support.converter.SimpleMessageConverter102.toMessage()

        messageControl.setReturnValue(5000 - SimpleMessageConverter102.BUFFER_SIZE, 1);
        sessionControl.replay();
        messageControl.replay();

        SimpleMessageConverter102 converter = new SimpleMessageConverter102();
        Message msg = converter.toMessage(content, session);
        assertEquals(content.length, ((byte[]) converter.fromMessage(msg)).length);

        sessionControl.verify();
        messageControl.verify();
    }
View Full Code Here

Examples of org.xmlBlaster.client.XmlDbMessageWrapper.toMessage()

      String queryStr = glob.getProperty().get("query", "select * from intrauser");

      wrap.init(type, limit, confirm, queryStr);

      try {
         con.publish(wrap.toMessage());
         log.info("Published query ...");
         if (log.isLoggable(Level.FINEST)) log.finest(wrap.toXml());
      }
      catch (Exception e) { log.severe(e.getMessage()); }

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.