if (state.remove(d, null)) { if (log.isTraceEnabled()) { log.trace(this + " delivery " + d + " completed and forgotten"); } d.getReference().releaseReference(); }
state.acknowledge(d);  if (log.isTraceEnabled()) { log.trace(this + " delivery " + d + " completed and forgotten"); }
   private void acknowledgeNoTx(Delivery d)   {      checkClosed();      if (log.isTraceEnabled()){ log.trace(this + " acknowledging non transactionally " + d); }      try      {         if (state.remove(d, null))         {            if (log.isTraceEnabled()) { log.trace(this + " delivery " + d + " completed and forgotten"); }            d.getReference().releaseReference();                     }      }      catch(Throwable t)      {         // a non transactional remove shouldn't throw any transaction         log.error(this + " failed to remove delivery", t);      }   }