Results 1 to 2 of 2

Thread: Failover switch back

  1. #1
    Join Date
    Mar 2010
    Posts
    1

    Question Failover switch back

    Hello all,

    I have configured multiple LDAP servers as per reference documentation 8.1.1. LDAP Server URLs. I can confirm that if the first server crashes the application starts using successfully the next servers.

    However I would need the application to switch back to using the first server in the list when it comes available, even though the other servers would be also working. For instance attempt using the first server once in 30 seconds and move back to using that one when it comes back around.

    How should I go around to implement this?

  2. #2
    Join Date
    Jul 2005
    Location
    Helsingborg, Sweden
    Posts
    504

    Default

    If the connection is not pooled, or pooled with a very short timeout (~2 secs), then the ContextSource will be asked for a new connection and it will always start with the first server in the list. So my guess is that this will work out-of-the-box for you.

    If you're using the Spring LDAP pooling support, you should be able to configure various validation strategies, like when you're borrowing a connection from the pool, when you're returning it, and also regularly checking connections sitting idle in the pool.

    The important thing is that nothing hangs on to an invalid connection. Then you should be all right.
    Ulrik Sandberg
    Jayway (www.jayway.com)
    Spring LDAP project member

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •