3. Which of the following are requirements for a message-driven bean [choose 4]:
A. It implements the MessageListener and MessageDrivenBean interfaces.
B. It implements one or more ejbCreate methods.
C. It implements one onMessageReceived method.
D. It must not define the finalize method.
E. It implements one ejbRemove method.
F. It must not have a remote or local interface.
4. With CMP, the primary key for an entity bean may be automatically generated by the container if the entity bean meets certain requirements. Which of the following is true [choose 1]?
A. In the deployment descriptor, the primary key class must be defined as a java.lang.Object. The primary key field must not specified.
B. In the home interface, the argument of the findByPrimaryKey method must be a java.lang.Object
C. In the entity bean class, the return type of the ejbCreate method must be a java.lang.Object.
D. All of the above are requirements.
E. None of the above are requirements.
Originally posted by Andrew Perepelytsya:
karthik, think about the following fact. if the bean cannot access bean's persistent state (no identity available), then how on earth is it possible to access relationship fields?
my understanding always was CMR field were attached to some identified bean.
hence, I think only C is the correct answer for Q 2.