⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testlifecycleinterceptor.java

📁 mysql5.0 JDBC 驱动 放在glassfish或者tomcat的lib文件夹下就可以了
💻 JAVA
字号:
/** *  */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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -