ecki commented on PR #324:
URL: https://github.com/apache/commons-dbcp/pull/324#issuecomment-1905880476

   I was curious on those begin/end but could not find much of documentation. 
So I snooped a bit around in the source code of some drivers. Besides the 
resetting of the client side state (the typical fields inside a SQL Connection 
object) there is also the possibility of server side session state resets, 
where the drivers would only send demarcation messages. I think mssql doesnt do 
that (but it has a reset flag in the protocol). In the MSSQL-JDBC driver I 
found some code to reconnect broken connection. I thought it was linked to the 
request state, but cant find it anymore.
   
   I think I have also seen some logic for different timeout handlings of 
sessions outside the request block and associated diagnostics in oracle 
documents (but cant find it again at the moment).
   
   So - it might get promising for some drivers in the future to use it. Maybe 
an app listener hook can also use it, but then the pool would still do the 
reset/aliveness dance which it could skip for qualified drivers.
   
   MSSQL Resets:
   
https://github.com/microsoft/mssql-jdbc/blob/bb76a7832ecf1cd24238c75cf7c2c4706d922435/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java#L7561
   Session recovery
   
https://github.com/microsoft/mssql-jdbc/blob/bb76a7832ecf1cd24238c75cf7c2c4706d922435/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java#L4327
   
https://github.com/microsoft/mssql-jdbc/blob/bb76a7832ecf1cd24238c75cf7c2c4706d922435/src/main/java/com/microsoft/sqlserver/jdbc/IdleConnectionResiliency.java#L16


-- 
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]

Reply via email to