Part III. EJB and Persistence

By now we’ve explored the various actions we can take within server-side component models. Of course, actions are nothing unless performed by some thing, and in EJB we address the nouns of our application via entity beans.

An entity is EJB’s integration point with Java Persistence, a simple POJO that maps to an underlying relational database. By this mechanism, we’re free to deal with objects as we’re most comfortable—in Java—and we leave it to the container to translate simple method invocations to the appropriate SQL queries.

Additionally, we can form complex relationships between entity types, allowing us to form an object graph view of a database schema. The focus of entities is again on the ease-of-use provided to us as application developers, and under the hood the container may perform optimizations to keep things running efficiently.

These next chapters detail Java Persistence as it pertains to Enterprise Java Beans.

Get Enterprise JavaBeans 3.1, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.