@DELETE public void deleteQueue(@Context UriInfo uriInfo) throws Exception { ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); queueDestinationsResource.getQueues().remove(destination); stop(); ClientSession session = serviceManager.getSessionFactory().createSession(false, false, false); try { SimpleString queueName = new SimpleString(destination); session.deleteQueue(queueName); } finally { try { session.close(); } catch (Exception ignored) { } } }
@DELETE public void deleteQueue(@Context UriInfo uriInfo) throws Exception { ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); queueDestinationsResource.getQueues().remove(destination); stop(); ClientSession session = serviceManager.getSessionFactory().createSession(false, false, false); try { SimpleString queueName = new SimpleString(destination); session.deleteQueue(queueName); } finally { try { session.close(); } catch (Exception ignored) { } } }
@DELETE public void deleteTopic(@Context UriInfo uriInfo) throws Exception { ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); topicDestinationsResource.getTopics().remove(destination); try { stop(); } catch (Exception ignored) { } ClientSession session = serviceManager.getSessionFactory().createSession(false, false, false); try { SimpleString topicName = new SimpleString(destination); session.deleteQueue(topicName); } finally { try { session.close(); } catch (Exception ignored) { } } }
@DELETE public void deleteTopic(@Context UriInfo uriInfo) throws Exception { ActiveMQRestLogger.LOGGER.debug("Handling DELETE request for \"" + uriInfo.getPath() + "\""); topicDestinationsResource.getTopics().remove(destination); try { stop(); } catch (Exception ignored) { } ClientSession session = serviceManager.getSessionFactory().createSession(false, false, false); try { SimpleString topicName = new SimpleString(destination); session.deleteQueue(topicName); } finally { try { session.close(); } catch (Exception ignored) { } } }