db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: NPE getting length of Blob
Date Wed, 05 Mar 2008 05:03:43 GMT
Daniel Noll wrote:
> 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.

That sounds similar to DERBY-2142 ...

https://issues.apache.org/jira/browse/DERBY-2142

Dan.

Mime
View raw message