@Test public void testAdaptrisMessageWithPayloadToMessage() throws Exception { EmbeddedActiveMq broker = new EmbeddedActiveMq(); MessageTypeTranslatorImp trans = this.createTranslator(); try { broker.start(); Session session = broker.createConnection().createSession(false, Session.CLIENT_ACKNOWLEDGE); start(trans, session); AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(TEXT); addMetadata(msg); Message jmsMsg = trans.translate(msg); assertFalse("jmsMsg instanceof TextMessage", jmsMsg instanceof TextMessage); assertFalse("jmsMsg instanceof BytesMessage", jmsMsg instanceof BytesMessage); assertFalse("jmsMsg instanceof MapMessage", jmsMsg instanceof MapMessage); assertFalse("jmsMsg instanceof ObjectMessage", jmsMsg instanceof ObjectMessage); assertFalse("jmsMsg instanceof StreamMessage", jmsMsg instanceof StreamMessage); assertTrue("jmsMsg instanceof Message", jmsMsg instanceof Message); assertJmsProperties(jmsMsg); } finally { stop(trans); broker.destroy(); } }
@Override public Message translate(AdaptrisMessage msg) throws JMSException { Message message = session.createMessage(); helper.moveMetadata(msg, message); return message; }
BasicJavaxJmsMessageTranslator extends MessageTypeTranslatorImp { @Override public Message translate(AdaptrisMessage msg) throws JMSException { Message message = session.createMessage(); helper.moveMetadata(msg, message); return message; } }
BasicJavaxJmsMessageTranslator extends MessageTypeTranslatorImp { @Override public Message translate(AdaptrisMessage msg) throws JMSException { Message message = session.createMessage(); helper.moveMetadata(msg, message); return message; } BasicJavaxJmsMessageTranslator(); }
BasicJavaxJmsMessageTranslator extends MessageTypeTranslatorImp { @Override public Message translate(AdaptrisMessage msg) throws JMSException { Message message = session.createMessage(); helper.moveMetadata(msg, message); return message; } BasicJavaxJmsMessageTranslator(); @Override Message translate(AdaptrisMessage msg); @Override AdaptrisMessage translate(Message msg); }
BasicJavaxJmsMessageTranslator extends MessageTypeTranslatorImp { @Override public Message translate(AdaptrisMessage msg) throws JMSException { Message message = session.createMessage(); helper.moveMetadata(msg, message); return message; } BasicJavaxJmsMessageTranslator(); @Override Message translate(AdaptrisMessage msg); @Override AdaptrisMessage translate(Message msg);  }