PDA

View Full Version : Using NHibernate without DAOs


marceloh
02-26-2006, 04:47 AM
I'm new to Spring, I don't know if i'm asking something stupid, but, is it possible to use Spring/NH integration without DAOs?

I think I don't need them in my small project. It's enough for me to use Hibernate session capabilities, like Save, SaveorUpdate or Delete, but I want the benefits of NH/Spring Integration: not having to obtain the session, open transaction, etc. I only want to program "business transactions" that could be atomic or composed (one BT calling another BT), with attributes like Transaction(Required), Transaction(RequieresNew), etc. The Transaction that is at the top of the stack should call transaction commit when it finish.