Use openSession() twice...don't call .startTransaction directly on the SqlMapClient for either of them.
Cheers,
Clinton
On 7/5/06,
Hoyoung Hwang <[EMAIL PROTECTED]> wrote:
thans for your answer.but, i need not nested transaction.(yes, if ibatis support that, i use that model.)i want to use muliple transaction (or connection) model.i need second transaction is commit immediately.not dependent first transaction.in first transaction is processing,another transaction can commit at same thread.in example--------------sqlmapclient.startTransaction(); //first transaction startsqlmapclient.insert("table.insert",table);newTrans = sqlmapclient.openSession();newTrans.startTransaction(); //second transaction start , but it is not work.newTrans.insert("logtable.insert",logtable);newTrans.commitTransaction();sqlmapclient.delete("table.delete",null);sqlmapclient.commitTransaction();
On 7/6/06, Clinton Begin <[EMAIL PROTECTED] > wrote:
Regardless....the JDBC driver and/or database likely doesn't support this. Few databases do. I think Sybase (and SQL Server?) support nested transactions, but they're not recommended. Oracle supports savepoints, which is somewhat cleaner...but ideally you should probably just simplify your transaction model so that this isn't required.
Clinton
On 7/5/06, Jeff Butler <[EMAIL PROTECTED] > wrote:iBATIS does not support nested transactions like this.Jeff Butler
On 7/3/06, Hoyoung Hwang <[EMAIL PROTECTED]> wrote:i can't use muitple transaction.how can i use mutiple transction?i don't use daoManager. just using SqlMap.example.sqlmapclient.startTransaction();sqlmapclient.insert("table.insert",table);newTrans = sqlmapclient.openSession();newTrans.startTransaction();newTrans.insert("logtable.insert",logtable);newTrans.commitTransaction();sqlmapclient.delete("table.delete",null);sqlmapclient.commitTransaction();please let me know.
