On Tue, Dec 8, 2009 at 11:57 AM, Jeppe Nejsum Madsen <je...@ingolfs.dk>wrote:
> deadfolk <deadf...@gmail.com> writes: > > > Hi Jeppe - thanks for your response. > > > > So, am I correct in saying that I just need to do something like > > this? (not tested code - just an approximation) > > > > //Assuming fooDb and barDb are some form of connection wrapper... > > > > S.addAround(List(new LoanWrapper { > > def apply[T](f: => T): T = { > > fooDb.begin > > barDb.begin > > try { > > val result = f > > barDb.commit > > fooDb.commit > > result > > } > > catch { > > case e => { > > barDb.rollback > > fooDb.rollback > > } > > } > > } > > })) > > Something like that yes :-) > ... with automatic transaction retries, and very verbose error messages if one transaction commits and not the other? :) alex -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.