*/
protected synchronized JackrabbitSecurityManager getSecurityManager()
throws RepositoryException {
if (securityMgr == null) {
SecurityManagerConfig smc = getConfig().getSecurityConfig().getSecurityManagerConfig();
String workspaceName = getConfig().getDefaultWorkspaceName();
if (smc != null && smc.getWorkspaceName() != null) {
workspaceName = smc.getWorkspaceName();
}
SystemSession securitySession = getSystemSession(workspaceName);
// mark system session as 'active' for that the system workspace does
// not get disposed by workspace-janitor
onSessionCreated(securitySession);
if (smc == null) {
log.debug("No configuration entry for SecurityManager. Using org.apache.jackrabbit.core.security.simple.SimpleSecurityManager");
securityMgr = new SimpleSecurityManager();
} else {
securityMgr = smc.newInstance(JackrabbitSecurityManager.class);
}
securityMgr.init(this, securitySession);
log.info("SecurityManager = " + securityMgr.getClass());
}