File size: 1,108 Bytes
2795186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
 * 
 */
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 {

	}

	public boolean commit() throws SQLException {

		return true;
	}

	public boolean rollback() throws SQLException {

		return true;
	}

	public boolean rollback(Savepoint s) throws SQLException {

		return true;
	}

	public boolean setAutoCommit(boolean flag) throws SQLException {

		return true;
	}

	public boolean setCatalog(String catalog) throws SQLException {

		return true;
	}

	public boolean transactionBegun() throws SQLException {
		transactionsBegun++;
		return true;
	}

	public boolean transactionCompleted() throws SQLException {
		transactionsCompleted++;
		return true;
	}

	public void destroy() {

	}

	public void init(com.mysql.jdbc.Connection conn, Properties props)
			throws SQLException {

	}

}