destinations.put(destination, dest);
destinationMap.put(destination, dest);
addSubscriptionsForDestination(context, dest);
}
if (dest == null) {
throw new DestinationDoesNotExistException(destination.getQualifiedName());
}
}
return dest;
} finally {
destinationsLock.writeLock().unlock();