On Thu, 1 Nov 2001, Serge Knystautas wrote: > 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.
The HardResourceLimitingPool was choosen because of licensing issues you might run into when creating more connection than you've licensed. This way you can be sure you want run into illegality ;) Giacomo -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>