org.apache.commons.dbcp.datasources
public class SharedPoolDataSource extends InstanceKeyDataSource
DataSource
appropriate for deployment within
J2EE environment. There are many configuration options, most of which are
defined in the parent class. All users (based on username) share a single
maximum number of Connections in this datasource.
Version: $Revision: 500687 $ $Date: 2007-01-27 16:33:47 -0700 (Sat, 27 Jan 2007) $
Constructor Summary | |
---|---|
SharedPoolDataSource()
Default no-arg constructor for Serialization |
Method Summary | |
---|---|
void | close()
Close pool being maintained by this datasource. |
int | getMaxActive()
The maximum number of active connections that can be allocated from
this pool at the same time, or non-positive for no limit. |
int | getMaxIdle()
The maximum number of active connections that can remain idle in the
pool, without extra ones being released, or negative for no limit. |
int | getMaxWait()
The maximum number of milliseconds that the pool will wait (when there
are no available connections) for a connection to be returned before
throwing an exception, or -1 to wait indefinitely. |
int | getNumActive()
Get the number of active connections in the pool. |
int | getNumIdle()
Get the number of idle connections in the pool. |
Reference | getReference()
Returns a SharedPoolDataSource Reference.
|
void | setMaxActive(int maxActive)
The maximum number of active connections that can be allocated from
this pool at the same time, or non-positive for no limit.
|
void | setMaxIdle(int maxIdle)
The maximum number of active connections that can remain idle in the
pool, without extra ones being released, or negative for no limit.
|
void | setMaxWait(int maxWait)
The maximum number of milliseconds that the pool will wait (when there
are no available connections) for a connection to be returned before
throwing an exception, or -1 to wait indefinitely. |
SharedPoolDataSource
Reference.
Since: 1.2.2