This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Originally posted by veena madhukar: When would you use the DAO patterns in regards to a stateful session bean?
a> When using BMP to reduce the dependence on underlying datastore.
b> You would not use DAO with Stateful session beans.
Choice A is the correct answer.
There are time that you need to access BMP entity Beans by an facade represented by an Stateful Session Bean. When using BMP, it is a very good approach use the DAO pattern to reduce the dependency between the beans and the underlying datastore.