This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
EJBs are getting ridiculously complex and one cannot master them just by reading books or taking exam or attempting certain examples. Even if one is working with EJBs at work, it takes months to get a certain level of comfort.
So why use EJBs? Why not use SQLJ, JDO or even simple plain JDBC?
It is because EJB containers provide more functionalities than those technologies you had specified. For example, in case there is an exception involved a series of DB operations, if one of them has been failed, the whole transaction should be rollback. Then, you have to code for handling such events. For EJB, containers will cater all stuffs for you.
Although it is very complex, EJB 3.0 has tried to simplify EJB via POJO and make use of the idea of Hibernate. Let's see the improvement of the new EJB generation.