public static void compactAllDestinations() throws BrokerException {
Iterator itr = Destination.getAllDestinations();
boolean docompact = true;
String errMsg = null;
BrokerResources rb = Globals.getBrokerResources();
Logger logger = Globals.getLogger();
while (itr.hasNext()) {
// make sure all are paused
Destination d = (Destination)itr.next();
/*
* Skip internal, admin, or temp destinations.
* Skipping temp destinations may need to be
* revisited.
*/
if (d.isInternal() || d.isAdmin() || d.isTemporary()) {
continue;
}
if (!d.isPaused()) {
docompact = false;
String msg = rb.getString(
rb.E_SOME_DESTINATIONS_NOT_PAUSED);
errMsg = rb.getString(rb.X_COMPACT_DSTS_EXCEPTION, msg);
throw (new BrokerException(errMsg));
}
}