@Beta public final class PooledDataSource extends Object implements DataSource
Constructor and Description |
---|
PooledDataSource(int coreSize,
int maxSize,
String driverName,
String url,
String user,
String password) |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
<T> T |
unwrap(Class<T> iface) |
public PooledDataSource(int coreSize, int maxSize, String driverName, String url, String user, String password) throws ObjectCreationException
ObjectCreationException
public Connection getConnection() throws SQLException
getConnection
in interface DataSource
SQLException
public Connection getConnection(String username, String password)
getConnection
in interface DataSource
public PrintWriter getLogWriter()
getLogWriter
in interface CommonDataSource
public void setLogWriter(PrintWriter out)
setLogWriter
in interface CommonDataSource
public void setLoginTimeout(int seconds)
setLoginTimeout
in interface CommonDataSource
public int getLoginTimeout()
getLoginTimeout
in interface CommonDataSource
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
public boolean isWrapperFor(Class<?> iface)
isWrapperFor
in interface Wrapper
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
Copyright © 2014. All rights reserved.