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
This commit is contained in:
Olivier Lamy 2012-12-11 00:01:34 +00:00
parent 6b3886bb1c
commit 242c7794eb
1 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,8 @@ package org.apache.archiva.rest.services;
import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.admin.model.beans.ArchivaRuntimeConfiguration; import org.apache.archiva.admin.model.beans.ArchivaRuntimeConfiguration;
import org.apache.archiva.admin.model.runtime.ArchivaRuntimeConfigurationAdmin; 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.redback.users.UserManager;
import org.apache.archiva.rest.api.model.UserManagerImplementationInformation; import org.apache.archiva.rest.api.model.UserManagerImplementationInformation;
import org.apache.archiva.rest.api.services.ArchivaRestServiceException; import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
@ -55,6 +57,10 @@ public class DefaultArchivaRuntimeConfigurationService
@Inject @Inject
private ApplicationContext applicationContext; private ApplicationContext applicationContext;
@Inject
@Named( value = "ldapConnectionFactory#configurable" )
private LdapConnectionFactory ldapConnectionFactory;
public ArchivaRuntimeConfiguration getArchivaRuntimeConfigurationAdmin() public ArchivaRuntimeConfiguration getArchivaRuntimeConfigurationAdmin()
throws ArchivaRestServiceException throws ArchivaRestServiceException
{ {
@ -126,6 +132,8 @@ public class DefaultArchivaRuntimeConfigurationService
} }
} }
ldapConnectionFactory.initialize();
return informations; return informations;
} }
} }