Commit 5f67a54a authored by Nachiappan Palaniappan's avatar Nachiappan Palaniappan
Browse files

Fix for the issue of the PoolManager being unable to rebind the existing...

Fix for the issue of the PoolManager being unable to rebind the existing available connections on LDAP server failure
parent 397a66b7
...@@ -90,7 +90,14 @@ public class PoolManager ...@@ -90,7 +90,14 @@ public class PoolManager
// Create connection. Initialy anonymous // Create connection. Initialy anonymous
Connection conn = new Connection(factory); Connection conn = new Connection(factory);
// At this point all of the connections anonymous // At this point all of the connections anonymous
try
{
conn.connect(host, port); conn.connect(host, port);
}
catch(LDAPException e)
{
System.out.println("Error : " + e.getResultCode());
}
if( factory instanceof LDAPTLSSocketFactory) { if( factory instanceof LDAPTLSSocketFactory) {
conn.startTLS(); conn.startTLS();
} }
...@@ -208,7 +215,10 @@ public class PoolManager ...@@ -208,7 +215,10 @@ public class PoolManager
((Connection)conn).clearInUse(); ((Connection)conn).clearInUse();
sharedConns = inUseListOfSharedConnections.getSharedConns((Connection)conn); sharedConns = inUseListOfSharedConnections.getSharedConns((Connection)conn);
if(sharedConns==null)
{
sharedConns = availableListOfSharedConnections.getSharedConns((Connection)conn);
}
// If all connections in this instance are available move to // If all connections in this instance are available move to
// from in use to available. // from in use to available.
if(sharedConns.allConnectionsAvailable()) if(sharedConns.allConnectionsAvailable())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment