mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge of BRANCHES/DEV/4.2_ENT_DEV/ADMIN_CONSOLE2 - Admin Console 46775:47636
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@47742 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -72,9 +72,9 @@ public class SubsystemChainingAuthenticationComponent extends AbstractChainingAu
|
||||
List<AuthenticationComponent> result = new LinkedList<AuthenticationComponent>();
|
||||
for (String instance : this.applicationContextManager.getInstanceIds())
|
||||
{
|
||||
ApplicationContext context = this.applicationContextManager.getApplicationContext(instance);
|
||||
try
|
||||
{
|
||||
ApplicationContext context = this.applicationContextManager.getApplicationContext(instance);
|
||||
AuthenticationComponent authenticationComponent = (AuthenticationComponent) context
|
||||
.getBean(sourceBeanName);
|
||||
// Only add active authentication components. E.g. we might have an ldap context that is only used for
|
||||
@@ -85,9 +85,9 @@ public class SubsystemChainingAuthenticationComponent extends AbstractChainingAu
|
||||
result.add(authenticationComponent);
|
||||
}
|
||||
}
|
||||
catch (NoSuchBeanDefinitionException e)
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
// Ignore and continue
|
||||
// The bean doesn't exist or this subsystem won't start. The reason would have been logged. Ignore and continue.
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@@ -30,7 +30,6 @@ import org.alfresco.repo.management.subsystems.ChildApplicationContextManager;
|
||||
import org.alfresco.repo.security.authentication.AbstractChainingAuthenticationService;
|
||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
import org.alfresco.service.cmr.security.MutableAuthenticationService;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
/**
|
||||
@@ -94,7 +93,16 @@ public class SubsystemChainingAuthenticationService extends AbstractChainingAuth
|
||||
|
||||
for (String instance : this.instanceIds)
|
||||
{
|
||||
ApplicationContext newContext = this.applicationContextManager.getApplicationContext(instance);
|
||||
ApplicationContext newContext;
|
||||
try
|
||||
{
|
||||
newContext = this.applicationContextManager.getApplicationContext(instance);
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
// This subsystem won't start. The reason would have been logged. Ignore and continue.
|
||||
newContext = null;
|
||||
}
|
||||
ApplicationContext context = this.contexts.get(instance);
|
||||
if (context != newContext)
|
||||
{
|
||||
@@ -104,14 +112,16 @@ public class SubsystemChainingAuthenticationService extends AbstractChainingAuth
|
||||
this.lock.writeLock().lock();
|
||||
haveWriteLock = true;
|
||||
}
|
||||
newContext = this.applicationContextManager.getApplicationContext(instance);
|
||||
this.contexts.put(instance, newContext);
|
||||
try
|
||||
{
|
||||
newContext = this.applicationContextManager.getApplicationContext(instance);
|
||||
this.contexts.put(instance, newContext);
|
||||
this.sourceBeans.put(instance, newContext.getBean(this.sourceBeanName));
|
||||
}
|
||||
catch (NoSuchBeanDefinitionException e)
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
// This subsystem won't start or the bean doesn't exist. The reason would have been logged. Ignore and continue.
|
||||
this.contexts.remove(instance);
|
||||
this.sourceBeans.remove(instance);
|
||||
}
|
||||
}
|
||||
@@ -178,8 +188,9 @@ public class SubsystemChainingAuthenticationService extends AbstractChainingAuth
|
||||
AuthenticationService authenticationService = (AuthenticationService) this.sourceBeans.get(instance);
|
||||
// Only add active authentication components. E.g. we might have an ldap context that is only used for
|
||||
// synchronizing
|
||||
if (!(authenticationService instanceof ActivateableBean)
|
||||
|| ((ActivateableBean) authenticationService).isActive())
|
||||
if (authenticationService != null
|
||||
&& (!(authenticationService instanceof ActivateableBean) || ((ActivateableBean) authenticationService)
|
||||
.isActive()))
|
||||
{
|
||||
|
||||
result.add(authenticationService);
|
||||
|
Reference in New Issue
Block a user