Package com.iizix.jdbc
Interface IDBConnectionPool
public interface IDBConnectionPool
Interface used to retrieve a connection from a connection pool.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final intFlavor for JDBC: DB2.- static final intFlavor for JDBC: Derby.- static final intFlavor for JDBC: MySQL.- static final intFlavor for JDBC: PostgreSQL.- static final intFlavor for JDBC: SQL Server.- static final intUnknown flavor for JDBC Driver.- static final StringProperty name: class path, comma separated.- static final StringProperty name: default auto-commit flag.- static final StringProperty name: description.- static final StringProperty name: driver class name.- static final StringProperty name: password.- static final StringProperty name: JDBC URL.- static final StringProperty name: user name.
- Method Summary
- Field Details- FLAVOR_UNKNOWNstatic final int FLAVOR_UNKNOWNUnknown flavor for JDBC Driver.- See Also:
 
- FLAVOR_DERBYstatic final int FLAVOR_DERBYFlavor for JDBC: Derby.- See Also:
 
- FLAVOR_MYSQLstatic final int FLAVOR_MYSQLFlavor for JDBC: MySQL.- See Also:
 
- FLAVOR_POSTGREstatic final int FLAVOR_POSTGREFlavor for JDBC: PostgreSQL.- See Also:
 
- FLAVOR_SQLSERVERstatic final int FLAVOR_SQLSERVERFlavor for JDBC: SQL Server.- See Also:
 
- FLAVOR_DB2static final int FLAVOR_DB2Flavor for JDBC: DB2.- See Also:
 
- PN_DESCRIPTIONProperty name: description.- See Also:
 
- PN_CLASS_PATHProperty name: class path, comma separated. Specify comma twice for a single comma.- See Also:
 
- PN_DRIVER_CLASS_NAMEProperty name: driver class name.- See Also:
 
- PN_URLProperty name: JDBC URL.- See Also:
 
- PN_USER_NAMEProperty name: user name.- See Also:
 
- PN_PASSWORDProperty name: password.- See Also:
 
- PN_DEFAULT_AUTO_COMMITProperty name: default auto-commit flag.- See Also:
 
 
- Method Details- getConnectionGets a connection from the pool.- Throws:
- SQLException- For SQL errors.
 
- getFlavorint getFlavor()Gets the JDBC Driver flavor.- Returns:
- one of the flavors:- FLAVOR_DERBY,
- FLAVOR_MYSQL,
- FLAVOR_POSTGRE[not yet supported],
- FLAVOR_SQLSERVER[not yet supported],
- FLAVOR_DB2[not yet supported].
 
 
- getNameString getName()Gets the name of the connection pool.- Returns:
- The name of the connection pool.
 
- disposeDisposes of the pool.- Closes and releases all idle connections that are currently stored in the connection pool associated with this data source. - Connections that are checked out to clients when this method is invoked are not affected. When client applications subsequently invoke - Connection.close()to return these connections to the pool, the underlying JDBC connections are closed.- Attempts to acquire connections using - getConnection()after this method has been invoked result in SQLExceptions.- This method is idempotent - i.e., closing an already closed BasicDataSource has no effect and does not generate exceptions. - Throws:
- SQLException- If an error occurs closing idle connections
 
- isDisposedboolean isDisposed()Checks if the connection pool is disposed of.- Returns:
- true for disposed of, false if not disposed of and ready.