views:

17

answers:

1

Hi, The title pretty much says it all, as an example you can think of a hibernate transaction and a class which begins one for a thread, commits and rollbacks, Or a class which gets a session, closes it and flushes it (both examples are with the threadlocal pattern in mind).

Thanks

+1  A: 

UnitOfWork?

See http://ayende.com/blog/archive/2007/06/08/rhino-commons-repositorylttgt-and-unit-of-work.aspx .

Andreas Paulsson
+1 A classic Fowler PoEAA pattern that I am a big fan of. http://martinfowler.com/eaaCatalog/unitOfWork.html
joseph.ferris