Skip to Main Content
Building Java Enterprise Applications
book

Building Java Enterprise Applications

by Brett McLaughlin
March 2002
Intermediate to advanced content levelIntermediate to advanced
320 pages
8h 58m
English
O'Reilly Media, Inc.
Content preview from Building Java Enterprise Applications

Chapter 4. Entity Basics

This chapter will look at entity beans as a means of accessing the Forethought application’s data storage. I’ll begin with simple entity beans to provide application entry points to the database, and address many questions common to entity bean development. Should you pass around the entity bean? Should you access the data exclusively through session beans, or directly through the entity beans? What are details objects, façade patterns, and good principles of entity bean design? All these questions will be answered, as I discuss not just writing EJB code, but writing effective EJB code.

At the end of this chapter, you will have the first entity bean created and deployed, ready for use. More importantly, you will have a good understanding of basic entity bean programming practices; you’ll have looked at using container-managed persistence, package and class naming, handling method exposure through the remote interface, and more. In other words, you’ll be ready for any basic entity bean problem that comes along, as well as for the advanced topics I’ll address in Chapter 5.

Basic Design Patterns

To access the data that will be stored in the database, you can use EJB’s entity bean functionality. Keep in mind, however, that this is not by any means a book on how to write Enterprise JavaBeans; for that I recommend Richard Monson-Haefel’s excellent book, Enterprise JavaBeans (O’Reilly). Here, I’ll simply focus on using EJBs correctly, and detail some useful design ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Enterprise Web Programming with Java

Enterprise Web Programming with Java

O'Reilly Media, Inc.
Modernizing Enterprise Java

Modernizing Enterprise Java

Markus Eisele, Natale Vinto

Publisher Resources

ISBN: 0596001231Supplemental ContentCatalog PageErrata