public class DataSourceConnectionProvider extends Object implements ConnectionProvider
Constructor and Description |
---|
DataSourceConnectionProvider(DataSource dataSource)
Initialize the Connection Provider, using given
dataSource to obtain new connections. |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Returns a connection, ready for use.
|
public DataSourceConnectionProvider(DataSource dataSource)
dataSource
to obtain new connections.dataSource
- The DataSource to obtain connections frompublic Connection getConnection() throws SQLException
ConnectionProvider
getConnection
in interface ConnectionProvider
SQLException
- when an error occurs obtaining the connectionCopyright © 2010–2019. All rights reserved.