Bug #3066
LDAPService needs more robust connection management
100%
Description
getContext may return an invalid connection to LDAP. should check the connection before returning it to make certain connection has not been severed.
http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/close.html
Detecting Connection Closures
LDAP servers often have an idle timeout period after which they will close connections no longer being used. When you subsequently invoke a method on a Context instance that is using such a connection, the method will throw a CommunicationException(in the API reference documentation). To detect when the server closes the connection that a Context instance is using, you register an UnsolicitedNotificationListener(in the API reference documentation) with the Context instance. An example is shown in the Event Notification (in the Beyond the Basics trail) lesson. Although the example is designed for receiving unsolicited notification from the server, it can also be used to detect connection closures by the server. After starting the program, stop the LDAP server and observe that the listener's namingExceptionThrown()(in the API reference documentation) method gets called.
History
#1 Updated by Dave Vieglais over 12 years ago
- Milestone changed from CCI-1.0.3 to CCI-1.0.4
#2 Updated by Robert Waltz over 12 years ago
- Status changed from New to In Progress
#3 Updated by Robert Waltz over 12 years ago
- Target version changed from Sprint-2012.29-Block.4.3 to Sprint-2012.33-Block.5.1
#4 Updated by Robert Waltz over 12 years ago
- Target version changed from Sprint-2012.33-Block.5.1 to Sprint-2012.35-Block.5.2
#5 Updated by Robert Waltz over 12 years ago
- Status changed from In Progress to Testing
#6 Updated by Robert Waltz over 12 years ago
- Status changed from Testing to Closed