Set<ActiveMQDestination> inactiveDests = getInactiveDestinations();
for (Iterator<ActiveMQDestination> iter = inactiveDests.iterator(); iter.hasNext();) {
ActiveMQDestination dest = iter.next();
ConnectionContext context = new ConnectionContext();
context.setBroker(broker.getBrokerService().getBroker());
context.setSecurityContext(SecurityContext.BROKER_SECURITY_CONTEXT);
context.getBroker().addDestination(context, dest);
}
synchronized (destinationsMutex) {
for (Iterator<Destination> i = destinations.values().iterator(); i.hasNext();) {
Destination dest = i.next();
dest.start();