public abstract Connection getConnection () throws SQLException

Attempts to establish a connection with the data source that this DataSource object represents.

Returns:  a connection to the data source

Exceptions:
SQLException    if a database access error occurs
java.sql.SQLTimeoutException    when the driver has determined that the timeout value specified by the setLoginTimeout method has been exceeded and has at least tried to cancel the current database connection attempt