Package javax.sql

Interface ConnectionPoolDataSource

  • All Superinterfaces:
    CommonDataSource

    public interface ConnectionPoolDataSource
    extends CommonDataSource
    An interface for the creation of ConnectionPoolDataSource objects. Used internally within the package.

    A class which implements the ConnectionPoolDataSource interface is typically registered with a JNDI naming service directory and is retrieved from there by name.

    • Method Detail

      • getPooledConnection

        PooledConnection getPooledConnection()
                                      throws SQLException
        Creates a connection to a database which can then be used as a pooled connection.
        Returns:
        a PooledConnection which represents the connection to the database.
        Throws:
        SQLException - if there is a problem accessing the database.
      • getPooledConnection

        PooledConnection getPooledConnection​(String theUser,
                                             String thePassword)
                                      throws SQLException
        Creates a connection to a database, using the supplied user name and password, which can then be used as a pooled connection.
        Parameters:
        theUser - the a user name for the database login.
        thePassword - the password associated with the user identified by theUser.
        Returns:
        a PooledConnection object which represents the connection to the database.
        Throws:
        SQLException - if there is a problem accessing the database.