First page Back Continue Last page Text

oracle adf workshop

Notes:


Changing the Locking Behavior of an Application Module

By default, the application module uses pessimistic locking, meaning that a lock is issued on a database row when an application changes data in that row.

Oracle recommends using optimistic locking for Web applications. A lock is acquired only just before posting changes to the database, and the application module instance can be immediately released when a Web page terminates. This provides the best level of performance for Web applications that expect many users to access the application simultaneously.

To change your configuration to use optimistic locking, perform the following steps:

1. Select the Configurations tab of the Application Module editor.

2. Select a configuration and click Edit (pencil icon).

3. On the Properties tab of the Configuration Editor, set the value of the property jbo.locking.mode (default value is pessimistic) to one of the following:

optimistic: Issues a SELECT FOR UPDATE statement to lock the row for both updates and deletes, then detects whether the row has been changed by another user by comparing the change indicator attribute if there is one, or the values of all the persistent attributes of the current entity as they existed when fetched into the cache

optupdate: Optimistic locking only for updates; UPDATE statement determines whether the row was updated by another user by including a WHERE clause that matches the existing row; update occurs if attributes unchanged since fetch