This content has been marked as final.
Show 1 reply
-
1. Re: Can CMP contain non-persistent fields
jobor Nov 14, 2004 11:19 AM (in response to alwyn)The answer is NO
If you deploy a CMP bean without setter for an CMP field you get this message:
17:04:18,664 WARN [verifier] EJB spec violation:
Bean : MyBean
Section: 10.6.2
Warning: The entity bean class must define a set accessor for each CMP field.
Info : Field: myField
The CMP fields specified in the deployment descriptor need getter and setter methods.
If you need a non CMP field just define 2 normal non abstract interface methods as getter and setter but don't mention them in the deployoment descriptor. What you do in those methods is up to you.
Johan