BrokerStateHandler bsh = Globals.getBrokerStateHandler();
if (time == null || time.intValue() == 0) {
// stop new connections
// set the flag to notify everyone we are shutting down
BrokerStateHandler.shuttingDown = true;
bsh.prepareShutdown(failover);
}
//if we aren't doing an unsafe exit, give us time to complete any operations
waitForHandlersToComplete(20);