nerdexam
Oracle

1Z0-898 · Question #43

An application that uses container-managed transaction demarcation creates a query within an active transaction and receives a QueryTimeoutException. Which of those scenarios describes what happens…

The correct answer is D. The statement is rolled back, but the transaction continues. QueryTimeoutExceptionis thrown by the persistence provider when a query times out and only the statement is rolled back. The current transaction, if one is active, will be not be marked for

EntityManager Operations

Question

An application that uses container-managed transaction demarcation creates a query within an active transaction and receives a QueryTimeoutException. Which of those scenarios describes what happens to the active transaction?

Options

  • AThe statement and the transaction continue.
  • BThe query is recreated within the current transaction.
  • CThe statement and the transaction are marked for rollback.
  • DThe statement is rolled back, but the transaction continues.

How the community answered

(58 responses)
  • A
    3% (2)
  • B
    17% (10)
  • C
    7% (4)
  • D
    72% (42)

Explanation

QueryTimeoutExceptionis thrown by the persistence provider when a query times out and only the statement is rolled back. The current transaction, if one is active, will be not be marked for

Topics

#QueryTimeoutException#container-managed transactions#statement rollback#transaction continuation

Community Discussion

No community discussion yet for this question.

Full 1Z0-898 Practice