callOnMessage(sessionDelegate, listener, consumerID, channelID, false, mp, ackMode, maxDeliveries);
callOnMessage(sessionDelegate, listener, consumerID, channelID, false, mp, ackMode, maxDeliveries, null);
      public void run()      {                  MessageProxy mp = null;                  boolean again = false;                    synchronized (mainLock)         {            if (listener == null)            {               listenerRunning = false;               if (trace) { log.trace("no listener, returning"); }               return;            }                        // remove a message from the buffer            if (buffer.isEmpty())            {               listenerRunning = false;               if (trace) { log.trace("no messages in buffer, marking listener as not running"); }            }            else            {                              mp = (MessageProxy)buffer.removeFirst();                              if (mp == null)               {                  throw new java.lang.IllegalStateException("Cannot find message in buffer!");               }                              again = !buffer.isEmpty();                              if (!again)               {                  listenerRunning  = false;                  if (trace) { log.trace("no more messages in buffer, marking listener as not running"); }               }              }         }                                 if (mp != null)         {            try            {               callOnMessage(sessionDelegate, listener, consumerID, channelID, false, mp, ackMode, maxDeliveries);            }            catch (JMSException e)            {               log.error("Failed to deliver message", e);            }          }                  if (again)         {            // Queue it up again            queueRunner(this);         }         else         {            if (!serverSending)            {               // Ask server for more messages               try               {                  consumerDelegate.more();               }               catch (JMSException e)               {                  log.error("Failed to execute more()", e);               }               return;            }         }      }