mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
19.18.2012 7eeed66d659b675b79f33a7afca47882466cf672
refs
author Matthew Swift <matthew.swift@forgerock.com>
Wednesday, December 19, 2012 18:18 +0100
committer Matthew Swift <matthew.swift@forgerock.com>
Wednesday, December 19, 2012 18:18 +0100
commit7eeed66d659b675b79f33a7afca47882466cf672
tree 8f4c51ac4a01779cea4658cfdf8ce18f35a4d2a0 tree | zip | gz
parent d4ded6c429b29b7790d4f5c2cb7e2786e8c8abce view | diff
Fix OPENDJ-660: HeartbeatConnectionFactory should avoid doing heart-beats and Bind/StartTLS operations concurrently

* only send heart beats when connection is idle for longer than half the heart beat interval
* use shared/exclusive semaphore to coordinate Bind/StartTLS (shared) and heart-beats (exclusive)
* support concurrent Bind/StartTLS operations if the underlying connection does. This is not the case for the LDAPConnectionFactory but may be possible against internal stateless connections
* update Proxy example to use heart beats.

TODO: unit tests will be committed in a separate change.
2 files modified
852 ■■■■■ changed files
opendj-sdk/opendj3/opendj-ldap-sdk-examples/src/main/java/org/forgerock/opendj/examples/Proxy.java 12 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/HeartBeatConnectionFactory.java 840 ●●●●● diff | view | raw | blame | history