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
DBCP-515 Added support for obtaining a reference to the connection du… #16
Conversation
Same comment as from #15. I don't know enough about this change to merge it, but also, the following tests are not passing locally:
|
186518a
to
0c522aa
Compare
I have pushed a fix to correct the test. What the patch is about is basically to not try to register the synchronization when the transaction on the thread is already committed, as would be the case in afterCompletion for example. During testing I see that some frameworks can try to do a getConnection().getWarnings() in afterCompletion. If they attempt that at the moment they will get an exception saying that it is not allowed to register the synchronization and so that can be protected against in this library. |
May you please rebase this patch on top of git master now that I've applied PR #15? Thank you! |
@garydgregory - I have rebased it now and retested locally thanks |
Thank you for rebasing your patch. Unfortunately it breaks binary compatibility, which you can check by running
Can you provide a patch that keeps the old API in place? With an appropriate behavior? Thank you! |
…tion during afterCompletion
Sure, sorry about that. I saw that the argument was not being used in the only implementation in the code base and that code appeared to be internal so I thought to prune at the same time. That said, there is a reasonable approach to use and still retain the parameter so I have pushed an update. Thanks for looking |
https://issues.apache.org/jira/browse/DBCP-515
Should be merged with #17 ideally to ensure that the connection is not double returned to the pool during checkOpen and similar (existing bug)