LDAP connection statistics


I am looking for some java code or other solution which would return me the connection statistics for the LDAP connection between MWS and LDAP server.

The reason is we have a min/max pool setting and would like to know which connections are active at the time of the check in order to size the pool correctly…

We are also having issues that we have full pool (max=20) even though only one user is connected…

Thanks for any help here