This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes stateful DAO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "stateful DAO" Watch "stateful DAO" New topic

stateful DAO

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 576
Anybody can explain how to make DAO as stateful
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17260

Personally, I wouldn't. You are now defeating the purpose of a DAO. Now you might hold on to things like an EntityManager or SessionFactory, but not any real application state. If you do, you are opening up a big can of concurrency issues to deal with, that will just make your life real difficult.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
wood burning stoves
subject: stateful DAO