public static void destroyConnections(Set destroyConns, int reason, String reasonstr) {
ConnectionManager cm = Globals.getConnectionManager();
Iterator cnitr = destroyConns.iterator();
while (cnitr.hasNext()) {
IMQBasicConnection conn = (IMQBasicConnection)cm.getConnection(
(ConnectionUID)cnitr.next());
if (conn == null) continue;
Globals.getLogger().log(Logger.INFO,
"Destroying connection " + conn + " because "+reasonstr);
if (DEBUG) conn.dump();
conn.destroyConnection(true, reason, reasonstr);
conn.waitForRelease(Globals.getConfig().getLongProperty(
Globals.IMQ+"."+conn.getService().getName()+".destroy_timeout", 30)*1000);
}
}