testlifecycleinterceptor.java

来自「mysql5.0 JDBC 驱动 放在glassfish或者tomcat的li」· Java 代码 · 共 67 行

JAVA
67
字号
/** *  */package testsuite.simple;import java.sql.SQLException;import java.sql.Savepoint;import java.util.Properties;import com.mysql.jdbc.ConnectionLifecycleInterceptor;public class TestLifecycleInterceptor implements ConnectionLifecycleInterceptor {	static int transactionsBegun = 0;	static int transactionsCompleted = 0;		public void close() throws SQLException {		// TODO Auto-generated method stub			}	public boolean commit() throws SQLException {		// TODO Auto-generated method stub		return true;	}	public boolean rollback() throws SQLException {		// TODO Auto-generated method stub		return true;	}	public boolean rollback(Savepoint s) throws SQLException {		// TODO Auto-generated method stub		return true;	}	public boolean setAutoCommit(boolean flag) throws SQLException {		// TODO Auto-generated method stub		return true;	}	public boolean setCatalog(String catalog) throws SQLException {		// TODO Auto-generated method stub		return true;	}	public boolean transactionBegun() throws SQLException {		transactionsBegun++;		return true;	}	public boolean transactionCompleted() throws SQLException {		transactionsCompleted++;		return true;	}	public void destroy() {		// TODO Auto-generated method stub			}	public void init(com.mysql.jdbc.Connection conn, Properties props)			throws SQLException {		// TODO Auto-generated method stub			}	}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?