log.warn("Failed to deliver the message to the client.");  if (trace) { log.trace("Failed to deliver message", t); }
log.warn("Failed to deliver the message to the client. See the server log for more details"); log.debug("Failed to deliver the message to the client.", t);
      public void run()      {         // Is there anything to deliver?         // This is ok outside lock - is volatile         if (clientConsumerFull)         {            // Do nothing            return;         }                  List list = null;                      synchronized (lock)         {                       if (!toDeliver.isEmpty())            {               list = new ArrayList(toDeliver);                              toDeliver.clear();                              bufferFull = false;            }         }                                                                    if (list != null)         {                     ServerConnectionEndpoint connection =               ServerConsumerEndpoint.this.sessionEndpoint.getConnectionEndpoint();            try            {               if (trace) { log.trace("handing " + list.size() + " message(s) over to the remoting layer"); }                           ClientDelivery del = new ClientDelivery(list, id);                              // TODO How can we ensure that messages for the same consumer aren't delivered               // concurrently to the same consumer on different threads?               MessagingMarshallable mm = new MessagingMarshallable(connection.getUsingVersion(), del);                              MessagingMarshallable resp = (MessagingMarshallable)connection.getCallbackClient().invoke(mm);               if (trace) { log.trace("handed messages over to the remoting layer"); }                               HandleMessageResponse result = (HandleMessageResponse)resp.getLoad();               // For now we don't look at how many messages are accepted since they all will be.               // The field is a placeholder for the future.               if (result.clientIsFull())               {                  // Stop the server sending any more messages to the client.                  // This is ok outside lock.                  clientConsumerFull = true;                      }                                           }            catch(Throwable t)            {               log.warn("Failed to deliver the message to the client.");                                            if (trace)               {                  log.trace("Failed to deliver message", t);               }                              ConnectionManager mgr = connection.getServerPeer().getConnectionManager();                              mgr.handleClientFailure(connection.getRemotingClientSessionId());            }         }                    }