Code example for DataSource

Methods: getConnection

0
 
public final class SimpleConnectionFactory extends AbstractConnectionFactory { 
 
    @Override @SuppressWarnings("PMD.CloseResource") // this is a factory. it will not close the resource for sure! 
    protected Connection getConnection(final DataSource dataSource) throws SQLException {
        return dataSource.getConnection();
    } 
}