Java EE 7 Application Developer — Question 43

When should a JPA entity implement the Serializable interface?

Answer options

Correct answer: D

Explanation

The correct answer is D because JPA entities need to be serializable when they are used as parameters or return values in remote EJB calls to ensure proper communication over the network. Options A and B are incorrect as they do not specifically address the serialization requirement tied to remote EJB operations, while C is misleading since implementing Serializable is not always mandatory.