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