commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xserty@libero.it" <xse...@libero.it>
Subject [DBCP] weird behavior?
Date Tue, 07 Jan 2003 18:07:51 GMT
Hi folks...
I'm testing my system and almost everything seems to work fine.

First of all, I'd appreciate very much if someone could tell me the difference
between maxActive and maxIdle parameters in server.xml, since I still can't
understand.
BTW, if I set them both to 0 (zero), and I try to get a connection, I get a:
java.sql.SQLException: DBCP could not obtain an idle db connection, pool exhausted.
Is that right?

The other thing that bothers me is the following:
My settings in server.xml are:
maxActive=2
maxIdle=2
removeAbandoned=true
removeAbandonedTimeout=10
maxWait=30000
all the rest are not relevant for this case.

Say I used all available connections in pool without closing them, and I want to
get another connection.
I would expect to get one in maximum 10 seconds (more or less).
While the I'm waiting to get the new connection (maxWait=30sec), an un-closed
connection should be released and made available (removeAbandonedTimeout=10) for me.
But after 30 second I get an Exception, and I didn't get the new connection I
expected.
Is that the expected behavior, or is there something wrong?
Is maxWait used only for correctly closed connection made available?

I'm using:
- J2SDK 1.4.1
- Tomcat 4.1.12 LE
- Oracle
- Windows 98

Kind regards,
Stephen


Mime
View raw message