com.nec.tdd.tools.dbMapper
Interface DataSource
- All Known Subinterfaces:
- DBInterface
- All Known Implementing Classes:
- BasicDataSource, JNDIDataSource, ConnectionPoolDataSource
- public interface DataSource
A DataSource object manages (establish, close) DBConnection objects.
It defines getConnection method to get a DBConnection object maintained by
this connection manager. Calling class should release an previously
acquired DBConnection object by calling releaseConnection method, after
it has finished any database task.
This interface is intended to be used by all the classes that perform
any database operation.
getConnection
public DBConnection getConnection()
- Get a DBConnection from this connection manager.
- Returns:
- A database connection if possible. Null if all connections
are already in use for this connection manager.
releaseConnection
public void releaseConnection(DBConnection connection)
- Called to release an previously acquired DBConnection.
- Parameters:
connection
- DBConnection to be released.