• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB - just a hype or absolutely necessary?

 
Brian Smith
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
EJB has been out there for a while and been used in industries. I know it helps with data persistency taking care of all the low level data persistence. But I have also heard its downside being slow performance and taking more resources. my questions to EJB supporter or implementors, is EJB absolutely necessary or what are the situation EJB is a must? can't we just use other persistence framework like JDO or Hibernate instead so that we can get the EJB's work done with high performace?
thanks.
[ December 06, 2004: Message edited by: Tulsi Rai ]
 
Bruno Collet
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB is not only for persistence. The EJB container offers a number of services including life cycle management, security, transactions, distribution, etc. (see J2EE tutorial).
Whether you should use EJB or not depends on whether you need these services or not. If you need a significant number of these services, then you should consider using EJB. Why? Because you need either to use another framework or implement the services yourself (which is very time-consuming). In contrast, if you don't need these services then EJB might be overkill for your application. In conclusion this is a trade-off between performance cost and features. But bear in mind that most entreprise applications need most or all of these services. Also, there are several EJB best practices and optimizations that significantly reduce the performance cost.
 
Peter Rooke
Ranch Hand
Posts: 851
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at some of the previous postings - this subject been discussed before. I've only been a member for three months, but have seen this asked a few times. I'm not going to try to answer, but two things to know:

1) EJB's are for distributed transactional systems - that’s why there’s a lot of overhead. The key world is distributed.

2) EJB3 will hopefully make entity beans easier to develop and maintain.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB is 90% hype, 10% substance.
That is, 90% of projects using EJB would have been better (read: cheaper, better performant, easier to maintain) had EJB not been used.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic