Chapter 12. Bean-managed persistence

Overview

When using bean-managed persistence, the developer writes the Java code that synchronizes the EJB’s internal state with the underlying database. This chapter describes in detail how to accomplish this. We begin by summarizing the developer’s responsibilities, then describe step-by-step how to code, compile, assemble, deploy, and test a fully featured entity EJB, which supports reads, writes, insertions, and deletions, single-object finders, multiobject finders, and home methods. The example also presents the use of data access objects (DAOs) to decouple the EJB implementation from the data store. Finally, the chapter provides some advice on how more complex constructs like persistent associations ...

Get Applied Enterprise JavaBeans™ Technology 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.