1

I've implemented optimistic locking and see that it is working fine. However, the object that is returned to my backing bean from the service has the previous version not the current one. If I do another "find" in another transaction I get the correct one. It's like the commit is happening after the transaction returns.

I'm using eclipseLink with Spring for transaction control.

1 Answer 1

3

How do you commit the transaction, and how do you return the object? If you are merging an object into the active EntityManager, then you need to return the object that you merge into, not from.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.