class SessionManager implements Closeable {

  public void invokeCommit(RepositoryBackedSession session) {
    // Following variable is used in try/finally to measure execution time
    try (Timer.Context ctx = commitTimer.time()) { // NOSONAR
      // Commit is done in request thread.
      // It could be interesting to do it async.
      session.getCommitter().run(); // NOSONAR we use run intentionally
    } catch (Exception e) { // NOSONAR Any exception can occur here
      logger.error("Exception occured while commiting sessionId: '" + session.getId() + "'", e);
      throw e;
    }
  }

  public  SessionManager(ExecutorFacade executors, SessionFactory factory, SessionRepository repository,
      SessionTracking tracking, SessionNotifier notifier, SessionConfiguration configuration, ClassLoader classLoader);

}