* @throws RepositoryException
*/
private AccessControlProvider getAccessControlProvider(String workspaceName)
throws NoSuchWorkspaceException, RepositoryException {
checkInitialized();
AccessControlProvider provider = acProviders.get(workspaceName);
if (provider == null || !provider.isLive()) {
SystemSession systemSession = repository.getSystemSession(workspaceName);
// mark this session as 'active' so the workspace does not get disposed
// by the workspace-janitor until the garbage collector is done
// TODO: review again... this workaround is now used in several places.
repository.onSessionCreated(systemSession);