code: protected Session getSession(Request request,
                                   String rawRepositoryName,
                                   String rawWorkspaceName) throws RepositoryException {
          assert request != null;
          if (ACTIVE_SESSION.get() == null) {
              Session session = getRepositoryManager().getSession(request, repositoryNameFor(rawRepositoryName), workspaceNameFor(
                      rawWorkspaceName));
              ACTIVE_SESSION.set(session);
          }
          return ACTIVE_SESSION.get();
      }
docs: Returns an active session for the given workspace name in the named repository.
  
  @param request           the servlet request; may not be null or unauthenticated
  @param rawRepositoryName the URL-encoded name of the repository in which the session is created
  @param rawWorkspaceName  the URL-encoded name of the workspace to which the session should be connected
  @return an active session with the given workspace in the named repository
  @throws javax.jcr.RepositoryException if any other error occurs