• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB overuse

 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have heard Thomas Paul and several others mention that EJB gets overused. With the inclusion of local interfaces it appears that EJB is a great way to handle business logic. When is EJB overkill?
 
Vladimir Ergovic
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out:
http://www2.theserverside.com/books/EJBDesignPatterns/index.jsp
In this PDF you have all details when and why
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your application does not need distributed objects (ie you only have a web interface), has no transactioning requirements, and has simple database interaction then I would say EJB is overkill.
Basically for a simple database driven website, EJB is overkill. Not using EJBs doesn't mean you still shouldn't separate your business logic from your presentation however. A lot of people are under the impression that EJB is the only game in town with it comes to modularizing business logic. I find POJO (Plain old Java Objects) work just as well, even better in terms of useability.
The one thing that I find most of my projects can't live without, okay I can't live without , is Message Driven Beans. These alone make me want to embrace EJB for any application that needs asynchronous processing.
Session Beans are great for providing coarse-grain interfaces to business services. As I have stated here before, I don't like Entity Beans. I would much prefer JDO when it becomes widely available.
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JDO can be used in an EJB framework?
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Adam Hardy:
JDO can be used in an EJB framework?

What is there to stop one from doing so?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!