1Z0-898 · Question #33
1Z0-898 Question #33: Real Exam Question with Answer & Explanation
The correct answer is B. The current transaction will continue after doA executes. E. The current transaction will be marked for rollback when doB is called.. B: PersistenceExceptionis thrown by the persistence provider when a problem occurs. All instances of PersistenceException except for instances of NoResultException, NonUniqueResultException, LockTimeoutException, and QueryTimeoutException will cause the current transaction, if on
Question
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.
Explanation
B: PersistenceExceptionis thrown by the persistence provider when a problem occurs. All instances of PersistenceException except for instances of NoResultException, NonUniqueResultException, LockTimeoutException, and QueryTimeoutException will cause the current transaction, if one is active, to be marked for rollback. E: EntityExistsException is thrown by the persistence provider when EntityManager.persist(Object) is called and the entity already exists. The current transaction, if one is active, will be marked for rollback.
Community Discussion
No community discussion yet for this question.