Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DAO with an Entity Bean using BMP  RSS feed

 
Eugene Sun
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In one of the INESystems mock exams, DAO with an Entity Bean using BMP is said to be

1) reduced dependency on data base
2) easier path to change the bean to CMP

I understand 1), but how is 2) true ?

Thanks,
Eugene
 
I Roberts
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is much easier to change a POJO than a EJB as an EJB is obviously a more complex object. Another advantage is that a DAO may be reused by one or more EJBs and not specifically a Entity JavaBean, while putting SQL in an Entity JavaBean could (in a bad design scenario) be potentially duplicating SQL in a DAO or another Entity JavaBean. As strange as it appears, this actually happens! Why? Well, old Entity JavaBean designs actually thought that it was more efficient to duplicate SQL direct in the EJB rather than consolidate SQL in a single POJO.

Hope this helps!?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!