Hi
I have a basic question. Whats the main difference between EJB 2.0 and EJB 3.0? I have done some work in EJB 2.0 but now I think I should switch to EJB 3.0.
Thanks.
Printable View
Hi
I have a basic question. Whats the main difference between EJB 2.0 and EJB 3.0? I have done some work in EJB 2.0 but now I think I should switch to EJB 3.0.
Thanks.
EJB 2.0 and EJB 3.0 both help you in the same way for what you pay for the EJB container. The central point about EJB 3.0 is that it has simplifed the life of developers.
How ?
1) Deployment Descriptors have been replaced by annotations that can be done in Java Code itself .
2) The Concept of using POJO probably inspired from the popularity of Spring Framework has been introduced simplifying the coding process.
3) Now you need not code the home and component interfaces that were pretty complex when you consider some simple business implemention. That was a real overhead in ejb 2.0 .
1. As part of ejb2.0 we are using EntityBeans for to access the database.But as part of ejb3.0 we are using the JPA(Java Persistance API) for to access the database and some portability issues.But this Api is same as some orm products like hibernate, Toplink, JDO. But JPA is better than these orm products in case of portability.Because it is using the same api called JPA.
2. EJB2.0 has Deployment descriptors but in EJB3.0 has no Deployment Descriptors.
3. EJB2.0 we have to write Home and Remote Interfaces But in EJB3.0 No need to write Home and remote interfaces.
4. In EJB3.0 We are identifying all entities with '@' symbol.