code: public static <T> T doWithSingleContext(ContextSource contextSource, LdapOperationsCallback<T> callback) {
          return doWithSingleContext(contextSource, callback, DONT_USE_READ_ONLY, DONT_IGNORE_PARTIAL_RESULT, DONT_IGNORE_NAME_NOT_FOUND);
  
      }
docs: Construct a SingleContextSource and execute the LdapOperationsCallback using the created instance.
  This makes sure the same connection will be used for all operations inside the LdapOperationsCallback,
  which is particularly useful when working with e.g. Paged Results as these typically require the exact
  same connection to be used for all requests involving the same cookie.
  The SingleContextSource instance will be properly disposed of once the operation has been completed.
  <p>By default, the {@link org.springframework.ldap.core.ContextSource#getReadWriteContext()} method
  will be used to create the DirContext instance to operate on.</p>
  
  @param contextSource The target ContextSource to retrieve a DirContext from.
  @param callback the callback to perform the Ldap operations.
  @return the result returned from the callback.
  @see #doWithSingleContext(org.springframework.ldap.core.ContextSource, LdapOperationsCallback, boolean, boolean, boolean)
  @since 2.0