File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HFEJB: Coffee Cram Entity Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HFEJB: Coffee Cram Entity Beans" Watch "HFEJB: Coffee Cram Entity Beans" New topic

HFEJB: Coffee Cram Entity Beans

Greg Charles

Joined: Oct 01, 2001
Posts: 2968

In the Coffee Cram for Chapter 6 (page 367), question 1 reads:

What's true for a bean provider when creating an entity bean using container-managed persistence.

Answer D is not marked as a correct answer:

D. Accessor methods for container-managed relationship fields must be exposed in the bean's remote component interface.

First, the question comes a chapter too early. Chapter 7 covers entity relationships. Still, it seems like D should be correct. Why isn't it?
Micheal Jacob
Ranch Hand

Joined: Nov 25, 2002
Posts: 89

To make a relationship, we need entity beans with local relationship.
So you cannot pass local interface to clients through remote interface. (i.e) remote clients cannot get local component interface

So CMR field should not be exposed to client in remote component interface.
Hope it helps.

Greg Charles

Joined: Oct 01, 2001
Posts: 2968

Ah, that's it! Remote is the key word. I was looking at the word "expose" and trying to figure out if the trick was in there. Thanks Micheal.
Salil Surendran
Ranch Hand

Joined: Jan 16, 2004
Posts: 40
Hello Friends,
I am wondering then how does one use CMRs with remote entity beans? How can I call methods on remote entity beans to get related entity beans when they are not even present in the remote interface?

Thanks,<br />Salil Surendran
Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222

CMRs cannot be used with remote client view.
I agree. Here's the link:
subject: HFEJB: Coffee Cram Entity Beans
It's not a secret anymore!