{ acquireLock();
{
   void acknowledgeAll() throws JMSException   {      try      {         acquireLock();                  for(Iterator i = deliveries.iterator(); i.hasNext(); )         {            SingleReceiverDelivery d = (SingleReceiverDelivery)i.next();            d.acknowledge(null);            i.remove();                     }      }      catch(Throwable t)      {         throw new JBossJMSException("Failed to acknowledge deliveries", t);      }      finally      {         releaseLock();      }   }