commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <dirk.verbe...@pandora.be>
Subject Re: [DBCP] PreparedStatements throwing Already closed Exception.
Date Tue, 20 Apr 2004 20:15:59 GMT
What version are you using? (v1.1 or nightly build)
Can you give a small code example of the problem?

-- Dirk

Antony Paul wrote:

> Hi all,
>     I was using DBCP quite well without any problem. Yesterday I had an idea
> to reap the benefit of PreparedStatement pools because 95% of our
> application uses PreparedStatements. But to my surprise it is throwing
> SQLException("Already closed") in PoolablePreparedStatement when
> PreparedStatement pooling is turned on. What is the need of throwing an
> exception here against the default behaviour of ordinary PreparedStatements
> ?. I think this is unwanted as it forces to set a PreparedStatement to null
> on closing and in the finally block again check it for null when the same
> prepared statement is used. Or is there anything as not use same
> PreparedStatement for another sql statement ?. If so please document it in
> the configuration section and API of DBCP.
> 
> Antony Paul




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message