Originally posted by Deep Chand: b) About the ejbCreate method syntax, MZ Study guide says: "The throws clause MUST define the javax.ejb.CreateException.The throws clause may define arbitrary application specific exceptions."
But the example in HF book (page 316) doesn't throw createexception. Is that by mistake?
The throws clause in the ejbCreate() of the bean need not throw CreateException as long as it does not throw that exception. But the throws clause of the create() method in the Home Interface needs to declare CreateException. I am not sure about MZ notes coz i didnt go through it... but i am kinda sure that the HF-EJB thing is not be mistake.
This is what the specification has to say on the dependent value class:
10.3.3 Dependent Value Classes A dependent value class is a concrete class that is the value of a cmp-field. A dependent value class may be a class that the Bean Provider wishes to use internally within an entity bean with container-managed persistence, and/or it may be a class that the Bean Provider chooses to expose through the remote (or local) interface of the entity bean. A dependent value class can be the value of a cmp-field; it cannot be the value of a cmr-field. The get accessor method for a cmp-field that corresponds to a dependent value class returns a copy of the dependent value class instance. The assignment of a dependent value class value to a cmp-field using the set accessor method causes the value to be copied to the target cmp-field. A dependent value class must be serializable. The internal structure of a dependent value class is not described in the EJB deployment descriptor.