We need to use multiple LDAP servers for our LDAP authentication and we need pooling support. Looking at PoolingContextSource and there is the following text in the user documentation:

"The PoolingContextSource assumes that all DirContext objects retrieved from ContextSource.getReadOnlyContext() will have the same environment and likewise that all DirContext objects retrieved from ContextSource.getReadWriteContext() will have the same environment. This means that wrapping a LdapContextSource configured with an AuthenticationSource in a PoolingContextSource will not function as expected. The pool would be populated using the credentials of the first user and unless new connections were needed subsequent context requests would not be filled for the user specified by the AuthenticationSource for the requesting thread. "

Does this mean that we need to create a different ContextSource for each server URL?

All the examples I see inject a LdapContextSource with a single URL into the PoolingContextSource. It is not clear to me what would happen if mutiple LDAP servers are used. Would a single LdapContextSource with multiple URLs work?