ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Dave" <rash...@persistent.co.in>
Subject Nested Transactions
Date Tue, 14 Mar 2006 10:20:36 GMT
Hi All,

I am not sure if this is a silly/obvious question, however, here goes:

I have a function called CreateABC. This starts a transaction, inserts into
the DB and then commits the transaction and finally stops it.

I have another function which is called CreateXYZ. This function also does
the same thing. However, it also calls CreateABC internally since ABC needs
to be created as part of creation of XYZ. 

CreateABC - 
Start T1
Insert ABC
Commit T1

CreateXYZ - 
Start T2
Insert X
Insert Y
Insert Z
Commit T2

What I want to know is, in case Insert Z fails, and a rollback needs to be
done, will ABC, X and Y get rolled back? I am using Abator generated classes
for ibatis...



View raw message