• Post Reply Bookmark Topic Watch Topic
  • New Topic

Disadvatages of using EJB entity beans

 
Mohana Murali
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anybody knows what are the disadvantages of using EJB enitity beans? And when I need to consider using them ?
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Lots of additional code. Just as with Session Beans an Entity Bean require a minimum of 3 classes per bean (more if you include Local and Remote Interfaces). This can be offset utilizing tools such as Ant and Xdoclet.
2. No support for polymorphism or inheritance. Can be hacked to make it work but it is not pretty as opposed plain Java classes or JDO.
3. Additional overhead of Entity Beans hurt performance, especially if used remotely.
4. Additional creation of DTOs are usually recommended. As opposed to JDO where this is not neccessary.
5. Entity Beans take a lot longer to build and deploy than normal Java classes. This may not be an issue for a small handful of Entity Beans but this time really adds up when the number approachs 50 and beyond.
6. Entity Bean automatic persistance (CMP 2.0) isn't all it is cracked up to be. See this thread for a glimpse.
7. The whole process of learning to use Entity Beans effectively has a very steep curve.
 
Mohana Murali
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great Info, Thx Chris
 
Jeremy Hare
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at the flip side what are the advantages of entity bean? and whats JDO?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!