for(JChannel ch: topics.values())
Util.close(ch);
}
private static JChannel createSharedChannel(String singleton_name, String props) throws Exception {
ProtocolStackConfigurator config=ConfiguratorFactory.getStackConfigurator(props);
List<ProtocolConfiguration> protocols=config.getProtocolStack();
ProtocolConfiguration transport=protocols.get(0);
transport.getProperties().put(Global.SINGLETON_NAME, singleton_name);
return new JChannel(config);
}