-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Support For beginRequest and endRequest #2079
Added Support For beginRequest and endRequest #2079
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at the comments.
@brettwooldridge Please take a look |
1 similar comment
@brettwooldridge Please take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good! Just the comments could be removed to be consistent with the codebase.
Can this PR please be merged? |
DatabaseMetaData dm = connection.getMetaData(); | ||
if (dm!=null){ | ||
if (dm.getJDBCMajorVersion() > 4 || | ||
(dm.getJDBCMajorVersion() == 4 && dm.getJDBCMinorVersion() >= 3)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic should not be executed every time. Can this be moved somewhere so the calculation of if the feature is supported is only run once. Calling getMetaData might not be cheap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment has been addressed in pull request #2126
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing this as the work is being continued on #2126 |
#2071 Added support of beginRequest and endRequest from JDBC 4.3 onwards.
Both these calls function to let the driver know when a connection is checked out of the pool and back into the pool.These boundaries can help driver for load balancing and other stuff. These functions are driver specific and may not do anything.