throw new JBossJMSException("Failed to cancel delivery", t);
throw new MessagingJMSException("Failed to cancel delivery", t);
   void remove() throws JMSException   {      if (trace) log.trace("attempting to remove receiver " + this + " from destination " + channel);            for(Iterator i = deliveries.values().iterator(); i.hasNext(); )      {         SingleReceiverDelivery d = (SingleReceiverDelivery)i.next();         try         {            d.cancel();         }         catch(Throwable t)         {            throw new JBossJMSException("Failed to cancel delivery", t);         }      }      deliveries.clear();            if (!disconnected)      {         close();      }            sessionEndpoint.getConnectionEndpoint().         getServerPeer().removeConsumerEndpoint(new Integer(id));            if (this.channel instanceof CoreSubscription)      {         ((CoreSubscription)channel).closeConsumer();      }            sessionEndpoint.removeConsumerEndpoint(id);   }  