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 01:52:37 GMT
On Wednesday 05 March 2008 12:43:44 Raymond Kroeker wrote:
> Hi Daniel,
>     Which pool/version are you using?  Also how are you configuring the
> pool?  You want to make sure your library is wrapping the connection  or 
> if not; is interfacing with the pooled connection/data source object.

Data source configuration is... (parameters is our own bean for storing this 

ClientConnectionPoolDataSource dataSource =
    new ClientConnectionPoolDataSource();

We're using MCPM as the pool manager, it's just a simple connection pool 
manager in a single Java class which uses PooledConnection to do the hard 

Relevant code is probably:

  private synchronized Connection getConnection2() throws SQLException {
    PooledConnection pconn;
    if (!recycledConnections.empty()) {
      pconn = recycledConnections.pop();
    } else {
      pconn = dataSource.getPooledConnection();
    Connection conn = pconn.getConnection();
    return conn;

As it's going via PooledConnection I was expecting it to be reusable after 
closing.  This works in practice for the embedded version anyway.

I've checked the MCPM code and close() is only called during disposeConnection 
and certainly not during recycleConnection.


View raw message