[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
JLDAP Driver Connection Pool problem (ITS#3357)
Full_Name: Zhiguo Yang
Version: JLDAP
OS: Win2k
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (128.88.255.123)
Although this is not a problem of openLDAP, it's a problem of JLDAP. But I can't
find other place to submit the problem. So I have to submit it here.
Problem:
Client: JLDAP, running on Win2k
Server: openLDAP 2.2.13 on HP-UX
1.Using JLDAP Connection Pool connect to openLDAP server, on server set the
timeout of inactive connection as 60 seconds. Pool size is set as 30.
2. Client stops access LDAP Server for a long time, all the 30 connection will
be closed by Server.
3. Use 'netstat' to check connection status, after all the connection is closed,
make client to access openLDAP server. Client hangs, and no connection is
established.
4. Make client access again, connection established. Subsequent accesses are
OK.
I check the JLDAP Source, and made following change, which fix this problem
Change only one file: com.novell.ldap.connectionpool.PoolManager.java
cvs diff PoolManager.java (in directory
C:\TechRef\JLDAP\jldap\com\novell\ldap\connectionpool\)
Index: PoolManager.java
===================================================================
RCS file: /repo/OpenLDAP/pkg/jldap/com/novell/ldap/connectionpool/PoolManager.java,v
retrieving revision 1.11
diff -r1.11 PoolManager.java
31c31
< * constructor.</p>
---
> * constructor.</p>
42c42
< * Once an LDAPConnection object is no longer needed the
---
> * Once an LDAPConnection object is no longer needed the
58c58
< * @param host - Host name associated with this connection pool
---
> * @param host - Host name associated with this connection pool
146c146
< if(0 == availableListOfSharedConnections.size())
---
> while (0 == availableListOfSharedConnections.size())
166c166
< if(needToBind)
---
> if(needToBind || !conn.isConnectionAlive())