db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Van Couvering <David.Vancouver...@Sun.COM>
Subject Re: Pooled connections are closed?
Date Thu, 05 May 2005 23:19:48 GMT
Well, more information on this.  It appears if I call getConnection() 
twice on the *same* XAConnection or PooledConnection(), the first 
connection is closed as soon as I get the second connection.  I am not 
sure if this is a bug.

If I get two seaprate XAConnections and call getConnection() on each one 
separately, this works.

I am not sure if this is a bug.  If you think about it actually makes 
sense -- a single XAConnection or PooledConnection is supposed to be a 
proxy for a single physical connection.  So this is a feature -- it 
won't let you have two separate references to the same physical 
connection underlying an XAConnection or PooledConnection.

That said, I'm not sure if it's the same thing you are seeing...


Dibyendu Majumdar wrote:

> Hi,
> I have created an issue for this (DERBY-246).
> Basically, the XA implementation seems broken, and behaviour is the same as
> that of DB2 type-4 driver against a DB2 database.
> Regards
> ----- Original Message ----- 
> From: "David Van Couvering" <David.Vancouvering@Sun.COM>
> To: <derby-dev@db.apache.org>
> Sent: Thursday, May 05, 2005 11:55 PM
> Subject: Pooled connections are closed?
>>Hi, all.  I'm working on testing the toString() fix for Connections.
>>I'm trying to cover all the bases in terms of our various data sources.
>>In my tests I create a new instance of EmbeddedXADataSource and
>>ConnectionPoolDataSource, and then get an XAConnection and a
>>PooledConnection.  From each of these I then call getConnection().  I am
>>not sure if this is right, but I'm copying existing test code here.
>>All this works great, except that the first connection I get back from
>>getConnection() is always closed.  Does anyone know why this is?  Is
>>this expected behavior?

View raw message