본문 바로가기

IT/Web

[MyBatis] insert 구문에서 session.commit() 적용

session.commit() 적용 전



 : sqlSession created

 : Openning JDBC Connection

 : Checked out connection 31516585 from pool.

 : Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@1e0e7a9]

 : ooo Using Connection [com.mysql.jdbc.JDBC4Connection@1e0e7a9]

 : ==>  Preparing: INSERT INTO SDK_SMS_SEND(USER_ID, SUBJECT, SMS_MSG, NOW_DATE, SEND_DATE, CALLBACK, DEST_COUNT, DEST_INFO, RESERVED1, SEND_COUNT) VALUES('myshuttle', ?, ?, sysdate()+0, ?, ?, ?, ?, ?, '3') 

 : ==> Parameters: 고객 전송 문자(String), 안녕하세요.(String), 20120401010101(String), 020000000(String), 2(Integer), sklee^00010001000|iu^00010002000(String), admin(String)

 : ooo Using Connection [com.mysql.jdbc.JDBC4Connection@1e0e7a9]

 : ==>  Preparing: SELECT LAST_INSERT_ID(); 

 : ==> Parameters: 

 : <==    Columns: LAST_INSERT_ID()

 : <==        Row: 21

 : Rolling back JDBC Connection [com.mysql.jdbc.JDBC4Connection@1e0e7a9]

 : Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@1e0e7a9]

 : Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@1e0e7a9]

 : Returned connection 31516585 to pool.

 : sqlSession closed






session.commit() 적용 후



 : sqlSession created

 : Openning JDBC Connection

 : Checked out connection 6826369 from pool.

 : Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@682981]

 : ooo Using Connection [com.mysql.jdbc.JDBC4Connection@682981]

 : ==>  Preparing: INSERT INTO SDK_SMS_SEND(USER_ID, SUBJECT, SMS_MSG, NOW_DATE, SEND_DATE, CALLBACK, DEST_COUNT, DEST_INFO, RESERVED1, SEND_COUNT) VALUES('myshuttle', ?, ?, sysdate()+0, ?, ?, ?, ?, ?, '3') 

 : ==> Parameters: 고객 전송 문자(String), 안녕하세요.(String), 20120401010101(String), 020000000(String), 2(Integer), sklee^00010001000|iu^00010002000(String), admin(String)

 : ooo Using Connection [com.mysql.jdbc.JDBC4Connection@682981]

 : ==>  Preparing: SELECT LAST_INSERT_ID(); 

 : ==> Parameters: 

 : <==    Columns: LAST_INSERT_ID()

 : <==        Row: 22

 : Committing JDBC Connection [com.mysql.jdbc.JDBC4Connection@682981]

 : Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@682981]

 : Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@682981]

 : Returned connection 6826369 to pool.

 : sqlSession closed