|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.repo.jdbc.LoggingDataSource
public class LoggingDataSource
Wraps another DataSource such that all SQL statements are logged as debug.
| Method Summary | ||
|---|---|---|
void |
close()
|
|
static DataSource |
create(DataSource ds)
Wraps the given DataSource which logs to the default log. |
|
static DataSource |
create(DataSource ds,
org.apache.commons.logging.Log log)
Wraps the given DataSource which logs to the given log. |
|
Connection |
getConnection()
|
|
Connection |
getConnection(String username,
String password)
|
|
int |
getLoginTimeout()
|
|
PrintWriter |
getLogWriter()
|
|
boolean |
isWrapperFor(Class<?> iface)
|
|
void |
setLoginTimeout(int seconds)
|
|
void |
setLogWriter(PrintWriter writer)
|
|
|
unwrap(Class<T> iface)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DataSource create(DataSource ds)
public static DataSource create(DataSource ds,
org.apache.commons.logging.Log log)
public Connection getConnection()
throws SQLException
getConnection in interface DataSourceSQLException
public Connection getConnection(String username,
String password)
throws SQLException
getConnection in interface DataSourceSQLException
public PrintWriter getLogWriter()
throws SQLException
getLogWriter in interface CommonDataSourceSQLException
public void setLogWriter(PrintWriter writer)
throws SQLException
setLogWriter in interface CommonDataSourceSQLException
public void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLException
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLException
public void close()
throws SQLException
SQLException
public <T> T unwrap(Class<T> iface)
throws SQLException
unwrap in interface WrapperSQLException
public boolean isWrapperFor(Class<?> iface)
throws SQLException
isWrapperFor in interface WrapperSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||