O'Reilly logo

Mastering Hibernate by Ramin Rad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EJB

If you ever created an EJB application using older versions of JEE specifications, J2EE, you would remember that data persistence was achieved using Entity Beans, which implemented the javax.ejb.EntityBean interface, and you had to implement all those horrifying methods and provide different implementations, depending on the persistence nature of the entity bean, that is container-managed or bean-managed.

Thanks, mostly, to Hibernate, the Java Persistence API (JPA) was born to simplify the implementation. In the next section, we will see how to set up Hibernate as the entity manager when using EJB 3.

Persistence unit

In the JPA world, the Entity Manager represents the persistence unit. It is defined by the javax.persistence.EntityManager interface. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required