Using Api version M20. We create connection like this: LdapConnection connection = new LdapNetworkConnection(config); // Bind request settings BindResponse bindResponse = connection.bind(bindRequest);
After connection.bind() 5 sockets are created. One between the JVM and the remote ApacheDS host and 4 loopback sockets. If I call connection.close(); all 5 are cleaned up. If I call connection.unBind(); The remote socket closes but the 4 loopback sockets remain open and do not close. After a while, the JVM runs out of sockets. The literature says if unbind() is call explicitly we don't have to close(). http://directory.apache.org/api/five-minutes-tutorial.html I want to close everything in the most graceful and orderly way. Right now I've changed the code to call both methods connection.unBind(); connection.close(); Should I need to do this or should I just call close() ? Thanks.
