You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by chialda <va...@gmail.com> on 2007/02/02 14:10:55 UTC
Re: Autocommit not properly handled in Ibatis.
i think your problem is that you're trying to make a transaction inside
another transaction. The inside transaction is commited because of a good
sql, but the outside one, is ended without commit. Be aware of that.
Yuvraj Shinde wrote:
>
> Hi all,
>
>
>
> I want to know how to handle auto commit in ibatis.if I am saving two
> records and if I get an exception while saving second record the first
> record saved should be rolled back.
>
> But ibatis is saving the first record. How I should handle this even
> though the auto commit property is explicitly set to false.
>
>
>
> Even though AutoCommit value is set to false. Rollback of Transaction
> is not working.
>
> I found one Issue in GeneralStatement.java.
>
> On line 52 request.getSession().setCommitRequired(true);
>
>
>
> Here Auto commit is hard coded it should be parameterized so that it
> will take value from "Auto commit" property of SqlMapConfig.xml.
>
> Please correct me if I am wrong.please send me a solution.
>
>
>
> Regards
>
> Yuvrajs
>
>
>
>
>
>
>
>
>
> Yuvraj Shinde * Senior Software Engineer - Zainet* SunGard * Offshore
> Services *
> Pride Portal,CTS No 103A/5A/1A/1B Bhamburda,Senapati Bapat Road,
> shivajinagar,Pune 411016
> Tel Direct +91 20 66248045 * Main +91 20 66248000 * Fax +91 20 25606222
> yuvraj.shinde@sos.sungard.com * www.sungard.com
>
>
>
> Success is never ending and failure is never final.
>
>
>
>
>
--
View this message in context: http://www.nabble.com/Autocommit-not-properly-handled-in-Ibatis.-tf3038413.html#a8766614
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.