org.apache.ibatis.logging.jdbc
Class ConnectionLogger
java.lang.Object
org.apache.ibatis.logging.jdbc.BaseJdbcLogger
org.apache.ibatis.logging.jdbc.ConnectionLogger
- All Implemented Interfaces:
- InvocationHandler
public class ConnectionLogger
- extends BaseJdbcLogger
- implements InvocationHandler
Connection proxy to add logging
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
invoke
public Object invoke(Object proxy,
Method method,
Object[] params)
throws Throwable
- Specified by:
invoke
in interface InvocationHandler
- Throws:
Throwable
newInstance
public static Connection newInstance(Connection conn)
- Creates a logging version of a connection
- Parameters:
conn
- - the original connection
- Returns:
- - the connection with logging
getConnection
public Connection getConnection()
- return the wrapped connection
- Returns:
- the connection
Copyright © 2010. All Rights Reserved.