Sams Teach Yourself J2EE™ in 21 Days
by Martin Bond, Dan Haywood, Debbie Law, Andy Longshaw, Peter Roxburgh
Container-Managed Relationships
Container-managed relationships (CMR) might possibly sound pretty daunting, and certainly from the EJB container vendor's perspective, there could be some fairly complex activity happening behind the scenes. However, from the bean provider's perspective (that is, you), they are fairly straightforward and easy to use.
CMRs are defined declaratively through the deployment descriptor, underneath the relationships element. Therefore, container-managed relationships can only be defined between Entity beans that reside within the same local relationship scope (EJB specification, section 10.3.2). What this means in practice is that beans that have relationships must be deployed in the same ejb-jar file. You will be learning ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access