The Enterprise JavaBeans (EJB) 3.0 specification has facilitated the development of EJBs by providing an annotations-based API in which the remote/local and home/local home interfaces are not required. The deployment descriptors that form the basis of an EJB 2.0 entity bean are also not required for deploying an EJB 3.0 entity bean. In Chapter 1, we discussed the new features in EJB 3.0. This chapter covers the procedure to convert an EJB 2.0 Entity to an EJB 3.0 Entity.
The EJB 3.0 entity bean classes are simplified in comparison to the EJB 2.0 specification classes. The EJB 3.0 entity class is a Plain Old Java Object (POJO) instead of a class implementing the
EntityBean interface. The component interfaces in EJB 2.0, which were required to extend the
EJBLocalObject/EJBObject and home interfaces, which were required to extend the
EJBLocalHome/EJBHome interfaces, are replaced with the
javax.persistence.EntityManager API to create...