コード例 #1
0
 private void run() {
   try {
     if (HornetQServerLogger.LOGGER.isDebugEnabled()) {
       HornetQServerLogger.LOGGER.debug("deleting temporary queue " + bindingName);
     }
     try {
       server.destroyQueue(bindingName, null, false);
     } catch (HornetQException e) {
       // that's fine.. it can happen due to queue already been deleted
       HornetQServerLogger.LOGGER.debug(e.getMessage(), e);
     }
   } catch (Exception e) {
     HornetQServerLogger.LOGGER.errorRemovingTempQueue(e, bindingName);
   }
 }
コード例 #2
0
ファイル: ServerSessionImpl.java プロジェクト: mto/hornetq
  public void deleteQueue(final SimpleString name) throws Exception {
    Binding binding = postOffice.getBinding(name);

    if (binding == null || binding.getType() != BindingType.LOCAL_QUEUE) {
      throw new NonExistentQueueException();
    }

    server.destroyQueue(name, this);

    TempQueueCleanerUpper cleaner = this.tempQueueCleannerUppers.remove(name);

    if (cleaner != null) {
      remotingConnection.removeCloseListener(cleaner);

      remotingConnection.removeFailureListener(cleaner);
    }
  }