public void purgeQueue(ActiveMQDestination destination) throws Exception {
Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
for (Iterator i = destinations.iterator(); i.hasNext();) {
Destination dest = (Destination) i.next();
if (dest instanceof Queue) {
Queue regionQueue = (Queue) dest;
regionQueue.purge();
}
}
}