Ejemplo n.º 1
0
 public int getQueueSize() {
   if (queue == null) {
     logger.warn(
         new InitialisationException(
             MessageFactory.createStaticMessage("Queue not created for service " + name), this));
     return -1;
   }
   return queue.size();
 }
Ejemplo n.º 2
0
 protected void doStop() throws MuleException {
   if (queue != null && queue.size() > 0) {
     try {
       stopping.whenFalse(null);
     } catch (InterruptedException e) {
       // we can ignore this
       // TODO MULE-863: Why?
     }
   }
   workManager.dispose();
 }
Ejemplo n.º 3
0
 public int getQueueSize() {
   QueueSession session = muleContext.getQueueManager().getQueueSession();
   Queue queue = session.getQueue(name);
   if (queue == null) {
     logger.warn(
         new InitialisationException(
             MessageFactory.createStaticMessage(
                 "Queue " + name + " not created for service " + name),
             this));
     return -1;
   }
   return queue.size();
 }
Ejemplo n.º 4
0
 protected void doConnect() throws Exception {
   if (connector.isQueueEvents()) {
     // Ensure we can create a vm queue
     QueueSession queueSession = connector.getQueueSession();
     Queue q = queueSession.getQueue(endpoint.getEndpointURI().getAddress());
     if (logger.isDebugEnabled()) {
       logger.debug(
           "Current queue depth for queue: "
               + endpoint.getEndpointURI().getAddress()
               + " is: "
               + q.size());
     }
   }
 }