docs: void terminate( boolean removeFromActiveSession ) {
          if (!isLive()) {
              return;
          }
  
          isLive = false;
  
          JcrObservationManager jcrObservationManager = observationManager();
          if (jcrObservationManager != null) {
              jcrObservationManager.removeAllEventListeners();
          }
  
          cleanLocks();
          if (removeFromActiveSession) this.repository.runningState().removeSession(this);
          this.context.getSecurityContext().logout();
      }