Day 12. Developing Container-Managed Relationships

Today, you'll learn how to develop relationships among container-managed persistence entity beans by using the advanced feature of container-managed relationships.

In our sample university registration system, a student's order consists of one or more line items. Each line item represents a single course item the student has ordered. So, there exists a one-to-many relationship between order and line items. Another example is a student can enroll in many courses, and each course can have many students enrolled in it. So, there exists a many-to-many relationship between students and courses. These are good candidates for container-managed relationships.

Today, we'll write a complete code example ...

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.