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 of the order-line item relationship.

Today's road map:

  • Examine the concepts of cardinality and directionality that are applicable to container-managed relationships. You'll also learn how to implement different kinds of relationships using code snippets.

  • Learn how to define the home and component interfaces for entity beans that are part of a relationship.

  • Learn how to specify the container-managed persistent fields in the bean class and deployment descriptor.

  • Learn how to compile, package, and deploy the beans in a container, and write a client that tests the container-managed relationships.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.2.240