Пример #1
0
  public final synchronized void dispose() {
    // TODO lifecycleManager.checkPhase(Disposable.PHASE_NAME);

    if (isDisposed()) {
      return;
    }

    try {
      doDispose();
      lifecycleManager.firePhase(getManagementContext(), Disposable.PHASE_NAME);
      if (getParent() != null) {
        parent.dispose();
      } else {
        // remove this referenceonce there is no one else left to dispose
        RegistryContext.setRegistry(null);
      }
    } catch (UMOException e) {
      // TO-DO
      logger.error("Failed to cleanly dispose: " + e.getMessage(), e);
    }
  }