private synchronized boolean pollStatsBroker(Destination queue){
  statsMessageListener.setDestination(queue);
  Timestamp timestamp=new Timestamp(System.currentTimeMillis());
  LOGGER.debug("Setting the destination to " + getQueueName(queue) + " at "+ timestamp);
  jmsTemplate.execute(STATS_BROKER_DESTINATION + getQueueName(queue),new ProducerCallbackImpl(statsQueue));
  try {
    Thread.sleep(3 * 1000);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  return statsMessageListener.getStats() != null;
}

private synchronized boolean pollStatsBroker ( Destination queue ) { statsMessageListener . setDestination ( queue ) ; Timestamp timestamp = new Timestamp ( System . currentTimeMillis ( ) ) ; LOGGER . debug ( "Setting the destination to " + getQueueName ( queue ) + " at " + timestamp ) ; jmsTemplate . execute ( STATS_BROKER_DESTINATION + getQueueName ( queue ) , new ProducerCallbackImpl ( statsQueue ) ) ; try { Thread . sleep ( 3 * 1000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } return statsMessageListener . getStats ( ) != null ; }
poll the statistics broker plugin
