Exam 1z0-900 All QuestionsBrowse all questions from this exam
Question 37

When should a JPA entity implement the Serializable interface?

    Correct Answer: D

    A JPA entity should implement the Serializable interface when it is used as a parameter or return value by remote EJB operations. This is because EJBs often need to transfer those entities between different JVMs or systems, which requires them to be serialized. Therefore, implementing the Serializable interface ensures the entities can be properly transmitted and reconstructed.

Discussion
orjavaOption: D

Answer D

peteVlnOption: D

The Java EE7 Tutorial 37.1, says: If an entity instance is passed by value as a detached object, such as through a session bean's remote business interface, the class must implement the Serializable interface.