File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: stateful DAO