Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/sql/ConnectionPoolDataSource.java
38829 views
/*1* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.sql;2627import java.sql.SQLException;282930/**31* A factory for <code>PooledConnection</code>32* objects. An object that implements this interface will typically be33* registered with a naming service that is based on the34* Java™ Naming and Directory Interface35* (JNDI).36*37* @since 1.438*/3940public interface ConnectionPoolDataSource extends CommonDataSource {4142/**43* Attempts to establish a physical database connection that can44* be used as a pooled connection.45*46* @return a <code>PooledConnection</code> object that is a physical47* connection to the database that this48* <code>ConnectionPoolDataSource</code> object represents49* @exception SQLException if a database access error occurs50* @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support51* this method52* @since 1.453*/54PooledConnection getPooledConnection() throws SQLException;5556/**57* Attempts to establish a physical database connection that can58* be used as a pooled connection.59*60* @param user the database user on whose behalf the connection is being made61* @param password the user's password62* @return a <code>PooledConnection</code> object that is a physical63* connection to the database that this64* <code>ConnectionPoolDataSource</code> object represents65* @exception SQLException if a database access error occurs66* @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support67* this method68* @since 1.469*/70PooledConnection getPooledConnection(String user, String password)71throws SQLException;72}737475