code: protected Session getSession()
          throws EFapsException
      {
          if (this.session == null) {
              try {
                  String username = getProperties().get(JCRStoreResource.PROPERTY_USERNAME);
                  if (username == null) {
                      username = Context.getThreadContext().getPerson().getName();
                  }
                  String passwd = getProperties().get(JCRStoreResource.PROPERTY_PASSWORD);
                  if (passwd == null) {
                      passwd = "efaps";
                  }
                  this.session = this.repository.login(new SimpleCredentials(username, passwd.toCharArray()),
                                  getProperties().get(JCRStoreResource.PROPERTY_WORKSPACENAME));
              } catch (final LoginException e) {
                  throw new EFapsException(JCRStoreResource.class, "initialize.LoginException", e);
              } catch (final NoSuchWorkspaceException e) {
                  throw new EFapsException(JCRStoreResource.class, "initialize.NoSuchWorkspaceException", e);
              } catch (final RepositoryException e) {
                  throw new EFapsException(JCRStoreResource.class, "initialize.RepositoryException", e);
              }
          }
          return this.session;
      }
docs: Gets the session for JCR access.
  
  @return the session for JCR access
  @throws EFapsException on error