Oracle
1Z0-860 · Question #113
1Z0-860 Question #113: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-860 to reveal the answer and full explanation for question #113. The question stem and answer options stay visible for context.
Question
A developer is working on a user registration application using EJB 3.0. A business method registerUser in stateless session bean RegistrationBean performs the user registration. The registerUser method executes in a transaction context started by the client. If some invalid user data causes the registration to fail, the client invokes registerUser again with corrected data using the same transaction. Which design can meet this requirement?
Options
- AHave register User method call EJBContext.setRollbackOnly method after registration fails.
- BHave register User method throw javax.ejb.EJBTransactionRequiredException after registration fails.
- CHave register User method throw EJBException without marking the transaction for rollback, after
- DCreate an application exception with the rollback attribute set to false and have register User method
Unlock 1Z0-860 to see the answer
You've previewed enough free 1Z0-860 questions. Unlock 1Z0-860 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.