The creation of the idleSessionWatchDog threads is a consequence of changes in
OpenEdge 11.7.4 to make the idleSessionTimeout property work for Java OpenClient transports.
In prior versions, Idle sessions created by PASOE transports that use the embedded Java OpenClient are not automatically shut down by the idle resource manager.
- These sessions always appear in the "RESERVED" state because Idle sessions are created by the Java OC session pool manager
- These sessions cannot be terminated by session manager, which only shuts down AVAILABLE sessions
- In order to reap sessions that were owned by the internal java openclient interface, the java openclient idle session watchdog for PASOE was enabled with a default timeout value of 15 seconds.
- This allows the cleanup of unused sessions owned by the Java OpenClient based transports.
- The idle session watchdog threads are shut down when the OpenClient session pool is destroyed, as a consequence of successful Java OpenClient appobject destruction.
However this change exposed leaking OC session pools, in the REST adapter.
This issue was replicated by forcing the agent to run out of database connections.
- Handling the errors in the REST adapter caused the Java OpenClient objects to be recycled.
- When this happens, the idle connection watchdog thread in the Java OpenClient session pool is not stopped when the session pool was released, causing the buildup of watchdog threads.
- Because the watchdog thread maintained a reference to the session pool object, this object was also not garbage collected.