EJB 3.0 Tutorials
Resin 3.0

Features
Installation
Configuration
Web Applications
IOC/AOP
Resources
JSP
Servlets and Filters
Portlets
Databases
Admin (JMX)
CMP
EJB
EJB 3.0
Security
XML and XSLT
XTP
JMS
Performance
Protocols
Third-party
Troubleshooting/FAQ

Bean Annotation
Table
Tutorials

CMP Field
Transactions
CMP Basic
CMP Create
CMP Transactions
CMP Query
CMP Many-to-One
CMP One-to-Many
CMP Many-to-Many
CMP Inherit
Stateless Session
Table
EJB 3.0
CMP Field

The EJB 3.0 tutorials require JDK 1.5
Field-based Persistent Objects

EJB 3.0 supports a field-based relational model: each Java field represents a database column. The tutorial shows the configuration, classes, and client code for a single-table entity.

Transaction Method Annotations

Transaction annotations make reliable database updates clear, straightforward and scalable. Transaction boundaries protect database consistency by enforcing an all-or-none policy and using the database's locking capabilities for scalability.

Property-based Persistent Object

Basic CMP example showing configuration, classes, and client code for a single-table bean.

Creating and Removing Entity Beans

Describes the basic create/remove api for entity beans.

CMP Transactions

Demonstrates protecting database updates using some basic transaction patterns.

Query CMP

The EJB 3.0 Query API resembles the JDBC PreparedStatement with enhanced SQL and direct support for objects.0.

Links: The @ManyToOne Relation

The Many-to-One link is the foundation of persistent relations. It links a source table to a destination with a database REFERENCES column. Many-to-One adds two capabilities: SQL extensions for links and direct lookup of target beans through field references.

Collections: The @OneToMany Relation

The @OneToMany relation adds collection extensions to the query language and provides a Java Collection containing the children. @OneToMany represents a collection of children belonging to a parent, like students in Gryffindor house at Hogwarts school.

Many-to-Many CMP

Illustrates using many-to-many relations of EJB 3.0.

CMP Inheritance

EJB 3.0 supports database-backed inheritance, allowing for persistent-backed polymorphism and more sophisticated object-oriented modelling.

Local Stateless Session Hello

Stateless sessions make database queries and updates robust by setting transaction boundaries at each business method. This stateless session bean example annotates a single business method with a SUPPORTS transaction attribute, marking the method as a read-only transaction boundary.


Table
EJB 3.0
CMP Field
Copyright © 1998-2005 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.