private Session getLocalSession(Tenant tenant, long sessionId) {
        Session session = tenant.getSessionRepository().getLocalSession(sessionId);
        if (session == null) throw new NotFoundException("Local session " + sessionId + " for '" + tenant.getName() + "' was not found");

        return session;
    }
Gets the active Session for the given application id.

@return the active session, or null if there is no active session for the given application id.
configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java