Entering content frame

Background documentation Releasing Locks Locate the document in its SAP Library structure

Besides the automatic release of locks at the end of a transaction, locks can also be released manually by using the method unlock lock of the interface TableLocking:

This graphic is explained in the accompanying text

public void unlock(byte lifetime,

               Connection connection,

               String tableName,

               Map primaryKeys,

               char mode)

               throws TechnicalLockException,

                    IllegalArgumentException;

 

The parameters have the same meaning as those for setting locks. You can use the unlockAll method to release all set locks:

This graphic is explained in the accompanying text

public void unlockAll(byte lifetime)

                 throws TechnicalLockException,

                      IllegalArgumentException;

 

For each of these methods there is an overloaded method with an additional booleanparameter asynchronous, which specifies whether the lock can also be released asynchronously. By transferring the value false, the synchronous mode is forced. Otherwise, the profile parameter settings of the enqueue server are valid here.

 

Note

SAP recommends that you use transactional locks (locks with a lifetime of the transaction). These locks are automatically released at the end of the transaction. Non-transactional locks with the lifetime of the user session are automatically released at the end of a UserSession (at the latest, when the user session times out).

 

 

Leaving content frame