db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com>
Subject Re: NPE getting length of Blob
Date Wed, 05 Mar 2008 03:12:15 GMT
On Wednesday 05 March 2008 13:54:19 Raymond Kroeker wrote:
> Hi Daniel,
>     What appears to be happening is that the same connection is being
> returned by getConnection2().  Basically the implementation of the pool is
> not thread safe.

I thought reusing the connection was the entire point of connection pooling.  
Correct me if I'm wrong.

I can't see how getConnection2() could return the same object to two separate 
requestors, given that:
  - the method is synchronized
  - it only reuses a connection if it's in the recycledConnections stack
  - connections can only get into the stack after a connectionClosed event.

Unless Derby is sending connectionClosed before the connection is actually 
closed, I don't see how it could happen.


View raw message