public int getQueueSize() { if (queue == null) { logger.warn( new InitialisationException( MessageFactory.createStaticMessage("Queue not created for service " + name), this)); return -1; } return queue.size(); }
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(); }
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(); }
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()); } } }