TTSGetApplicationThresholds

Returns the current connection’s application thresholds for implicit transactions (For cross-platform functionality, see Developing NLMs with Cross-Platform Functions ( NDK: NLM Development Concepts, Tools, and Functions) and call call NWTTSGetConnectionThresholds.)

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.x, 4.x, 5.x, 6.x
Platform:NLM
Service:Server-Based TTS

Syntax

  #include <\nlm\nit\nwtts.h>  
   
  int TTSGetApplicationThresholds (  
     BYTE   *logicalRecordLockThreshold,  
     BYTE   *physicalRecordLockThreshold); 
  

Parameters

logicalRecordLockThreshold
(OUT) Receives the number of logical record locks allowed before an implicit transaction begins (0 to 255).
physicalRecordLockThreshold
(OUT) Receives the number of physical record locks allowed before an implicit transaction begins (0 to 255).

Return Values

Decimal

Hex

Constant

0

(0x00)

ESUCCESS

NetWare® Error

UNSUCCESSFUL

Remarks

This function allows an application to get the number of logical and physical record locks allowed before an implicit transaction begins for the current connection.

This function and the TTSSetApplicationThresholds function are useful for applications that change the implicit application thresholds and later want to restore them.

For example, TTSGetApplicationThresholds can query an application for the number of logical and physical record locks allowed before an implicit transaction begins.

TTSSetApplicationThresholds can then do one of the following:

  • Turn off implicit transactions.
  • Set implicit thresholds for applications that always keep one or more records locked.

Applications that intend to use only explicit transactions, but sometimes generate unnecessary implicit transactions, would need to turn off all implicit transactions.

The default threshold for logical and physical locks is 0. A threshold of 0xFF means there are not implicit transactions for that lock type.

The thresholds returned by this function are valid for the requesting application only. When the application terminates, the workstation thresholds are restored. This is only meaningful in a client-server NLM™ application that uses the client’s connection number for transactions. Whenever the client’s workstation generates an end-of-job (normally when a workstation application ends), the TTS application thresholds are reset to the TTS workstation thresholds.

See Also

TTSGetWorkstationThresholds, TTSSetApplicationThresholds, TTSSetWorkstationThresholds