1Z0-898 · Question #33
Given the following code: Public void create () { try { doA () { } catch (PersistenceException e) {} try (doB) (); } catch (PersistenceException e) {} } Calling method doA will cause an…
Sign in or unlock 1Z0-898 to reveal the answer and full explanation for question #33. The question stem and answer options stay visible for context.
Question
Given the following code:
Public void create () { try { doA () { } catch (PersistenceException e) {} try (doB) (); } catch (PersistenceException e) {} } Calling method doA will cause an NonUniqueResultException to be thrown. Calling method doB will cause an EntityExistsException to be thrown. What two options describe what will happen when the create method is called within an application ' uses container managed transactions? (Choose two)
Options
- AMethod doB will never be called.
- BThe current transaction will continue after doA executes.
- CThe current transaction will continue after doB executes.
- DThe current transaction will be marked for rollback when doA is called.
- EThe current transaction will be marked for rollback when doB is called.
Unlock 1Z0-898 to see the answer
You've previewed enough free 1Z0-898 questions. Unlock 1Z0-898 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.