SEC-1732: Embedded LDAP Server (ApacheDSContainer) Doesn't Import Multiple LDIF Files As Advertised #1969

Closed
spring-issuemaster opened this Issue Apr 29, 2011 · 3 comments

1 participant

@spring-issuemaster

Mark Rohan (Migrated from SEC-1732) said:

When including multiple comma separated LDIF file resources, the ApacheDSContainer class is not looping over the LDIF file array and importing each one. Rather, it is only importing the first file in the array.

@spring-issuemaster

Luke Taylor said:

I've implemented looping over resources. However, the syntax supported is a Spring resource string, not comma-separated values.

If you are using multiple LDIF files then they need to be loaded in the correct order, and that isn't guaranteed if you are using classpath resources. So I'd recommend you stick to a single file. The current documentation only refers to a single resource unless you don't specify a value, in which case it scans the classpath.

@spring-issuemaster

Luke Taylor said:

I think this is actually a bad idea as the behaviour may be different on different VMs or Spring versions. I'd prefer a fail-fast option if more than one resource is located using the supplied pattern.

@spring-issuemaster

Luke Taylor said:

Reverted the original commit and the code now raises an IllegalArgumentException if multiple resources are found.

@spring-issuemaster spring-issuemaster added this to the 3.1.0.RC3 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment