This subsection describes the notes on using the optimistic lock.
The notes on the Version field settings are as follows:
The notes on using the lock method are as follows:
The optimistic lock of Cosminexus JPA Provider is a locking method that assumes that the database Isolation level is accessed with Read Committed. If the database is HiRDB, the Isolation level is Repeatable Read by default; therefore, you must change the level to Read Committed.
Set the Isolation level for each client in the PDISLLVL parameter of the data guarantee level of the client environment variable. The default value is Repeatable Read (2). Therefore, change the value to Read Committed (1). An example of a change in setting is as follows:
Specify the client environment variable in the value of the environmentVariables property with the config-property tag of the HITACHI Connector Property file or add the client environment variable in the configuration file for the client environment variable group of HiRDB.
If the data guarantee level of the client environment variable is operated with the default Repeatable Read, a lock is set in the shared mode. Therefore, note that if you combine the issue of reference series SQL such as the find method and the issue of update series SQL such as the flush method, a deadlock occurs easily.