File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "stateful DAO" Watch "stateful DAO" New topic
Author

stateful DAO

jacob deiter
Ranch Hand

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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: stateful DAO
 
Similar Threads
Tech Word Game
Question on EJB
ejb with DAO
Confusion - CMP vs Session EJB > DAO
Command pattern doutb