getConnection()

Syntax:

Connection getConnection()
                         throws SQLException

Description:

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

Returns:

a connection to the data source

Throws:

SQLException - if a database access error occurs

Reference:

For more information, reference JDBC documentation for: DataSource.getConnection()