EJB 2.0 VS EJB3.0

SUMMARY:

Removal of home interface enabled simple lookup process in ejb 3.0
EJB deployment descriptors are not required in ejb3.0
Annotations are used in ejb3.0
EJB 3.0 entity beans don’t have home and remote interfaces.
EJB 3.0 entity beans/JPA becomes local. Remote annotations are not at all supported for entity beans.
EJB 3.0 beans don’t implement the standard interfaces like javax.ejb.SessionBean and hence no need to implement the container call back methods like ejbActivate() etc
Query is very flexible. Multiple levels of joins are enabled through the refined EJB-QL
Can be used with pluggable third party persistence providers
Security can be provided either through annotations or through deployment descriptors
POJO like EJB 3.0 entities become lightweight and easy to convert from a DAO to Entity bean or vice versa. Since EJB 3 entities don’t need implement any interface.

 

GRAPHIC:

EJB2.0:

EJB 2.0 VS EJB3.0

EJB3.0:

 

 

 

EJB 2.0 VS EJB3.0

 

 

你可能感兴趣的:(EJB3)