catch(Throwable t) {  log.error("The receiver " + receiver + " is broken", t); }  incPos();    if (pos == firstPos) { break; }
} catch(Throwable t) {  log.error("The receiver " + receiver + " is broken", t); }  incPos();   if (pos == firstPos) { break;
   public Set handle(DeliveryObserver observer, Routable routable, Transaction tx)   {      Set deliveries = new HashSet();            boolean selectorRejected = false;            synchronized(receivers)      {         if (receivers.isEmpty())         {            return deliveries;         }                  int firstPos = pos;                  while (true)         {            Receiver receiver = (Receiver)receivers.get(pos);                        try            {               Delivery d = receiver.handle(observer, routable, tx);               if (trace) { log.trace("receiver " + receiver + " handled " + routable + " and returned " + d); }                    if (d != null && !d.isCancelled())               {                  if (d.isSelectorAccepted())                  {                     // deliver to the first receiver that accepts                     deliveries.add(d);                                          incPos();                                          break;                  }                  else                  {                     selectorRejected = true;                  }               }            }            catch(Throwable t)            {               // broken receiver - log the exception and ignore it               log.error("The receiver " + receiver + " is broken", t);            }                        incPos();                        //If we've tried them all then we break                        if (pos == firstPos)            {               break;            }                     }      }            if (deliveries.isEmpty() && selectorRejected)      {         deliveries.add(new SimpleDelivery(null, null, true, false));      }      return deliveries;   }