| java.lang.Object org.cougaar.util.DBConnectionPool
DBConnectionPool | public class DBConnectionPool (Code) | | A database connection manager that creates pools of db connections
that can be reused to improve performance. DBConnectionPool should
be used in exactly the same way as the DriverManager class. That
is, call DBConnectionPool.getConnection() to get a Connection, use
the connection and close it. The same issues that exist for
Connections obtained from the DriverManager exist for Connections
obtained from DBConnectionPool. In particular, ResultSets should be
closed when you are finished with them so that you do not exceed
the limit on open ResultSets and Statements should be closed when
you are finished with them so you do not exceed the limit on open
Statements. In the same way as for Connections obtained from the
DriverManager, ResultSets that are not closed will be closed when
you close the Statement and Statements that are not closed will be
closed when you close the Connection.
|
Inner Class :class DBConnectionPoolEntry | |
Inner Class :static interface PreparedStatementConstructor | |
entryCounter | int entryCounter(Code) | | |
waitingCounter | int waitingCounter(Code) | | how many clients are waiting for a connection in this pool? *
|
getConnection | public static Connection getConnection(String dbURL, Properties props) throws SQLException(Code) | | One of the three main functions of this class. This is intended
as a drop-in replacement for DriverManager.getConnection(). The
connection return may have been previously used.
|
getConnection | public static Connection getConnection(String dbURL, String user, String passwd) throws SQLException(Code) | | One of the three main functions of this class. This is intended
as a drop-in replacement for DriverManager.getConnection(). The
connection return may have been previously used.
|
registerDriver | public static void registerDriver(String driverName) throws Exception(Code) | | Register a driver carefully *
|
|
|