if (log.isTraceEnabled()) log.trace("attempting to remove receiver " + this + " from destination " + channel);
if (trace) log.trace("attempting to remove receiver " + this + " from destination " + channel);
   void remove() throws JMSException   {      if (log.isTraceEnabled()) 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();      }            this.sessionEndpoint.connectionEndpoint.consumers.remove(id);            if (this.channel instanceof CoreSubscription)      {         ((CoreSubscription)channel).closeConsumer();      }            this.sessionEndpoint.consumers.remove(this.id);   }  