| Bookmark Name | Actions |
|---|
Deploying Client Distributed Lock
It is possible to configure the client system to use the Distributed Lock Service.
Each client user should be configured with the JDLS environment variable. This variable should be set in the users profile prior to program execution.
To be properly effective all users of the same database should be configured with exactly the same Distributed Lock Service parameters, otherwise locks will not be correctly respected and data inconsistencies may occur.
The following basic options can be specified in the JDLS environment variable:
JDLS={SERVER=Hostname{, Port}}{,SERVER2=Hostname{, Port}}
Where,
| Parameter | Description |
|---|---|
|
SERVER |
Specifies the primary lock service specification. |
|
SERVER2 |
Specifies the secondary lock service specification for resilience. |
|
Hostname |
Specifies either the DNS hostname or the dotted IP address of the system where the jBASE Distributed Lock Service is executing. |
|
Port |
Specifies the socket port number (default 50002) on which the jBASE Distributed Lock Service is listening. |
The table below shows the additional configuration options and their descriptions.
| Option | Description |
|---|---|
|
WAIT |
The WAIT option can be used to control the action of distributed lock retries. If this option is configured, then the client will wait for acknowledgement that the lock request has been completed without any interim communication, (see “distributed lock retries”). With this option, setting up of default acknowledgement timeout period is not used. This option is not recommended as processes may wait a considerable time in case of lock contention without update to the lock status of the process. |
|
TIMEOUT=Seconds |
The TIMEOUT option can be used to override the timeout period, within which any distributed lock request must be acknowledged. The default timeout period is set for 30 seconds. This period allows for multiple retries for the lock on the server system, as such should only be adjusted upward. |
|
BINARY |
The BINARY option can be used to intercept all binary type locks, that is locks other than record locks and redirect them to the Distributed Lock Service. Locks that would normally be taken on the local system will be intercepted and redirected to the Distributed Lock Service, such that they can be propagated and hence respected across multiple systems. This option should not be required except when using jBASE Hash files over NFS and/or File and Execution Locks. |
|
OSLOCKS |
The OSLOCKS option can be used to force all record locks to be routed via the OS file lock path such that OS file locks are taken on the Distributed Lock Service Server by default rather than using the configured lock mechanism on the lock server. |
|
LOCK=EXTERNAL|INTERNAL|ALL |
The LOCK option can be used to differentiate the interception of locks for internal or external lock handlers. The default is for all locks both internal and external to be intercepted and redirected to the Distributed Lock Service. However, certain external database drivers may require their own lock functions to be invoked, in which case the LOCK option should be set to INTERNAL. RDBMS drivers use INTERNAL locking and hence the default configuration or INTERNAL value will redirect all record locks required for the application irrespective of the underlying RDBMS locking schemes. |
|
VERBOSE | TRACE=Tracefile |
The TRACE option will override the VERBOSE option such that Distributed Lock trace information will be redirected from standard error to the specified trace file. These options are intended for debugging and problem analysis only. |
Testing the JDLS Client Connection
The JDLS client connection configuration can be tested using the –C option to the jDLS executable at the command line. For example,
jDLS –Cteststring
If the Distributed Lock Service cannot be reached, then the process will time out and display the following error message:
Client: Using host 'localhost', service '50002' Client: Unable to allocate socket
If the Distributed Lock Service cannot be reached for a lock request, then the process will time out and exit with the following message:
Client: unable to connect to distributed lock service, locks not enabled Client: connection failed for host ‘10.44.1.56’, service '50002', error Connection refused
Add Bookmark
save your best linksView Bookmarks
Visit your best linksIn this topic
Are you sure you want to log-off?