How would you call a life-cycle management class?
As an example you can think of a h开发者_JAVA技巧ibernate 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).
UnitOfWork?
See http://ayende.com/blog/archive/2007/06/08/rhino-commons-repositorylttgt-and-unit-of-work.aspx .
精彩评论