From 242c7794eb61b7106f4f6e04b295982eaabeba4e Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 11 Dec 2012 00:01:34 +0000 Subject: [PATCH] correctly reinit ldap connection factory in case of changes git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1419923 13f79535-47bb-0310-9956-ffa450edef68 --- .../DefaultArchivaRuntimeConfigurationService.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java index 5b8ce713e..d6fd3172d 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaRuntimeConfigurationService.java @@ -21,6 +21,8 @@ package org.apache.archiva.rest.services; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.beans.ArchivaRuntimeConfiguration; import org.apache.archiva.admin.model.runtime.ArchivaRuntimeConfigurationAdmin; +import org.apache.archiva.redback.common.ldap.connection.LdapConnectionConfiguration; +import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory; import org.apache.archiva.redback.users.UserManager; import org.apache.archiva.rest.api.model.UserManagerImplementationInformation; import org.apache.archiva.rest.api.services.ArchivaRestServiceException; @@ -55,6 +57,10 @@ public class DefaultArchivaRuntimeConfigurationService @Inject private ApplicationContext applicationContext; + @Inject + @Named( value = "ldapConnectionFactory#configurable" ) + private LdapConnectionFactory ldapConnectionFactory; + public ArchivaRuntimeConfiguration getArchivaRuntimeConfigurationAdmin() throws ArchivaRestServiceException { @@ -126,6 +132,8 @@ public class DefaultArchivaRuntimeConfigurationService } } + ldapConnectionFactory.initialize(); + return informations; } }