Which scenario can cause the exception?

The execution of the find method in the following code throws an exception:
11. em.find(Customer.class, custid);
12. //Where em is a reference to a extended scoped entity manager.
Which scenario can cause the exception?

The execution of the find method in the following code throws an exception:
11. em.find(Customer.class, custid);
12. //Where em is a reference to a extended scoped entity manager.
Which scenario can cause the exception?

A.
The find method was called without a transaction.

B.
The entity corresponding to the requested primary key has been removed.

C.
The entity corresponding to the requested primary key has been detached.

D.
The data type of custid is NOT a valid type for the Customer entity primary key.



Leave a Reply 0

Your email address will not be published. Required fields are marked *