Platform Framework
R24 AMR | Min(s) read

TAFJ Oracle Lock Manager

This locking method works only with the Oracle database and leverages the DBMS_LOCK package within Oracle to take TAFJ application locks. It is the preferred method when you use Oracle database and the performance is slightly faster than tLockManager.

You need to edit the [project].properties file to enable the Oracle lock manager as shown below.

temn.tafj.locking.mode	= ORCL

For return values of DBMS_LOCK for locking and releasing, see the following URL:

http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_lock.htm#i997159

The Oracle lock mechanism makes use of oracle’s API (DBMS_LOCK.ALLOCATE_UNIQUE) to allocate a unique INT to handle the lock.

The DBMS_LOCK.ALLOCATE_UNIQUE API stores the locks in a table called DBMS_LOCKS_ALLOCATED. The entries in this table are maintained by default for 10 days (default from oracle). This expiration of entries in this table can be overridden by adding the following property to the properties file.

temn.tafj.locking.orcl.allocate.unique.exp.secs=<value>

If the property is disabled or removed from the properties file, then a default value of 2 days (172800 seconds) will be added by runtime.

The Oracle locking architecture has been changed such that only the tables defined in the property temn.tafj.orcl.table.list.for.unqiue.locking can use dbms_lock.allocate_unique to generate unique hash for lock or release. For other tables, internal processing will be applied to generate the hash for lock or release of tables.

To use the enhanced Oracle locking architecture, you need to add the tables to the following property in the tafj.properties file:

temn.tafj.orcl.table.list.for.unqiue.locking =

Default value for the property is null.

Table names should be Oracle table names, not J4file names. You can add multiple table names to this property separated by a semi-colon (;).

Whenever this property is modified, a server restart is required for the changes to take effect. By setting this parameter, tables defined in the parameter will make use of Oracle unique lock mechanism, which will resolve the "waiting for lock" scenario during COB services.

In this topic

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 5:03:34 PM IST