if (log.isTraceEnabled()){ log.trace("Added state"); }
   private Delivery handleNoTx(DeliveryObserver sender, Routable r)   {      checkClosed();      if (r == null)      {         return null;      }      Set deliveries = router.handle(this, r);      if (deliveries.isEmpty())      {         // no receivers, receivers that don't accept the message or broken receivers         try         {            state.add(r);         }         catch(Throwable t)         {            // this channel cannot safely hold a reliable message, so it doesn't accept it            log.error("Cannot handle the message", t);            return null;         }      }      else      {         // there are receivers         Transaction crtTx = null;         try         {            crtTx = tm.suspend();            tm.begin();            for (Iterator i = deliveries.iterator(); i.hasNext(); )            {               Delivery d = (Delivery)i.next();               if (!d.isDone())               {                  state.add(d);               }            }            tm.commit();         }         catch(Throwable t)         {            log.error(this + " cannot manage delivery, passing responsibility to the sender", t);            try            {               tm.rollback();            }            catch(SystemException e)            {               log.error(this + " failed to rollback state transaction", e);            }            // cannot manage this delivery, pass the responsibility to the sender            // cannot split delivery, because in case of crash, the message must be recoverable            // from one and only one channel            // TODO this is untested            return new CompositeDelivery(sender, deliveries);         }         finally         {            if (crtTx != null)            {               try               {                  tm.resume(crtTx);               }               catch(Exception e)               {                  String msg = this + " failed to resume existing transaction " + crtTx;                  log.error(msg, e);                  throw new IllegalStateException(msg);               }            }         }      }      // the channel can safely assume responsibility for delivery      return new SimpleDelivery(true);   }