My Oracle Support Banner

Entity Version Is Incremented Twice When Using LockModeType.OPTIMISTIC_FORCE_INCREMENT On Oracle GlassFish Server (Doc ID 1536061.1)

Last updated on MAY 07, 2020

Applies to:

Oracle GlassFish Server - Version 3.1.1 and later
Information in this document applies to any platform.


Optimistic locking is being used to manage concurrent changes to Entity objects stored in the database.  It is noticed that the entity's version is being updated during a transaction that commits no changes.

For example:

The entity starts with its version set to 1 and by the end of the transaction its version is set to 3 even though no change is made to the entity object.  When a data change is made to the object the version number is only incremented by one.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.