How will the EJB container handle exceptions thrown by a business method of a bean with container managed transaction demarcation? [Select all correct answers]
1If the instance called setRollbackOnly(), the EJB container will rollback the transaction. 2If the instance did not call setRollbackOnly(), the EJB container will commit the transaction. 3The EJB container will throw a RemoteException. 4If the bean represents an entity bean, it will remove the entity from the datasource. 5If the bean represents a session bean, the bean will be removed from the pool.
And the correct answers are marked as 1 and 2.I have problem with answer number 2 , because the method could throw an EJBException , which is a system exception , and thus making solution 2 incorrect.In the explantion for the solution , they use "application exception" even though the question only uses "exception".Am I gonna get such unclear questions on the exam?