commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <>
Subject Re: [dbcp] meanings of active, idle
Date Thu, 23 Jun 2005 05:54:45 GMT
A connection is active when it is being used by the program. It was 
borrowed from the pool by db.getConnection() and hasn't been returned to 
the pool yet by con.close().
When a connection has been returned to the pool by con.close() then a 
connection is considered idle.

A connection that is reallyClosed (the plysical connection to the 
database), isn't in the statistics anymore. A connection will really be 
closed by the pool if the maxIdle limit is reached and in other similar 
cases. Normally the program using the pool just borrows/returns 
connection frm/to the pool.

-- Dirk

mark archur wrote:
> Hi,
> I am using commons-dbcp and its going well so far. But, I am not 100% clear of what exactly
an active, idle connection mean (and not sure if its meaning changes in the context of pool).
Let me tell what I understand:
> Active: A connection is said to be active if a connection is open and is not closed yet.
In the context of pool, does the meaning change?
> Idle: I am guessing a connection to be idle should be closed. But, not sure when can
it be idle. Again, does the meaning change in the context of pool?
> Thanks.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message