1. 程式人生 > >EJB 2.0 VS EJB3.0

EJB 2.0 VS EJB3.0

SUMMARY:

Removal of home interface enabled simple lookup process in ejb 3.0<br>
EJB deployment descriptors are not required in ejb3.0<br>
Annotations are used in ejb3.0<br>
EJB 3.0 entity beans don’t have home and remote interfaces.<br>
EJB 3.0 entity beans/JPA becomes local. Remote annotations are not at all supported for entity beans.<br>
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<br>
Query is very flexible. Multiple levels of joins are enabled through the refined EJB-QL<br>
Can be used with pluggable third party persistence providers<br>
Security can be provided either through annotations or through deployment descriptors<br>
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:

<img src="http://www.blogjava.net/images/blogjava_net/lotusswan/16319/o_EJB2.1.JPG" alt="">

EJB3.0:

?

?

?

<img src="http://www.blogjava.net/images/blogjava_net/lotusswan/16319/r_EJB3.0.JPG" alt="">

?

?