aspose file tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes return type for CMP/CMR fields Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "return type for CMP/CMR fields" Watch "return type for CMP/CMR fields" New topic
Author

return type for CMP/CMR fields

srinivas hari
Greenhorn

Joined: Sep 14, 2006
Posts: 4
Hi,

I have doubt regarding the return type of CMP/CMR fields.

CMP field:

1)no <field-type> tag in deployment descriptor.
2)Container will find from the abstract set and get methods

CMR fields

1)<CMR-FIELD-TYPE> tag availble in dd.
2)we need to declare the get and set abstract methods.

Why SUN handled CMR and CMP in different ways.
in case of CMR fileds why to have a seperate tag for return type
why cannot container finds from the abstract method return types.
Ajay Natarajan
Greenhorn

Joined: Oct 24, 2004
Posts: 9
The only reason there is a CMR-FIELD-TYPE is for java.util.Collection or java.util.Set. If your CMR is return not a single value but collection then the DD lets you specify what is the return type. You dont need the CMR-FIELD-TYPE for a single value return (Say you are returning a String) This it will get from the abstract method return type.

-Hope this helps.


SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCDJWS 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: return type for CMP/CMR fields
 
Similar Threads
EJB-QL Question
Help Requested --> Yep, it's a verifier message!
WebSphere V5 CMP create problem
Issue in CMR entity bean
a cmr-field and a cmp-field on the bean are using the same name. The names