Valid 1Z0-898 Dumps shared by ExamDiscuss.com for Helping Passing 1Z0-898 Exam! ExamDiscuss.com now offer the newest 1Z0-898 exam dumps, the ExamDiscuss.com 1Z0-898 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1Z0-898 dumps with Test Engine here:
Persistence application locks entity x with a LockModeType. PESSIMISTIC_READ lock type, which statement is true?
Correct Answer: C
Explanation/Reference: Lock Mode PESSIMISTIC_READ: Immediately obtain a long-term read lock on the data to prevent the data from being modified or deleted. Other transactions may read the data while the lock is maintained, but may not modify or delete the data. The persistence provider is permitted to obtain a database write lock when a read lock was requested, but not vice versa. Note: A lock with LockModeType.PESSIMISTIC_READ can be used to query data using repeatable-read semantics without the need to reread the data at the end of the transaction to obtain a lock, and without blocking other transactions reading the data. Incorrect: Not A: A lock with LockModeType.PESSIMISTIC_WRITE, but not with LockModeType.PESSIMISTIC_READ, can be obtained on an entity instance to force serialization among transactions attempting to update the entity data. Not B: If a pessimistic lock cannot be obtained on the database rows, and the failure to lock the data results in a transaction rollback, a PessimisticLockException is thrown. If a pessimistic lock cannot be obtained, but the locking failure doesn't result in a transaction rollback, a LockTimeoutException is thrown. Not D: Lock Mode READ is a synonym for OPTIMISTIC. Reference: The Java EE 6 Tutorial, Lock Modes; javax.persistence Enum, LockModeType