Can we use sqlMapTransactionManager.startTransaction (), in the similar way for commitTransaction() and endTransaction()?
Or we should use only sqlMapclienr.startTransaction()? _____ From: James, Steven [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 02, 2006 9:15 AM To: [email protected] Subject: RE: Is this the right way to use commitment control 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.
<<attachment: winmail.dat>>
