What is a possible reason that an HlegalArgumentException is thrown at Line 33 when the removeStore method is called by a remote client?

A developer implemented a Java class called Store. The class is annotated correctly to act as an
entity. The developer created a stateless session bean to create, lookup, and remove Store
objects. This session bean has a container-managed entity manager injected into field em and a
removeStore method with transaction attribute REQUIRED.
Given the following code :
32. public void re move St ore (St ore store) {
33. em.remove(store); 34.}
What is a possible reason that an HlegalArgumentException is thrown at Line 33 when the
removeStore method is called by a remote client?

A developer implemented a Java class called Store. The class is annotated correctly to act as an
entity. The developer created a stateless session bean to create, lookup, and remove Store
objects. This session bean has a container-managed entity manager injected into field em and a
removeStore method with transaction attribute REQUIRED.
Given the following code :
32. public void re move St ore (St ore store) {
33. em.remove(store); 34.}
What is a possible reason that an HlegalArgumentException is thrown at Line 33 when the
removeStore method is called by a remote client?

A.
Thepassedobject is NOT serializable.

B.
Thepassed object is NOT found inthedatabase.

C.
The passed object is NOT managed by the entity manager.

D.
There is no active transaction to manage the database removal.

Explanation:



Leave a Reply 0

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