TextMessage m2 = (TextMessage)cons.receive(1000);
assertNotNull(m2);
assertEquals(m.getText(), m2.getText());
SimpleMessageReference ref = (SimpleMessageReference)store.reference(((MessageProxy)m2).getMessage().getMessageID());
assertEquals(2, ref.getInMemoryChannelCount());
assertEquals(((MessageProxy)m).getMessage().getMessageID(), ref.getMessage().getMessageID());
ref.releaseMemoryReference();
sess.commit();
ref = (SimpleMessageReference)store.reference(((MessageProxy)m2).getMessage().getMessageID());
assertNull(ref);