Hi All,
 
I would like to know expected behaviour of iBATIS JDBC transactions. Please see below code snippets and details for the same.
 
daoManager.startTransaction();
    insert("insertToTable1", Object1);
    insert("insertToTable2", Object2);
    update("updateTable3", Object3);
    delete("deleteFromTable1", Object1);
daoManager.commitTransaction();
 
Given above sequence of calls, assume that Thread1 is at update("updateTable3", Object3) call and Thread2 too entered into the same method where above exists.
 
Now
 
1) Will Thread2 be able to start another transaction before the tx1 got committed to DB, which was started by Thread1?
2) If Thread2 starts tx2, what would be the behaviour at DB level in this scenario?
3) If tx1 and tx2 are allowed simultaneously, is this called as nested transaction?
 
BTW, transaction manager type is JDB as you see below XML tags from sqlmap_config.xml.
 
<transactionManager type="JDBC">
    <dataSource type="JNDI">
      <property name="DataSource" value="java:comp/env/jdbc/abcDB"/>
    </dataSource>
  </transactionManager>
 
Please let me know your comments.
 
Thanks and regards,
Sreenivas
 
 

Reply via email to