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.

Comments

Popular posts from this blog

'jasypt.encryptor.password' or one of ['jasypt.encryptor.privateKeyString', 'jasypt.encryptor.privateKeyLocation'] must be provided for Password-based or Asymmetric encryption

Field or property 'jobParameters' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - Spring Batch

Couldn't store job: Unable to serialize JobDataMap for insertion into database because the value of property 'jobLauncher' is not serializable