1 package jodd.db.pool;2 3 import java.sql.Connection;4 import java.sql.SQLException;5 6 /**7 * A database connection pool interface.8 */9 public interface ConnectionPool {10 11 /**12 * Initialize pool with current object state.13 *14 * @exception SQLException15 */16 public void init() throws SQLException;17 18 19 /**20 * Get one free connection from the connection pool.21 *22 * @return Connection object representing free database connection23 * @exception SQLException24 */25 public Connection getConnection() throws SQLException;26 27 /**28 * Returns connection to connection pool.29 *30 * @param conn database connection31 */32 public void freeConnection(Connection conn);33 34 35 /**36 * Close pool when it is not needed anymore.37 */38 public void close();39 40 }41 42