cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: JdbcDataSource Issue Resolved
Date Fri, 06 Apr 2001 14:48:30 GMT
Berin Loritsch wrote:
> 
> Thanks to Giacomo, an issue was brought to my attention:
> "What if the DB server severs the connection?".  Until
> now, the bad connection was still kept in the pool.
> Obviously this is wrong, so now the JdbcDataSource will
> check the connection to see if it is closed (con.isClosed()),
> and if so it will destroy the bad connection object and
> create a new connection to replace it.
> 
> The only problem is if the DB Server is down, the pool will
> shrink to zero connections because new connections cannot
> be made.  The JdbcConnectionPool is designed to have exactly
> a certain number of connections, and does not check to see if
> it has changed size.
> 
> That will be the next step, but we will see how this works.

This last issue is resolved.  For every get() when the ready
connections are empty, it checks to see if the maximum number
of connections have been created--if not you will get a new
one.

This way if your Database server is down for 5 minutes and
you had 10 requests that required DB access (assuming 10
connections in your pool), you won't be SOL when the DB
server comes back up.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message