开发者

object does not return updated optimistic locking version

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.

开发者_JS百科

I'm using eclipseLink with Spring for transaction control.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜