go to  ForumEasy.com   
LdapPro  
 
 
   Home  |  MyForum  |  FAQ  |  Archive    You are not logged in. [Login] or [Register]  
Forum Home » Native LDAP Clients -- JDNI, ADSI, etc. » JNDI Failover behavior
Email To Friend  |   Set Alert To This Topic Rewarding Points Availabe: 0 (What's this) New Topic  |   Post Reply
Author Topic: JNDI Failover behavior
JNDI
member
offline   
 
posts: 19
joined: 05/18/2007
from: GA
  posted on: 11/02/2011 05:27:40 PM    Edit  |   Quote  |   Report 
JNDI Failover behavior
If you set the java.naming.provider.url to a list of LDAP servers:
env.put(Context.PROVIDER_URL, "ldap://server1:389/ ldap://server2:389/");

then each connection is attempted in turn until a single connection is successfully established.

The question is: What happens if the dropped connection come back:

Testing scenarios:
Stage #1:   primary server(1) is up    +  sencondary server(2) is up
Stage #2:   primary server(1) is down  +  sencondary server(2) is up
Stage #3:   primary server(1) is up    +  sencondary server(2) is up

Test results:
Stage #1:   client connection goes to the primary server(1)
Stage #2:   client connection goes to the secondary server(2)
Stage #3:   client connection goes back to the primary server(1) again.

 Profile | Reply Points Earned: 0
JNDI
member
offline   
 
posts: 19
joined: 05/18/2007
from: GA
  posted on: 11/02/2011 05:30:32 PM    Edit  |   Quote  |   Report 
JNDI Failover behavior -- with pooling mechanism on

env.put(Context.PROVIDER_URL, "ldap://server1:389/ ldap://server2:389/");
env.put("com.sun.jndi.ldap.connect.pool", "true");



Testing scenarios:
Stage #1:   primary server(1) is up    +  sencondary server(2) is up
Stage #2:   primary server(1) is down  +  sencondary server(2) is up
Stage #3:   primary server(1) is up    +  sencondary server(2) is up

Test results are the same as without pooling:
Stage #1:   client connection goes to the primary server(1)
Stage #2:   client connection goes to the secondary server(2)
Stage #3:   client connection goes back to the primary server(1) again.

 Profile | Reply Points Earned: 0

 
Powered by ForumEasy © 2003-2005, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.