public abstract class AbstractDataSource
extends java.lang.Object
implements javax.sql.DataSource
DataSource
implementations, taking care of the padding.
'Padding' in the context of this class means default implementations
for certain methods from the DataSource
interface, such as
getLoginTimeout()
, setLoginTimeout(int)
, and so forth.
DriverManagerDataSource
Modifier and Type | Field and Description |
---|---|
protected Log |
logger
Logger available to subclasses
|
Constructor and Description |
---|
AbstractDataSource() |
Modifier and Type | Method and Description |
---|---|
int |
getLoginTimeout()
Returns 0, indicating the default system timeout is to be used.
|
java.io.PrintWriter |
getLogWriter()
LogWriter methods are not supported.
|
java.util.logging.Logger |
getParentLogger() |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
setLoginTimeout(int timeout)
Setting a login timeout is not supported.
|
void |
setLogWriter(java.io.PrintWriter pw)
LogWriter methods are not supported.
|
<T> T |
unwrap(java.lang.Class<T> iface) |
protected final Log logger
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public void setLoginTimeout(int timeout) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.CommonDataSource
public void setLogWriter(java.io.PrintWriter pw) throws java.sql.SQLException
setLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public java.util.logging.Logger getParentLogger()
getParentLogger
in interface javax.sql.CommonDataSource