• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cant we use DAO with statefull session beans?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
then DAO is best used with what EJB's?
 
Pavel Grushetzky
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally you would use DAO for BMP entity beans.

However, if you decide not to use entity beans, noone can stop you from using DAO directly from session beans.
 
Santosh Pasupuleti
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yamini,

As Pavel said "noone can stop you from using DAO directly from session beans." is absolutely right.

But you will have to sacrifice the goodies that you get from Entity beans like declarative deployment. Entity beans (CMP)take care of the synchronization and transaction management is awesomely done and you have the home (business) methods which come handy which you can not perform if you do DAO directly from session beans.


Regards
Santosh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic