boolean relaxedLocking = getRelaxedLocking(attributes);
RefreshStrategy refreshStrategy = createRefreshStrategy(refreshInterval);
ContentSession contentSession = contentRepository.login(credentials, workspaceName);
SessionDelegate sessionDelegate = createSessionDelegate(refreshStrategy, contentSession);
SessionContext context = createSessionContext(
statisticManager, securityProvider,
createAttributes(refreshInterval, relaxedLocking),
sessionDelegate, observationQueueLength, commitRateLimiter);
return context.getSession();
} catch (LoginException e) {
throw new javax.jcr.LoginException(e.getMessage(), e);
}
}