ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rs" <rustyst...@myway.com>
Subject RE: A separate transaction for the logger
Date Fri, 05 May 2006 00:58:17 GMT


Am actually looking for a solution that does not involve Spring and/or AOP. We've got too
many frameworks as it is :)

> ...define that the LoggingDao gets a new transaction as opposed to 
> participating within the current transaction. This would suspend any current 
> transaction and begin a new Transaction that would operate outside of your 
> existing transaction

That's exactly what I'm looking for. But how can you start a new transaction that is out of
the scope of your current transaction if all your DAOs share a single instance of SqlMapClient?
The only solution I see is to create a new LoggerDAO that has it's own SqlMapClient instance.
I can do this without Spring or AOP, it's simply appears to be a clumsy solution, so I hope
there's a better way.

Thanks

 --- On Thu 05/04,  < Christopher.Mathrusse@sybase.com > wrote:
If you were to use the Spring Framework you could write 
a new Dao, LoggingDao, to handle inserts of your logging statements and 
define that the LoggingDao gets a new transaction as opposed to participating 
within the current transaction. This would suspend any current transaction and 
begin a new Transaction that would operate outside of your existing transaction 
and would cause your logging inserts to always commit, but you would need to 
decide if this were to occur before or after the execution of your other 
database activities. 
 


_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way  your home on the Web - http://www.myway.com



Mime
View raw message