File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on EJB

 
veena madhukar
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ricardo Ferreira
Ranch Hand
Posts: 156
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic