@Test public void testCorrelationIdMessage_AdaptrisMessage() throws Exception { EmbeddedActiveMq broker = new EmbeddedActiveMq(); JmsConnection conn = broker.getJmsConnection(); try { broker.start(); LifecycleHelper.initAndStart(conn, false); Session session = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); AdaptrisMessage adpMsg = AdaptrisMessageFactory.getDefaultInstance().newMessage("hello"); String originalId = adpMsg.getUniqueId(); TextMessage jmsMsg = session.createTextMessage(); jmsMsg.setJMSCorrelationID(testName.getMethodName()); MessageIdCorrelationIdSource cs = new MessageIdCorrelationIdSource(); cs.processCorrelationId(jmsMsg, adpMsg); assertNotSame(originalId, adpMsg.getUniqueId()); assertEquals(adpMsg.getUniqueId(), jmsMsg.getJMSCorrelationID()); assertEquals(testName.getMethodName(), adpMsg.getUniqueId()); session.close(); } finally { LifecycleHelper.stopAndClose(conn, false); broker.destroy(); } }
@Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); }
MessageIdCorrelationIdSource implements CorrelationIdSource { @Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); } }
MessageIdCorrelationIdSource implements CorrelationIdSource { @Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); }  }
MessageIdCorrelationIdSource implements CorrelationIdSource { @Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); }  @Override void processCorrelationId(AdaptrisMessage src, Message dest); @Override void processCorrelationId(Message src, AdaptrisMessage dest); }
MessageIdCorrelationIdSource implements CorrelationIdSource { @Override public void processCorrelationId(AdaptrisMessage src, Message dest) throws JMSException { dest.setJMSCorrelationID(src.getUniqueId()); }  @Override void processCorrelationId(AdaptrisMessage src, Message dest); @Override void processCorrelationId(Message src, AdaptrisMessage dest);  }