This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Case for EJB?

 
Josh Rehman
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to understand the problem that EJBs solve. So far the best I've come up with is that they handle some of the system-level issues that a "distributed, scalable" application needs.
However, this is so vague as to be useless. If this is a 50,000 ft view, I need a 10,000 ft view!
Thanks
 
Greg Whelan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I first looked at EJB I asked the same question. And reading Monson-Haefel's book was not especially conducive towards quickly understanding WTF EJBs are about.
From my perspective it's all about transactions. No transactions, no EJB. EJB makes it easier to build a transactional application.
The distributed, scalable, secure, reliable, etc. qualities are all likely to be needed in a transactional application... so you EJB containers give you those too.
The most concise explanation of why EJB is useful is on page 35 of Ed Roman's "Enterprise Java Beans" where he shows pseudocode for an explicit middleware application, versus the implicit middleware approach used by EJBs (his book is a better intro than the O'Reilly book, in my opinion, although I keep both handy).
It'll be interesting to hear from others who have a different perspective on EJBs...
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic