Monday, March 5, 2012

Why Spring Over EJB?

1. EJB is Complicated - To implement any functionality we need to touch at least 4 files business Interface,Home Interface,Beans and Deployment Descriptor.However with Spring it works on POJO and can use AOP for further services.

2. EJB is Invasive - In order to implement an interface in EJB we need to use Javax.ejb interface.There is a tight coupling with the EJB and code always requires an EJB container for it to work.however in the case of Spring there is no such direct dependancy on Spring code.

3. Entity Ejb's are not as mature as the ORM frameworks avaliable like Hibernate etc.Spring provides an excellent integration with these ORM frameworks.

No comments:

Post a Comment