WeakReference ref = (WeakReference)messageRefs.get(messageID); MessageReference mref = ref == null ? null : (MessageReference)ref.get();
MessageHolder holder = (MessageHolder)messages.get(messageID);  MessageReference mref = holder == null ? null : holder.ref;
   public MessageReference getReference(Serializable messageID)   {      WeakReference ref = (WeakReference)messageRefs.get(messageID);      MessageReference mref = ref == null ? null : (MessageReference)ref.get();      if (log.isTraceEnabled()) { log.trace("getting reference for message ID: " + messageID + " from memory, returning " + mref);}      return mref;   }