Laurent Dauvilaire
Laurent Dauvilaire

Reputation: 11

UCP Oracle Hibernate Pessimistic Locking

I have a code that is running on Jboss EAP 7.4 and that is using JPA pessimistic locking (select for update wait).

It is working fine with Jboss datasource but when I try to use UCP datasource the locking mechanism is not blocking any more.

Versions:

Is there a connection property to setup in UCP to enable the locking mechanism ?


I tried 2 concurrent threads call if a Spring Data JPA repository throught a Spring @Transactional(REQUIRES_NEW) annotation.

Using query.setLockMode(PESSIMISTIC_WRITE);

Expected the second thread to be blocked until the first thread has committed its thransaction.

Upvotes: 1

Views: 68

Answers (0)

Related Questions