-
Notifications
You must be signed in to change notification settings - Fork 825
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
PGXAConnection of Driver Version 9.3.1001 does not play nicely with Apache DBCP 1.4 #162
Comments
Not sure right now about the 0 if con is null. It's just a safety pattern I am used to type automatically ;) |
Oh, and yes, I saw the equals()-Part in the Master, however the hashCode() part is also important. |
Unless the zero-if-null thing is useful for a case that might happen and for which we can write a test, I think the issue is fixed. Letting hashCode() fall into method.invoke(con, args) will do the job as two proxies with the same underlying connection will return the same consistent value. The only remaining question is: should 8d74338 be backported to older branches? |
Yes, it probably should be backported. Dave Cramer On 1 July 2014 06:48, Alexis Meneses notifications@github.com wrote:
|
historic, if this still exists in the latest driver please advise |
Using the PGXAConnection with Apache DBCP 1.4 results in something like the following:
The problem lies within getConnection() where a new Connection Proxy is returned every time the method is called. Since DBCP uses the Connection Object has a key to a (weak) hash map, however hashCode() and equals() do not always deliver stable data on the returned proxies.
We are currently using a patched version, with the following things added:
I know I should better provide patch or pull-request, but my editor currently does a lot of automatic code-formatting resulting in a patch that nearly changes the entire file.
I hope I could help anyways.
Regards
Carsten
The text was updated successfully, but these errors were encountered: