Richard Bullington-McGuire wrote:
>
> On 9 Mar 2001, Gunnar R|nning wrote:
>
> > [snip] Of course your milage may vary, but this is not really a pgsql
> > related question... ;-D Unless of course we are talking about implementing
> > pooling for the DataSource class, but that is somewhat unrelated as well...
>
> That's something that I'm a bit confused about -- there is very little
> documentation on the DataSource class in the sources. One comment in
> particular confuses me:
>
> /**
> * This is a pool of free underlying JDBC connections. If two
> * XA connections are used in the same transaction, the second
> * one will make its underlying JDBC connection available to
> * the pool. This is not a real connection pool, only a marginal
> * efficiency solution for dealing with shared transactions.
> */
>
> This is not a real connection pool?
>
> It seems to me that the JavaDoc for this class should be expanded to
> explain more just what kind of pool it provides.
It's a connection sharing pool.
If two JDBC Connection objects are used in the same transaction, they
will need to use the same underlying connection, since there's not
support for the XA API. When performing asynchronous commit, the
connection will be put aside until it commits, and the JDBC Connection
object might need to use a different underlying connection.
Because of all this connection switching logic, I've implemented a very
simple connection pool that is just used to recycle the underlying JDBC
connection across many client-side JDBC connections. It's not a full
connection pool.
If you are looking for a fully featured connection pool, see
http://tyrex.exolab.org.
arkin
>
> --
> Richard Bullington-McGuire <rbulling@microstate.com>
> Chief Technology Officer, The Microstate Corporation
> Phone: 703-796-6446 URL: http://www.microstate.com/
> PGP key IDs: RSA: 0x93862305 DH/DSS: 0xDAC3028E
--
----------------------------------------------------------------------
Assaf Arkin arkin@intalio.com
CTO, Intalio Inc. www.intalio.com
The Business Process Management Company (650) 345 2777