Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.5.0) Part Number E13981-01 |
|
|
View PDF |
You can specify an entity field to function as a version field for use in a TopLink optimistic version locking policy. OC4J uses this version field to ensure integrity when reattaching (see "Detaching and Merging an Entity Bean Instance") and for overall optimistic concurrency control.
You define the optimistic lock version field at one of the property (getter or setter method) or field level of your entity.
For more information, see "Optimistic Version Locking Policies" in the Oracle TopLink Developer's Guide.
Example 7-28 shows how to use the @Version
annotation to define an optimistic version locking policy using column VERSION
.