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.
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
posted 13 years ago
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...