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 Tom Henricksen <To...@A-t-g.com> on 2007/05/09 20:19:10 UTC

Transaction started

I have some code that could be called when a transaction is already
started or when there isn't one.  I was hoping for some like

SqlMapSession.transactionStarted() and then call
SqlMapSession.startTransaction() if it isn't or tap into the existing
one somehow.  Is this possible or maybe there is a better way?

 

Thanks,

Tom


Re: Transaction started

Posted by Chris Lamey <cl...@localmatters.com>.
Hello,

If I were you, I'd take a look at the Spring declarative transaction
handling.  Using that means no explicit transaction handling in your
code so you don't have to muck with Connection stuff.  And you can set
things up on a per-method basis to either create a new transaction or
join an existing one, again with no changes to your code.

Cheers,
Chris

On Wed, 2007-05-09 at 13:19 -0500, Tom Henricksen wrote:
> I have some code that could be called when a transaction is already
> started or when there isn’t one.  I was hoping for some like
> 
> SqlMapSession.transactionStarted() and then call
> SqlMapSession.startTransaction() if it isn’t or tap into the existing
> one somehow.  Is this possible or maybe there is a better way?
> 
>  
> 
> Thanks,
> 
> Tom
> 
>