public void destroyQueue(final SimpleString queueName, final ServerSession session, final boolean checkConsumerCount, final boolean removeConsumers) throws Exception { addressSettingsRepository.clearCache(); Binding binding = postOffice.getBinding(queueName); if (binding == null) { throw HornetQMessageBundle.BUNDLE.noSuchQueue(queueName); } Queue queue = (Queue) binding.getBindable(); // This check is only valid if checkConsumerCount == true if (checkConsumerCount && queue.getConsumerCount() != 0) { throw HornetQMessageBundle.BUNDLE.cannotDeleteQueue(queue.getName(), queueName, binding.getClass().getName()); } if (session != null) { if (queue.isDurable()) { // make sure the user has privileges to delete this queue securityStore.check(binding.getAddress(), CheckType.DELETE_DURABLE_QUEUE, session); } else { securityStore.check(binding.getAddress(), CheckType.DELETE_NON_DURABLE_QUEUE, session); } } queue.deleteQueue(removeConsumers); }
public void destroyQueue(final SimpleString queueName, final ServerSession session) throws Exception addressSettingsRepository.clearCache();
addressSettingsRepository.clearCache(); if (identity != null)
addressSettingsRepository.clearCache();
public synchronized Binding removeBinding(final SimpleString uniqueName) throws Exception addressSettingsRepository.clearCache();
public synchronized Binding removeBinding(final SimpleString uniqueName, Transaction tx) throws Exception addressSettingsRepository.clearCache();