No you must have this in a try catch finally exception handler. An in the
finally section add endTransaction the code in here decides if a rollback is
called....
try{
sqlMapClient.startTransaction();
sqlMapClient.insert("insertCOHeader", coDataBean);
sqlMapClient.insert("insertCOCOmment", coComment);
sqlMapClient.insert("insertCOHeaderNotes", map);
sqlMapClient.insert("insertCOLineNotes", map);
// commit all transcations
sqlMapClient.commitTransaction();
}catch(Whatever exc e){
//you could of course just throw them so you could miss this part.
}finally{
sqlMapClient.endTransaction();
}________________________________ From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] Sent: Tue 02/05/2006 14:12 To: [email protected] Subject: Is this the right way to use commitment control Hi This is what i am doing in my code and want to confirm that it is the right way to use commitment control // start commitment control sqlMapClient.startTransaction(); sqlMapClient.insert("insertCOHeader", coDataBean); sqlMapClient.insert("insertCOCOmment", coComment); sqlMapClient.insert("insertCOHeaderNotes", map); sqlMapClient.insert("insertCOLineNotes", map); // commit all transcations sqlMapClient.commitTransaction(); How about dirty read, will this take of it Ashish This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
<<winmail.dat>>
