DB connection pool

View: New views
2 Messages — Rating Filter:   Alert me  

DB connection pool

by Pawel Tucholski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've noticed that, when using org.apache.commons.dbcp.BasicDataSource, number of connections to database can be much higher than max number of connections.  I found that the root cause of this bug is in commons-dbcp - http://issues.apache.org/jira/browse/DBCP-23. This bug causes that connection is never passivated properly as close on connection involves close on prepared statements and close on prepared statements throws SQLException("Already closed").
Some workaround for this problem is disabling of pooling of prepared statements.

Pawel Tucholski

Re: DB connection pool

by James.Strachan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

An alternative is to try another JDBC pool provider such as c3po which
might work better?

On 12/7/06, Pawel Tucholski <pawel.tucholski@...> wrote:

>
> I've noticed that, when using org.apache.commons.dbcp.BasicDataSource, number
> of connections to database can be much higher than max number of
> connections.  I found that the root cause of this bug is in commons-dbcp -
> http://issues.apache.org/jira/browse/DBCP-23. This bug causes that
> connection is never passivated properly as close on connection involves
> close on prepared statements and close on prepared statements throws
> SQLException("Already closed").
> Some workaround for this problem is disabling of pooling of prepared
> statements.
>
> Pawel Tucholski
> --
> View this message in context: http://www.nabble.com/DB-connection-pool-tf2775515.html#a7742611
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/