|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.neoworks.connectionpool.ConnectionPool
Class to represent and manage a pool of database connections. Connections may be used and then released as required, enabling a small number of connections to service a large number of database operations from different
| Constructor Summary | |
ConnectionPool(java.lang.String name,
java.lang.String URL,
java.lang.String user,
java.lang.String password,
int maxConns,
int initConns,
int timeOut)
Public constructor |
|
| Method Summary | |
void |
freeConnection(java.sql.Connection conn)
Return a Connection to the pool. |
java.sql.Connection |
getConnection()
Get a connection from the pool. |
void |
release()
Release all free database connections. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConnectionPool(java.lang.String name,
java.lang.String URL,
java.lang.String user,
java.lang.String password,
int maxConns,
int initConns,
int timeOut)
name - The name of this connection poolURL - The database URLuser - The database usernamepassword - The database passwordmaxConns - The maximum number of database connections to openinitConns - The initial number of database connections to opentimeOut - The maximum time for a client to wait for a connection from the pool| Method Detail |
public java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLException - If the request for a connection times out or fails.public void freeConnection(java.sql.Connection conn)
conn - The Connection to freepublic void release()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||