Re: Using CopyManager with pooled JCA connection - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Using CopyManager with pooled JCA connection
Date
Msg-id alpine.BSO.2.03.1309121725250.8085@ejurka.com
Whole thread Raw
In response to Re: Using CopyManager with pooled JCA connection  (Jim Garrison <jim.garrison@nwea.org>)
List pgsql-jdbc

On Thu, 12 Sep 2013, Jim Garrison wrote:

> >From: Sehrope Sarkuni [mailto:sehrope@jackdb.com] Sent: Thursday,
> >September 12, 2013 2:01 PM One other trick is that if you can get
> >anything that implements java.sql.Connection you can usually get to the
> >"raw" connection by first getting the DB meta data object and then
> >getting the original connection from it.
>
> Spring has a decent explanation of in SimpleNativeJdbcExtractor[1].
> Basically you do conn.getMetaData().getConnection()
>

This seems like a dangerous thing to rely on.  Not proxying
DatabaseMetaData seems like a bug to me.  Yes, the PG driver doesn't do it
currently, but if it did and broke user code that relied on it not
proxying, I wouldn't have a whole lot of sympathy for the user.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Jim Garrison
Date:
Subject: Re: Using CopyManager with pooled JCA connection
Next
From: Sylvain Cuaz
Date:
Subject: Re: DatabaseMetaData getImportedKeys() order