pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Jim Garrison <jim.garrison@nwea.org>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Using CopyManager with pooled JCA connection
Date: Thu, 12 Sep 2013 17:34:48 -0400 (EDT)
Message-ID: <alpine.BSO.2.03.1309121725250.8085@ejurka.com> (raw)
In-Reply-To: <0C723FEB5B4E5642B25B451BA57E27303EE03383@S1P5DAG3C.EXCHPROD.USA.NET>
References: <0C723FEB5B4E5642B25B451BA57E27303EE03319@S1P5DAG3C.EXCHPROD.USA.NET>
	<CAH7T-apt6XN4tYRun5u3Q0DebC0nJLvx_Mj=GBHW5JtdYOUgcA@mail.gmail.com>
	<0C723FEB5B4E5642B25B451BA57E27303EE03350@S1P5DAG3C.EXCHPROD.USA.NET>
	<CAH7T-arvpYKju-38KP8KwnPJ5pOgYJy_7vfiAOJhXKuG9m-kag@mail.gmail.com>
	<0C723FEB5B4E5642B25B451BA57E27303EE03383@S1P5DAG3C.EXCHPROD.USA.NET>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (7+ messages)  latest in thread

Message-ID: <alpine.BSO.2.03.1309121725250.8085@ejurka.com>
Permalink:  ../alpine.BSO.2.03.1309121725250.8085@ejurka.com/
Also on:    postgresql.org/message-id/alpine.BSO.2.03.1309121725250.8085@ejurka.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, jim.garrison@nwea.org
  Subject: Re: Using CopyManager with pooled JCA connection
  In-Reply-To: <alpine.BSO.2.03.1309121725250.8085@ejurka.com>
  References: <0C723FEB5B4E5642B25B451BA57E27303EE03319@S1P5DAG3C.EXCHPROD.USA.NET> <CAH7T-apt6XN4tYRun5u3Q0DebC0nJLvx_Mj=GBHW5JtdYOUgcA@mail.gmail.com> <0C723FEB5B4E5642B25B451BA57E27303EE03350@S1P5DAG3C.EXCHPROD.USA.NET> <CAH7T-arvpYKju-38KP8KwnPJ5pOgYJy_7vfiAOJhXKuG9m-kag@mail.gmail.com> <0C723FEB5B4E5642B25B451BA57E27303EE03383@S1P5DAG3C.EXCHPROD.USA.NET> <alpine.BSO.2.03.1309121725250.8085@ejurka.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox