To enable OCC, first verify that PCC is disabled, then configure the timestamp mechanism of your choice.
To check that PCC is disabled, verify that the Select With Lock option on the Persistence/General subtab in the EAServer Manager Component Properties dialog box is disabled. On the Advanced tab, verify that com.sybase.jaguar.component.selectForUpdate is not set or set to false. When using jagtool or XML configuration files, verify the properties com.sybase.jaguar.component.selectWithLock and com.sybase.jaguar.component.selectForUpdate are both false.
Specify the timestamp mechanism in the Timestamp field on the Persistence/General subtab in the EAServer Manager Component Properties dialog box. Table 4-1 describes the allowable values. When using jagtool or XML configuration files, set the com.sybase.jaguar.component.timestamp property. If multiple tables are used and you specify a timestamp column, all tables must contain a column with the same name and datatype.
To configure |
Set the timestamp value to |
---|---|
A timestamp column |
The name of a single column in each table that serves as the timestamp to detect update collisions. If the component uses multiple tables, each must contain a timestamp column with this name. The column type can be:
|
A table level timestamp |
A table and column name, in the form A timestamp table can be shared among multiple components even when only one column is present in the timestamp table. In other words, a single timestamp value can be shared by multiple tables. This helps further improve performance for a group of read-mostly tables. However, any insert, delete, or update on any of the tables results in all cache entries being discarded. When using a timestamp table, database triggers are required to increment the timestamp for each update, delete, or insert to tables that are mapped to the component or components that require the timestamp. You can set the component property com.sybase.jaguar.component.ts.triggers property so EAServer creates triggers, create triggers yourself, or add code to existing triggers. |
All values comparison |
Leave blank. |
PCC |
Set the value to “none” to disable optimistic concurrency control. In this case, you are strongly advised to configure locking as described in “Enabling PCC”. |
Copyright © 2005. Sybase Inc. All rights reserved. |