public synchronized ActiveMQMessage getMessage(MessageIdentity identity) throws JMSException {
String messageID = identity.getMessageID();
ActiveMQMessage message = null;
try {
MessageEntry entry = (MessageEntry) getMessageTable().find(messageID);
if (entry != null) {
message = entry.getMessage();
message.getJMSMessageIdentity().setSequenceNumber(identity.getSequenceNumber());
}
}
catch (IOException e) {
throw JMSExceptionHelper.newJMSException("Failed to get message for messageID: " + messageID + " " + e, e);