| |
| |
Foreword | |
| |
| |
Preface | |
| |
| |
| |
The EJB 3.0 Standard | |
| |
| |
| |
Introduction | |
| |
| |
Server-Side Components | |
| |
| |
Persistence and Entity Beans | |
| |
| |
Asynchronous Messaging | |
| |
| |
Web Services | |
| |
| |
Titan Cruises: An Imaginary Business | |
| |
| |
What's Next? | |
| |
| |
| |
Architectural Overview | |
| |
| |
The Entity Bean | |
| |
| |
The Enterprise Bean Component | |
| |
| |
Using Enterprise and Entity Beans | |
| |
| |
The Bean-Container Contract | |
| |
| |
Summary | |
| |
| |
| |
Resource Management and Primary Services | |
| |
| |
Resource Management | |
| |
| |
Primary Services | |
| |
| |
What's Next? | |
| |
| |
| |
Developing Your First Beans | |
| |
| |
Developing an Entity Bean | |
| |
| |
Developing a Session Bean | |
| |
| |
| |
Persistence: Entity | |
| |
| |
Manager | |
| |
| |
Entities Are POJOs | |
| |
| |
Managed Versus Unmanaged Entities | |
| |
| |
Packaging a Persistence Unit | |
| |
| |
Obtaining an EntityManager | |
| |
| |
Interacting with an EntityManager | |
| |
| |
Resource Local Transactions | |
| |
| |
| |
Mapping Persistent Objects | |
| |
| |
The Programming Model | |
| |
| |
Basic Relational Mapping | |
| |
| |
Primary Keys | |
| |
| |
Property Mappings | |
| |
| |
Multitable Mappings with @Secondary | |
| |
| |
Table | |
| |
| |
@Embedded Objects | |
| |
| |
| |
Entity Relationships | |
| |
| |
The Seven Relationship Types | |
| |
| |
Mapping Collection-Based Relationships | |
| |
| |
Detached Entities and FetchType | |
| |
| |
Cascading | |
| |
| |
| |
Entity Inheritance | |
| |
| |
Single Table per Class Hierarchy | |
| |
| |
Table per Concrete Class | |
| |
| |
Table per Subclass | |
| |
| |
Mixing Strategies | |
| |
| |
Nonentity Base Classes | |
| |
| |
| |
Queries and EJB QL | |
| |
| |
Query APIEJB QL | |
| |
| |
Native Queries | |
| |
| |
Named Queries | |
| |
| |
| |
Entity Callbacks and Listeners | |
| |
| |
Callback Events | |
| |
| |
Callbacks on Entity Classes | |
| |
| |
Entity Listeners | |
| |
| |
| |
Session Beans | |
| |
| |
The Stateless Session Bean | |
| |
| |
Session | |
| |
| |
Context | |
| |
| |
The Life Cycle of a Stateless Session Bean | |
| |
| |
The Stateful Session Bean | |
| |
| |
The Life Cycle of a Stateful Session Bean | |
| |
| |
Stateful Session Beans and Extended Persistence Contexts | |
| |
| |
Nested Stateful Session Beans | |
| |
| |
| |
Message-Driven Beans | |
| |
| |
JMS and Message-Driven Beans | |
| |
| |
JMS-Based Message-Driven Beans | |
| |
| |
The Life Cycle of a Message-Driven Bean | |
| |
| |
Connector-Based Message-Driven Beans | |
| |
| |
Message Linking | |
| |
| |
| |
Timer Service | |
| |
| |
Titan's Maintenance Timer | |
| |
| |
Timer Service API | |
| |
| |
Transactions | |
| |
| |
Stateless Session Bean Timers | |
| |
| |
Message-Driven Bean Timers | |
| |
| |
Final Words | |
| |
| |
| |
The JNDI ENC and Injection | |
| |
| |
The JNDI ENC | |
| |
| |
Reference and Injection Types | |
| |
| |
| |
Interceptors | |
| |
| |
Intercepting Methods | |
| |
| |
Interceptors and Injection | |
| |
| |
Intercepting Life Cycle Events | |
| |
| |
Exception Handling | |
| |
| |
Interceptor Life Cycle | |
| |
| |
Bean Class @Around | |
| |
| |
Invoke Methods | |
| |
| |
Future Interceptor Improvements | |
| |
| |
| |
Transactions | |
| |
| |
ACID Transactions | |
| |
| |
Declarative Transaction Management | |
| |
| |
Isolation and Database Locking | |
| |
| |
Nontransactional EJBs | |
| |
| |
Explicit Transaction Management | |
| |
| |
Exceptions and Transactions | |
| |
| |
Transactional Stateful Session Beans | |
| |
| |
Conversational Persistence Contexts | |
| |
| |
| |
Security | |
| |
| |
Authentication and Identity | |
| |
| |
Authorization | |
| |
| |
The RunAs Security Identity | |
| |
| |
Programmatic Security | |
| |
| |
| |
EJB 3.0 | |
| |
| |
Web Services Standards | |
| |
| |
Web Services Overview | |
| |
| |
XML Schema and XML Namespaces | |
| |
| |
SOAP 1.1 | |
| |
| |
WSDL 1.1 | |
| |
| |
UDDI 2.0 | |
| |
| |
From Standards to Implementation | |
| |
| |
| |
EJB 3.0 and Web Services | |
| |
| |
Accessing Web Services with JAX-RPC | |
| |
| |
Defining a Web Service with JAX-RPC | |
| |
| |
Using JAX-WS | |
| |
| |
Other Annotations and APIs | |
| |
| |
| |
Java EE | |
| |
| |
Servlets | |
| |
| |
Java | |
| |
| |
Server Pages | |
| |
| |
Web Components and EJB | |
| |
| |
Filling in the Gaps | |
| |
| |
Fitting the Pieces Together | |
| |
| |
| |
EJB Design in the Real World | |
| |
| |
Predesign: Containers and Databases | |
| |
| |
Design | |
| |
| |
Should You Use EJBs? | |
| |
| |
Wrapping Up | |
| |
| |
| |
The JBoss Workbook | |
| |
| |
Introduction | |
| |
| |
| |
JBoss Installation and Configuration | |
| |
| |
About JBoss | |
| |
| |
Installing the JBoss Application Server | |
| |
| |
A Quick Look at JBoss Internals | |
| |
| |
Exercise Code Setup and Configuration | |
| |
| |
| |
Exercises for Chapter 4 | |
| |
| |
| |
Your First Beans with JBoss | |
| |
| |
| |
JNDI Binding with Annotations | |
| |
| |
| |
JNDI Binding with XML | |
| |
| |
| |
Exercises for Chapter 5 | |
| |
| |
| |
Interacting with EntityManager | |
| |
| |
| |
Standalone Persistence | |
| |
| |
| |
Exercises for Chapter 6 | |
| |
| |
| |
Basic Property Mappings | |
| |
| |
| |
@IdClass | |
| |
| |
| |
@EmbeddedId | |
| |
| |
| |
Multitable Mappings | |
| |
| |
| |
Embeddable Classes | |
| |
| |
| |
Exercises for Chapter 7 | |
| |
| |
| |
Cascading | |
| |
| |
| |
Inverse Relationships | |
| |
| |
| |
Lazy Initialization | |
| |
| |
| |
Exercises for Chapter 8 | |
| |
| |
| |
Single Table per Hierarchy | |
| |
| |
| |
Single Table per Hierarchy | |
| |
| |
| |
JOINED Inheritance Strategy | |
| |
| |
| |
Exercises for Chapter 9 | |
| |
| |
| |
Query and EJB QL Basics | |
| |
| |
| |
Native SQL Queries | |
| |
| |
| |
Exercises for Chapter 10 | |
| |
| |
| |
Entity Callbacks | |
| |
| |
| |
Entity Listeners | |
| |
| |
| |
Exe | |