Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What features does EJB3 bring and also how does EJB3 stack up with the Spring Framework? [closed]

I have never worked on ejb, when I started programming Spring was already arrived and all my projects have been with Spring only, recently I had one interview and they wanted knowledge of EJB3.0 and so I want to know how does EJB3.0 stack up with Spring Framework and why many projects nowadays are with Spring Framework and not with EJB3.0, do not quote me here as I can be wrong

I would really appreciate if difference and benefits of using one over another could be explained from practical perspective.

Note Please do not give wiki links as answer as I want to understand actually how both this technology stack up.

Update Also what would be best way to start learning for EJB3, what are the recommended Books, Online Tutorial for the same ?

like image 651
Rachel Avatar asked Dec 22 '10 22:12

Rachel


1 Answers

EJB is a quite old technology (ca. 1999). However, until Version 3 of the standard, it was horribly inconvenient to use. Spring became popular as a sane alternative that offered some of the same core features (declarative transactions and security) as well as some new ones (dependency injection, AOP). It also integrated well with many other technologies such as Hibernate.

However, starting with V3.0, EJBs (or rather, the whole Java EE platform of which EJBs are a part) got a major overhaul and became much easier to use. Additionally, a lot of features made popular by various frameworks (including Spring) were made into official standards and added to Java EE.

Right now, the Java EE platform is gaining a lot of ground vs. Spring in terms of popularity, since they're about even in ease of use and features, and Java EE has the advantage of being based on open standards with multiple implementations for most component. At the same time, it seems to me Spring is having problems keeping up with the state of the art when it comes to integrating with other frameworks (which used to be its strength).

like image 131
Michael Borgwardt Avatar answered Nov 10 '22 00:11

Michael Borgwardt