aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HFE book, p.433 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HFE book, p.433" Watch "HFE book, p.433" New topic
Author

HFE book, p.433

cyril vidal
Ranch Hand

Joined: Jul 02, 2003
Posts: 247
Hi,
I don't agree with sidenote of question 9.
Question:
Which are valid values for a cmr-field-type element?

Answer:
Either a local interface type, or a Collection or a Set of the local interface type

Isn't the first answer local interface type incorrect? To my sense, cmr-field-type may not contain a simple local interface type as value: in this case, we should use element <cmr-field-name>, shouldn't we?
Regards,
Cyril.
[ January 15, 2004: Message edited by: cyril vidal ]

SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287
Keith Rosenfield
Ranch Hand

Joined: Nov 25, 2003
Posts: 277
Hi Cyril:
I also don't think the side note is correct. The following can be found in the spec in section 10.3.13
The cmr-field-type element must be specified if the type of the cmr-field is java.util.Collection or java.util.Set.

I don't see what local interface types have to do with anything. They don't belong in the cmr-field-name element as you suggest. What belongs in the cmr-field-name element is clearly stated in the deployment descriptor dtd as follows, found in the spec in section 22.5
The cmr-field-name element specifies the name of a logical relation-ship field in the entity bean class. The name of the cmr-field must
begin with a lowercase letter. This field is accessed by methods whose
names consist of the name of the field specified by cmr-field-name in
which the first letter is uppercased, prefixed by �get� or �set�.

I hope this helps.


Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
cyril vidal
Ranch Hand

Joined: Jul 02, 2003
Posts: 247
Hi Keith,
I don't see what local interface types have to do with anything. They don't belong in the cmr-field-name element as you suggest. What belongs in the cmr-field-name element is clearly stated in the deployment descriptor dtd as follows, found in the spec in section 22.5

you're totally right and i was totally wrong
Thanks for this precision,
Cyril.
Yi Meng
Ranch Hand

Joined: May 07, 2003
Posts: 270
I think the side note is there just to let you know that the cmr field type can be a local componet interface or a Set/Collection of the interface.
But you know that you don't have to specify in the DD if the type is a local componet interface, the container will somehow figure out itself.


Meng Yi
Keith Rosenfield
Ranch Hand

Joined: Nov 25, 2003
Posts: 277
Hi Yi.
Originally posted by Yi Meng:
I think the side note is there just to let you know that the cmr field type can be a local componet interface or a Set/Collection of the interface.

The question does not ask what type can a cmr field be but what are valid values of the cmr-field-element. The side note in this case is misleading since local interface type is not a valid value of this element. Only java.util.Collection or java.util.Set are valid. Although it's true that cmr field types can be a local component interface, as you state.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFE book, p.433