spring-framework / org.springframework.jdbc.datasource / SingleConnectionDataSource / <init>

<init>

SingleConnectionDataSource()

Constructor for bean-style configuration.

SingleConnectionDataSource(url: String, username: String, password: String, suppressClose: Boolean)

Create a new SingleConnectionDataSource with the given standard DriverManager parameters.

Parameters

url - the JDBC URL to use for accessing the DriverManager

username - the JDBC username to use for accessing the DriverManager

password - the JDBC password to use for accessing the DriverManager

suppressClose - if the returned Connection should be a close-suppressing proxy or the physical Connection

See Also
java.sql.DriverManager#getConnection(String, String, String)

SingleConnectionDataSource(url: String, suppressClose: Boolean)

Create a new SingleConnectionDataSource with the given standard DriverManager parameters.

Parameters

url - the JDBC URL to use for accessing the DriverManager

suppressClose - if the returned Connection should be a close-suppressing proxy or the physical Connection

See Also
java.sql.DriverManager#getConnection(String, String, String)

SingleConnectionDataSource(target: Connection, suppressClose: Boolean)

Create a new SingleConnectionDataSource with a given Connection.

Parameters

target - underlying target Connection

suppressClose - if the Connection should be wrapped with a Connection that suppresses close() calls (to allow for normal close() usage in applications that expect a pooled Connection but do not know our SmartDataSource interface)