tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: PooledConnection.getConnection - Tomcat JDBC Pool
Date Wed, 26 Mar 2014 16:41:18 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jonathan,

On 3/26/14, 9:16 AM, Pierce, Jonathan D wrote:
> I agree that it is counter-intuitive.  I also agree that the
> application should not need to use the PooledConnection interface.
> 
> However, XAConnection is needed to be used by a transaction
> manager, and it extends PooledConnection. So if I understancd
> correctly, an application gets an XAConnection from an
> XADataSource, it does all of the necessary XA boiler plate, and
> then calls XAConnection.getConnection() to get the
> java.sql.Connection object that will be used for all of the
> standard JDBC calls. If the application is using a connection pool,
> then I think XAConnection.getConnection should NOT return the
> physical connection, but a handle that when closed will return the
> connection to the pool.

That's clearly what the Javadoc says it should do. It looks like this
is a case of a poorly-conceived API (IMHO).

Filip clearly thinks this is a bug, so it will likely get a fix pretty
quickly. It doesn't seem that hard to return a wrapper instead of the
underlying object.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTMwMuAAoJEBzwKT+lPKRYWNcQAJKcslDaOvFhAZZageXrvwSI
Lh+tM5cajwxWaa/QE02uWf+zBErnhmC25hp7CkbEv3QcAKG0y1lHo4wa3PSyVWF6
jcd1AkD2sUDh2+X65rOvlOJka1eW8MD8Tg7xWWN5uOmvMUJeesFupV2FmTy9uiri
2fqr3tfcSJ5OyXuvAHmPzL7U1mka11JKfG/plR3Hz2m0T1ROmrUXcUgESGFGFaVt
BHtUeu8NecC+R89eNyU2Qa1j/aGNj894uwjYY8NgpojAbabFuMBjlc1BL5vYL5vx
IUvtn+2P9mqdPY2SuDw6AXgz6dzDuAuog4wUdMl2jGJen6CmBhqXaUDKE6svmJaF
hhXFUcgAXzyXSigQrbrMcSwvD7llRqOSyXdjCXYoFr0skZ34tDRmaPTx0JSAd1Dt
Y7Wk/IPmIFM3VirpoqmtlMHeExIKsQEcPPiW71ZcCyY0F3eY2AGTHge/uRnGoMgc
47/7ppkIwyTm7U267/I1KQoGIqzO4NFD9COdmEDWNj4mINXo8iXnC595BGOkq6Ub
eOJzA1PIWtqLssuXEovg4hia6JR//ctz56oEKuGHwnTqE1OP9RBmgUKM2jKoFo0b
uxNulNj65aFf/Fvodenw4bpKQZciY8hSVCY7nLf316pXoNArsacQuSz7xEfQvZhE
soK4sDPgR1AL+d78HLqh
=WECl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message