CMP Tutorials
Resin 3.0

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

User's Guide
Reference
Tutorials
Scrapbook

Basic CMP
Find with EJB-QL
Creating and Removing
1-n Relationship
ejbSelect EJB-QL
1-1 Relationship
n-m Relationship
Map/Compound PK
Xdoclet tags
CMP
Basic CMP

Basic CMP

Scenario: Headmaster Dumbledore needs a database of Courses.

Finding Entity Beans with EJB-QL

Scenario: Headmaster Dumbledore needs to list all the courses and find the Potions instructor.

Creating and Removing Entity Beans

Scenario: Headmaster Dumbledore adds two courses to the curriculum, then changes his mind and removes them again

Container Persistent Relations

Scenario: Professor Snape wants to know which students live in which house

ejbSelect for more EJB-QL queries

Scenario: Professor McGonagall needs a list of all the boys in a house

One-to-One Entity Relationship

Scenario: At Hogwarts every Professor teaches one Course. The Headmaster keeps track with two 1-1-related CMP beans

Many-to-Many Entity Relationship

Scenario: Professor McGonagall needs to see everybody's schedule as well as an enrollment list for every class

Map Relations and Compound Primary Keys

This tutorial introduces compound primary keys and map relations. Both were initially supported in Resin-CMP 1.0.4. Applications can take advantage of these more advanced CMP features to more cleanly model database tables.


Xdoclet tags
CMP
Basic CMP
Copyright © 1998-2005 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.