Question 1
Posted: Sat Feb 07, 2015 9:11 am
While excepting a business method in a stateless session bean the container rolls back the method’s transaction. Which three are possible causes for the container’s behavior? (Choose three.)
1.The bean uses container-managed transactions and invokes EJBContext.setRollbackOnly.
2.The bean uses container-managed transactions and invokes EJBContext.getRollbackOnly.
3.The business method throws a java.lang.NullPointerException.
4.The business method throws a checked exception of a class type that is marked with the @ApplicationException annotation with the rollback element value true.
5.The business method throws a unchecked exception of a class type that is marked with the @ApplicationException annotation with the rollback element value true.
6.The bean uses container-managed transactions and throws a checked exception of a class type that is marked with the @ApplicationException annotation with the rollback element value false.
what is the correct answer i think 1, 3, 4
1.The bean uses container-managed transactions and invokes EJBContext.setRollbackOnly.
2.The bean uses container-managed transactions and invokes EJBContext.getRollbackOnly.
3.The business method throws a java.lang.NullPointerException.
4.The business method throws a checked exception of a class type that is marked with the @ApplicationException annotation with the rollback element value true.
5.The business method throws a unchecked exception of a class type that is marked with the @ApplicationException annotation with the rollback element value true.
6.The bean uses container-managed transactions and throws a checked exception of a class type that is marked with the @ApplicationException annotation with the rollback element value false.
what is the correct answer i think 1, 3, 4