ref = super.createReference(m);
Message m = retrieveMessage(r.getMessageID()); if (m != null) { ref = super.createReference(m); }
   public MessageReference reference(Routable r)   {      if (r.isReference())      {         if (log.isTraceEnabled()) { log.trace("Routable is already a reference"); }         return (MessageReference)r;      }            MessageReference ref = super.getReference(r.getMessageID());            if (ref != null)      {                 if (log.isTraceEnabled()) { log.trace("Retrieved it from memory cache"); }         return ref;      }            //Maybe it's on disk already?      Message m = retrieveMessage(r.getMessageID());      if (m != null)      {         ref = super.createReference(m);      }                 if (ref == null)      {         //Message doesn't exist either in memory on disc         try         {            pm.store((Message)r);            if (log.isTraceEnabled()) { log.trace("Store message " + r); }         }         catch (Exception e)         {            log.error("Failed to store message", e);            return null;         }         ref= super.createReference(r);      }      return ref;   }