|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectraccoon.core.jdbc.ConnectionPool
public class ConnectionPool
The pool manager for the various JDBC connections that have been loaded..
| Field Summary | |
|---|---|
static int |
POOL_SIZE
The initial pool size. |
| Constructor Summary | |
|---|---|
ConnectionPool(java.lang.String pDbConnectionString,
java.lang.String pDbUserName,
java.lang.String pDbPassword)
Creates the pool monitor and sets the fields of this instance. |
|
| Method Summary | |
|---|---|
void |
closeConnections()
Closes all the known connections and releases resources. |
protected void |
finalize()
Invokes closeConnections(). |
Connection |
getConnection()
Retrieves a connection, creates a new one if required. |
void |
reapConnections()
Removes connections that haven't been used for a while. |
void |
returnConnection(Connection pConnection)
Frees the given JDBC connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int POOL_SIZE
| Constructor Detail |
|---|
public ConnectionPool(java.lang.String pDbConnectionString,
java.lang.String pDbUserName,
java.lang.String pDbPassword)
pDbConnectionString - the database connection string to use.pDbUserName - the name of the database user.pDbPassword - the database password of the provided user.| Method Detail |
|---|
public void reapConnections()
public void closeConnections()
protected void finalize()
throws java.lang.Throwable
closeConnections().
finalize in class java.lang.Objectjava.lang.Throwable - in case of an unhandled error.
public Connection getConnection()
throws java.sql.SQLException
java.sql.SQLException - if the connection couldn't be obtained.public void returnConnection(Connection pConnection)
pConnection - the JDBC connection.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||