This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stateful DAO

 
jacob deiter
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody can explain how to make DAO as stateful
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic