Preface
1. Introduction
Setting the Stage
Enterprise JavaBeans Defined
Distributed Object Architectures
Component Models
Component Transaction Monitors
CTMs and Server-Side Component Models
Titan Cruises: An Imaginary Business
What's Next?
2. Architectural Overview
The Enterprise Bean Component
Using Enterprise Beans
The Bean-Container Contract
Summary
3. Resource Management and the Primary Services
Resource Management
Primary Services
What's Next?
4. Developing Your First Enterprise Beans
Choosing and Setting Up an EJB Server
Developing an Entity Bean
Developing a Session Bean
5. The Client View
Locating Beans with JNDI
The Remote Client API
EJB 2.0: The Local Client API
6. EJB 2.0 CMP: Basic Persistence
Overview
The Customer EJB
Persistence Fields
Dependent Value Classes
Relationship Fields
7. EJB 2.0 CMP: Entity Relationships
The Seven Relationship Types
8. EJB 2.0 CMP: EJB QL
Declaring EJB QL
The Query Methods
EJB QL Examples
Problems with EJB QL
9. EJB 1.1 CMP
A Note for EJB 2.0 Readers
Overview for EJB 1.1 Readers
Container-Managed Persistence
10. Bean-Managed Persistence
The Remote Interface
The Remote Home Interface
The Primary Key
The ShipBean
Obtaining a Resource Connection
Exception Handling
The ejbCreate(
) Method
The ejbLoad(
) and ejbStore(
) Methods
The ejbRemove(
) Method
The ejbFind(
) Methods
The Deployment Descriptor
11. The Entity-Container Contract
The Primary Key
The Callback Methods
EJB 2.0: ejbHome(
)
EntityContext
The Life Cycle of an Entity Bean
12. Session Beans
The Stateless Session Bean
The Life Cycle of a Stateless Session Bean
The Stateful Session Bean
The Life Cycle of a Stateful Session Bean
13. Message-Driven Beans
JMS as a Resource
Message-Driven Beans
14. Transactions
ACID Transactions
Declarative Transaction Management
Isolation and Database Locking
Nontransactional Beans
Explicit Transaction Management
Exceptions and Transactions
Transactional Stateful Session Beans
15. Design Strategies
Hash Codes in Compound Primary Keys
Passing Objects by Value
Improved Performance with
Session
Beans
Bean Adapters
Implementing a Common Interface
Entity Beans Without Create Methods
EJB 1.1: Object-to-Relational Mapping Tools
Avoid Emulating Entity Beans with Session Beans
Direct Database Access from Session Beans
Avoid Chaining Stateful Session Beans
16. XML Deployment Descriptors
What Is an XML Deployment Descriptor?
The Contents of a Deployment Descriptor
The Document Header
The Descriptor's Body
Describing Enterprise Beans
EJB 2.0: Describing Relationships
Describing Bean Assembly
The ejb-jar File
17. Java 2, Enterprise Edition
Servlets
JavaServer Pages
Web Components and EJB
J2EE Fills in the Gaps
Fitting the Pieces Together
Future Enhancements
A. The Enterprise JavaBeans API
B. State and Sequence Diagrams
C. EJB Vendors
Index