eprElement.setAttribute("driver", getDbDriver());
eprElement.setAttribute("username", getDbUser());
eprElement.setAttribute("password", getDbPassword());
final List<ManagedLifecycle> instances = LifecycleUtil.getListeners(newTree) ;
final ManagedLifecycleController controller = new ManagedLifecycleController(instances) ;
controller.start() ;
_logger.debug(" All child listeners ready");
// JUST FOR THIS TEST:
// Give your listener some time to process queued messages (see howMany
// above)
// Time allowed, and maxThreads in config file will impact how many
// messages
// will be processed, and how many will remain unprocessed
for (int count = 0 ; count < howMany ; count++)
{
final String response = getMessage(10000) ;
assertNotNull("getMessage timeout", response) ;
assertEquals(THE_TEXT, response);
}
_logger.debug("going to stop");
controller.stop();
_logger.debug("back from stop");
}