automation/tincrepo/main/mpp/common/utilities/ccl/connectivity/jdbc/TestJDBCTransactionCommit.java [9:34]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static void main(String[] argv){
        try {
            JDBCCommon jdbc = new JDBCCommon();
            if (!jdbc.createTable("jdbctable", "CREATE TABLE jdbctable (a int)")) {
                System.exit(1);
            }
           
            try {
                ConnectionManager cm = new ConnectionManager();
                Connection conn = cm.getConnection();
                if (conn == null) {
                    System.out.println("connect fail");
                    System.exit(1);
                }
                System.out.println("connect success :" + cm.getUrl());

                int a1 = 1;
                int a2 = 2;

                conn.setAutoCommit(false);
                PreparedStatement pstmt = conn.prepareStatement("INSERT INTO jdbctable VALUES (?)");
                pstmt.setInt(1, a1);
                pstmt.executeUpdate();

                pstmt.setInt(1, a2);
                pstmt.executeUpdate();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



automation/tincrepo/main/mpp/common/utilities/ccl/connectivity/jdbc/TestJDBCTransactionRollback.java [9:34]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static void main(String[] argv){
        try {
            JDBCCommon jdbc = new JDBCCommon();
            if (!jdbc.createTable("jdbctable", "CREATE TABLE jdbctable (a int)")) {
                System.exit(1);
            }
           
            try {
                ConnectionManager cm = new ConnectionManager();
                Connection conn = cm.getConnection();
                if (conn == null) {
                    System.out.println("connect fail");
                    System.exit(1);
                }
                System.out.println("connect success :" + cm.getUrl());

                int a1 = 1;
                int a2 = 2;

                conn.setAutoCommit(false);
                PreparedStatement pstmt = conn.prepareStatement("INSERT INTO jdbctable VALUES (?)");
                pstmt.setInt(1, a1);
                pstmt.executeUpdate();

                pstmt.setInt(1, a2);
                pstmt.executeUpdate();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



