jeandelavarene commented on PR #324: URL: https://github.com/apache/commons-dbcp/pull/324#issuecomment-1935666613
With JDBC 4.2, the driver doesn't know when a connection is borrowed from connection cache or when a connection is returned to the cache. It is, however, a very useful piece of information. For example, when a connection is returned, the driver may decide to flush temporary resources or let the database know so that it can compute statistics, or even replace the connection with another one during a planned maintenance event of the Database. When a connection is borrowed from the cache, the driver may start recording calls in its replay queue in case of an unplanned outage so that it can transparently replay a request. This is the reason why these APIs beginRequest and endRequest were added to the JDBC 4.3 specification. There are endless possibilities. But this relies on connection pools such as DBCP to call these APIs. The features that rely on request boundaries can only be activated with connection pools that make these calls. This is why we (at Oracle) think that this is a very desirable feature to add to DBCP. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
