Your approach to transactions isn't going to work in iBATIS, and
likely not any other transactional framework either.
You should be demarcating transactions at a standard level within your
application. If you wish to make this simple on yourself, you could
use Spring, or I could start a discussion about how to use dynamic
proxies to achieve this.
In any case, I recommend against your current approach.
Cheers,
Clinton
On Thu, 24 Mar 2005 16:36:25 -0800, Narasimha Prasad <[EMAIL PROTECTED]> wrote:
> Is nested transaction supported? I have a method call within a transaction
> and the method in turn starts another transaction.
>
> Example:
>
> try
> {
> startTransaction
> code.....
> method();
>
> commitTransaction
> }
> finally {
> endTransaciton
> }
>
> ------------------------------
> public method()
> {
> try
> {
> startTransaction
> code..
> commitTransaction
> }
> finally
> {
> endTransaciton
> }
> }
>
> Thanks,
> Prasad
>
> DBO2 Inc
> 650-587-0106
>
> -----Original Message-----
> From: Mark Alcocer Flores [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 18, 2005 9:18 AM
> To: [email protected]
> Subject: Question about transactions.
>
> I have a problem. I recently upgraded from the 1.2
> iBatis version to the new 2.0 iBatis version. Because
> of the database I connect to, I controled transactions
> manually. I use the startTransaction method to start
> the transaction and commitTransaction to commit it. If
> anything went wrong I used the rollbackTransaction to
> leave the database in a consistent state. In this new
> version os iBatis the rollbackTransaction method is
> not public and instead, the endTransaction method must
> be use, actually I call it always in a finally
> statement.
>
> The thing is that when there is an error in the
> database, in the old way, the connection close with
> not problems and everything was alrigth, but with the
> new way, the state of the database is inconsistent
> sometimes and the connection remains open.
>
> Can anyone give me an idea of what can I do? I think i
> could go back to the old version, but this new version
> has so many good features that i wouldn't want to
> leave them.
>
> Thanks in advance.
>
> Mark.
>
> The Greatest Thing You'll Ever Learn
> It's Just To Love And Be Loved In Return
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 3/15/2005
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.8.1 - Release Date: 3/23/2005
>
>