ref.acquireReference();
   public void load() throws Exception   {      List refs = pm.messageRefs(storeID, channelID);            Set ids = new HashSet();            Iterator iter = refs.iterator();      while (iter.hasNext())      {         String messageID = (String)iter.next();                  MessageReference ref = messageStore.getReference(messageID);                  messageRefs.addLast(ref, ref.getPriority());                  ref.acquireReference();                  ids.add(messageID);               }            //Important note. When we reload deliveries we load them as MessageReferences,      //*not* as Delivery instances.      //This is because, after recovery, it is not possible that those Delivery instances      //can be acknowledged, since the receivers no longer exist.      //Therefore by loading the Deliveries as MessageReferences we are effectively      //cancelling them                        List dels = pm.deliveries(storeID, channelID);      iter = dels.iterator();      while (iter.hasNext())      {         String messageID = (String)iter.next();                  if (ids.add(messageID))         {            MessageReference ref = messageStore.getReference(messageID);                        messageRefs.addFirst(ref, ref.getPriority());                        ref.acquireReference();         }      }         }