Oracle JDBC Thin Driver ↔ Database Resource Manager: Cancellation and Timeout Interoperability
0 reputation · 30 Sept 2021, 16:28 UTC
Integrating the Oracle JDBC Thin driver with the database Resource Manager requires a clear understanding of how session termination is handled when multiple timeout mechanisms overlap. Specifically, the JDBC driver provides setQueryTimeout and the cancel() method to signal the server to abort execution via a break message.
Simultaneously, the Oracle Database Resource Manager can enforce hard limits on execution time using parameters such as MAX_EST_EXEC_TIME within a consumer group. When a session is subject to both a client-side JDBC timeout and a server-side Resource Manager limit, the priority and cleanup behavior of these two signals are not fully defined.
There is uncertainty regarding whether a JDBC cancel() request overrides the Resource Manager's enforced termination or if the two mechanisms operate independently, potentially leading to inconsistent resource release or lingering sessions in V$SESSION.
Technical Questions
- Does a JDBC
cancel()signal take precedence over a Resource ManagerMAX_EST_EXEC_TIMElimit, or does the server process the first signal received? - In scenarios where both are active, does the JDBC cancellation ensure immediate release of locks, or does the session persist until the Resource Manager's internal cleanup cycle triggers?