Refreshing an entity clears the lock mode returned from EntityManager.getLockMode

Description

When an entity has been locked within a transaction and later a refresh is invoked upon it this causes EntityManager.getLockMode to return the standard OPTIMISTIC lock mode type (indicating not locked).

e.g.

A simple project has been included which illustrates this.

Attachments

1

Activity

Show:

Christian Beikov January 25, 2023 at 4:27 PM

If this bug is still an issue for you, please create a new Jira issue with a test case that reproduces the problem and a reference to this issue.

Rustam Anvarov January 17, 2023 at 5:48 PM

Hey guys, this error persists in 5.3.0 - 5.6.0, please re-open this case

Former user April 26, 2018 at 7:56 PM

Fixed in master and 5.2 branches.

Steve Ebersole April 25, 2018 at 1:21 PM

Going to unschedule this soon...

Steve Ebersole April 18, 2018 at 3:43 PM

Waiting on feedback from wrt PR

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created January 26, 2018 at 6:12 AM
Updated January 25, 2023 at 4:27 PM
Resolved April 26, 2018 at 7:56 PM