here is a question from ejbCertificate.com
Which of the following statements are correct about the responsibilities of the
EJB container?
1.When the container invokes the ejbRemove() method the container removes immediately the entity from the database.
2.The container synchronizes the instance's state before it invokes the ejbRemove() method and uses the ejbLoad() method.
3.The container is responsible for providing the implementation of the ejbFind() methods.
4.After the ejbHome() method completes, the instance remains in the ready state.
5.he container is responsible for calling the ejbCreate() method.
The correct answer is 2,3,5. I did not choose 2 because I think there is no point to update entity bean from the underline database since it's about to be deleted. No matter the entity bean's data is updated or stale, its about to be delete, why bother to update it before its about to be deleted? Am I right?
Another question from Whizlabs:
____ is the method that must always be declared in the (local or remote)home interface of an entity bean. (write only the method name)
I wrote: remove
but the answer is findByPrimaryKey. Isn't this answer should apply to component interface instead of home interface? Please someone judge my answer.
Is this correct:
ejbFindByPrimaryKey and other ejbFind methods return primary key?