Skip to content
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

[ARTEMIS-2626]: Postgresql Journal implementation requires the jdbc driver to be in the same classloader #2987

Merged
merged 1 commit into from Feb 20, 2020

Conversation

ehsavoie
Copy link
Contributor

@ehsavoie ehsavoie commented Feb 20, 2020

Issue:
The BLOB manipulation is done using PostgreSQL internal classes starting from PGConnection. This leads to ClasCastExceptions if the connection is wrapped in a pool or if the driver is in a different classloader (WildFly).

Fix:
unwrap the connection and if the PostgreSQL classes are not directly available uses reflection to manipulate the BLOBs.
Jira: https://issues.apache.org/jira/browse/ARTEMIS-2626

Supersedes #2948

@clebertsuconic
Copy link
Contributor

@ehsavoie sort of a nit-pic but the only thing wrong here is the title for the commit

the bug is Postgres JDBC requires JDBC driver..

The fix is... allowing Postgres to use the driver in a certain way... etc..

Can you be a bit more descriptive of the fix itself instead of using the bug description?

@clebertsuconic
Copy link
Contributor

It's just that when I look for a list of commits, I like to understand what was changed.. to follow cherry-picks.. etc..

…ess to PostgeSQL driver internal classes.

Issue: The BLOB manipulation is done using PostgreSQL internal classes starting from PGConnection.
This leads to ClasCastExceptions if the connection is wrapped in a pool or if the driver is in a different classloader (WildFly).

Fix: unwrap the connection and if the PostgreSQL classes are not directly available uses reflection to manipulate the BLOBs.

Jira: https://issues.apache.org/jira/browse/ARTEMIS-2626
@ehsavoie
Copy link
Contributor Author

Is this better ?

@clebertsuconic
Copy link
Contributor

Nice !!! I thought about something simple. You went beyond complete now. Thanks a lot.

@asfgit asfgit merged commit d3efc24 into apache:master Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants