for (String path : destinationRegistry.getDestinationsPaths()) {
// clean up the destination in case the destination itself can no longer access the registry later
AbstractHTTPDestination dest = destinationRegistry.getDestinationForPath(path);
synchronized (dest) {
destinationRegistry.removeDestination(path);
dest.releaseRegistry();
}
}
destinationRegistry = null;
destroyBus();
}