public class DriverManagerDataSource extends Object implements DataSource
| Constructor and Description |
|---|
DriverManagerDataSource(String driverClassName,
String jdbcUrl,
String user,
String password) |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection() |
Connection |
getConnection(String user,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int timeoutSeconds) |
void |
setLogWriter(PrintWriter logWriter) |
<T> T |
unwrap(Class<T> iface) |
public DriverManagerDataSource(String driverClassName, String jdbcUrl, String user, String password) throws SQLException
SQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String user, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic PrintWriter getLogWriter()
getLogWriter in interface CommonDataSourcepublic void setLogWriter(PrintWriter logWriter)
setLogWriter in interface CommonDataSourcepublic void setLoginTimeout(int timeoutSeconds)
setLoginTimeout in interface CommonDataSourcepublic int getLoginTimeout()
getLoginTimeout in interface CommonDataSourcepublic boolean isWrapperFor(Class<?> iface)
isWrapperFor in interface WrapperCopyright © 2017. All rights reserved.