31 /** 32 * A factory for <code>PooledConnection</code> 33 * objects. An object that implements this interface will typically be 34 * registered with a naming service that is based on the 35 * Java<sup><font size=-2>TM</font></sup> Naming and Directory Interface 36 * (JNDI). 37 * 38 * @since 1.4 39 */ 40 41 public interface ConnectionPoolDataSource extends CommonDataSource { 42 43 /** 44 * Attempts to establish a physical database connection that can 45 * be used as a pooled connection. 46 * 47 * @return a <code>PooledConnection</code> object that is a physical 48 * connection to the database that this 49 * <code>ConnectionPoolDataSource</code> object represents 50 * @exception SQLException if a database access error occurs 51 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 52 * this method 53 * @since 1.4 54 */ 55 PooledConnection getPooledConnection() throws SQLException; 56 57 /** 58 * Attempts to establish a physical database connection that can 59 * be used as a pooled connection. 60 * 61 * @param user the database user on whose behalf the connection is being made 62 * @param password the user's password 63 * @return a <code>PooledConnection</code> object that is a physical 64 * connection to the database that this 65 * <code>ConnectionPoolDataSource</code> object represents 66 * @exception SQLException if a database access error occurs 67 * @exception SQLFeatureNotSupportedException if the JDBC driver does not support 68 * this method 69 * @since 1.4 70 */ 71 PooledConnection getPooledConnection(String user, String password) 72 throws SQLException; 73 } | 31 /** 32 * A factory for <code>PooledConnection</code> 33 * objects. An object that implements this interface will typically be 34 * registered with a naming service that is based on the 35 * Java<sup><font size=-2>TM</font></sup> Naming and Directory Interface 36 * (JNDI). 37 * 38 * @since 1.4 39 */ 40 41 public interface ConnectionPoolDataSource extends CommonDataSource { 42 43 /** 44 * Attempts to establish a physical database connection that can 45 * be used as a pooled connection. 46 * 47 * @return a <code>PooledConnection</code> object that is a physical 48 * connection to the database that this 49 * <code>ConnectionPoolDataSource</code> object represents 50 * @exception SQLException if a database access error occurs 51 * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support 52 * this method 53 * @since 1.4 54 */ 55 PooledConnection getPooledConnection() throws SQLException; 56 57 /** 58 * Attempts to establish a physical database connection that can 59 * be used as a pooled connection. 60 * 61 * @param user the database user on whose behalf the connection is being made 62 * @param password the user's password 63 * @return a <code>PooledConnection</code> object that is a physical 64 * connection to the database that this 65 * <code>ConnectionPoolDataSource</code> object represents 66 * @exception SQLException if a database access error occurs 67 * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support 68 * this method 69 * @since 1.4 70 */ 71 PooledConnection getPooledConnection(String user, String password) 72 throws SQLException; 73 } |