Specify a Locking Policy |
![]() Previous |
![]() Next |
In this step, we will configure a descriptor with a locking policy to prevent one user overwriting another user's work. TopLink supports multiple types of locking. In this tutorial, we will assign an optimistic locking policy to the Employee descriptor.
For more information, see "Understanding Descriptors and Locking" in Oracle Toplink Developer's Guide.
Right-click the Employee descriptor in the Structure window and select Advanced Properties > Locking. The Employee properties page appears in the Editor.
Select the Locking tab.
Select the Optimistic Locking option. In the Database Field, select EMPLOYEE.VERSION.
Do not select the Store Version in Cache option. The version is stored in version attribute in the Employee descriptor – not the cache.