[Date Prev][Date Next] [Chronological] [Thread] [Top]

com.novell.ldap.connectionpool.PoolManager unable to rebind existing available connections upon LDAP server failure (ITS#3327)



Full_Name: Pushkar Varma
Version: N/A
OS: Windows XP / AIX / Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (129.33.1.37)


Using JLDAP
-----------
Scenario:  
   Java client (WebSphere Application server application) uses 

com.novell.ldap.connectionpool.PoolManager.getBoundConnection(..) to obtain a
connection Conn1 using 

credential pair DN1/PW1.  Upon LDAP server failure (in this case - IBM Directory
Server 4.1), and restart, 

Conn1 is NOT able to rebind to the server - the server throws a LDAPException or
a hanging condition occurs.

Problem Analysis:
  The com.novell.ldap.connectionpool.PoolManager class keeps 2 lists of
connections: 
1. inUseListOfSharedConnections --> Valid connections per DN/PW pair 
2. availableListOfSharedConnections --> Valid connections per DN/PW pair

The PoolManager class 
1. Does NOT rebind a valid inUse shared connection, and assumes that the
underlying physical connection is 

OK, which it may not be due to an LDAP server failure.
2. Does NOT rebind a valid available shared connection 
3. Only rebinds a newly available shared connection - - since needToBind=true
only if (sharedConns == null).

Since Conn1 has DN1/PW1 credentials, and it would be in the
inUseListOfSharedConnections, Conn1's state is 

set to 'InUse', but NO attempt is made to rebind in case a connection has
failed.  This causes a client to 

hang.

Issue:
The PoolManager class needs to make sure inUse & available shared connection
should try to rebind (if necessary) using possibly
conn.poolBind(LDAPConnection.LDAP_V3, DN, PW) to deal with LDAP server
failure/recover conditions.