avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Knystautas" <ser...@lokitech.com>
Subject Throttling Excalibur
Date Thu, 01 Nov 2001 22:21:59 GMT
I've been testing James' database repository code, and it seems to me that
excalibur's datasource is non-blocking (or something strange).  If too many
threads try to get a connection at once, I get the following stack trace:

java.lang.InstantiationException: Ran out of resources to instantiate
 at
org.apache.avalon.excalibur.pool.HardResourceLimitingPool.newPoolable(HardRe
sourceLimitingPool.java:98)
 at
org.apache.avalon.excalibur.datasource.JdbcConnectionPool.newPoolable(JdbcCo
nnectionPool.java:52)
 at
org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(AbstractPool.java
:113)
 at org.apache.avalon.excalibur.pool.DefaultPool.get(DefaultPool.java:125)
 at
org.apache.avalon.excalibur.datasource.JdbcConnectionPool.get(JdbcConnection
Pool.java:76)
 at
org.apache.avalon.excalibur.datasource.JdbcDataSource.getConnection(JdbcData
Source.java:181)
 at
org.apache.james.mailrepository.JDBCMailRepository.getConnection(JDBCMailRep
ository.java:576)

Any ideas?  Ideally if I ask for a connection and I'm at the max number of
connections, it waits and tries again rather than throwing this exception.
I see it's using HardResourceLimitingPool, and so maybe
SoftResourceLimitingPool should be used instead?  Just not sure why hard was
picked and/or the theory behind this connection pooling.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message