Client view of advanced entity bean concepts

In this section, we look at the client view when dealing with relationships, inheritance, and custom finders.

Relationship programming

We have promoted some relationship-based methods to the component interface and added some additional finders to the home interfaces that provide us with additional business logic that we can expose to the customer.

Although we understand that behind the scenes these relationships exist and there were complex mappings to establish them, in reality, to the EJB clients, these CMR fields just look like collections of other EJBOjbect references.

Let us look at client programming for a 1:m relationship.

Traversing a “one” relationship

When looking at the Account-TransRecord ...

Get EJB 2.0 Development with WebSphere Studio Application Developer 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.