01: package liquibase.database;
02:
03: import java.sql.Connection;
04: import java.sql.SQLException;
05: import java.sql.Statement;
06:
07: public class HsqlConnectionDelegate extends SQLConnectionDelegate {
08:
09: public HsqlConnectionDelegate(Connection connection) {
10: super (connection);
11: }
12:
13: public void commit() throws SQLException {
14: super .commit();
15:
16: Statement st = null;
17: try {
18: st = createStatement();
19: st.execute("CHECKPOINT");
20: } finally {
21: if (st != null) {
22: st.close();
23: }
24: }
25: }
26:
27: public void rollback() throws SQLException {
28: super .rollback();
29:
30: Statement st = null;
31: try {
32: st = createStatement();
33: st.execute("CHECKPOINT");
34: } finally {
35: if (st != null) {
36: st.close();
37: }
38: }
39: }
40: }
|