aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Valid types of persistent CMP fields ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Valid types of persistent CMP fields ?" Watch "Valid types of persistent CMP fields ?" New topic

Valid types of persistent CMP fields ?

Ashley Bideau
Ranch Hand

Joined: Apr 22, 2006
Posts: 40
Which of the following are valid types of persistent CMP fields of a 2.0 CMP entity bean?

Select 1 correct options

a A serializable class.

b Local interface of another EJB.

c Remote interface of another EJB.

d java.util.Collection and java.util.Set
paresh vernekar
Ranch Hand

Joined: Jul 10, 2006
Posts: 52
I think the answer is a.

The rest would be valid in the case of CMR fields

Paresh Vernekar
gloxinia libidinous

Joined: Jul 20, 2006
Posts: 5

I'm sure about option D and if you are required to select only 1 option then D is the right one.

satheesh krishnaswamy
Ranch Hand

Joined: Mar 17, 2004
Posts: 137
Hi Paresh,

I agree with ur answer.
But I've a doubt.
For CMR,I feel the option C is wrong.It cannot be a remote interface of another EJB?
Can anyone let me know this,Please?

Regards,<br /> <br />Satheesh.K<br />-------------<br />SCJP 1.4<br />SCWCD 1.4
paresh vernekar
Ranch Hand

Joined: Jul 10, 2006
Posts: 52
HI Satheesh,
I agree with you as the specification mentions that the CMR field needs to have a Local interface.
However yesterday I tried with two beans with one being a CMR field of the other.And for the both the beans I had kept them as remote and I had no issues in deployment as well as in select operation.
I am not sure at what stage and in what form the rule of CMR fields having Local interfaces come in oepration.

Maybe someone can clarify on this matter
Paresh Vernekar
I agree. Here's the link:
subject: Valid types of persistent CMP fields ?
Similar Threads
seters/getters of CMP Fields(EB) exposed through Remote Interface
Rich persistent fields in entity beans
persistent CMP fields
EJB QL: Comparing a Dependent Value CMP Field
Is this correct?