Deploying Distributed Lock Service

This section describes the jDLS options, examples of server deployment and how to install jDLS as a Window service.

Once the servers that will provide the distributed lock service have been determined, configure and deploy the service as follows:

  1. Install the jBASE software local to the distributed lock server.

  2. Configure the JBCRELEASEDIR and JBCGLOBALDIR environment variables for the user id by which the lock service will execute. In case of a standalone lock server, no license installation is required as the Distributed lock service is unlicensed.

  3. Initialise and start the jBASE software in background.

The full set of options for the Distributed lock service can be displayed using the –h option on the jDLS command line. However, specific option combinations for the Distributed Lock Service daemon are as follows:

jdls -i {-bPTAD} {-sr,g} {-tnn}
jdls -k {-AD}
jdls -K {-o}

Where,

Option Description

-A

Arbiter only, do not start/stop distributed listener

-b

Run in the Background (Normal mode of operation)

-D

Distributed listener only, do not start/stop lock monitor

-i

Initialise shared memory.

-k

Kill the Shared memory Lock Monitor and/or Listener

-snn,mm

Set Shared memory lock table size to 'nn' record locks over 'mm' groups

-tnn

Set tidy up period to nn minutes

-K

Kill the IPC resources, shared memory and semaphores

-P

Port based locks used (default is process id based locks)

-T

Time stamp all shared memory locks

Server Deployment Examples

jDLS –ibs13000,50

This command initializes the jDLS to start both the jDLS Shared memory lock monitor service and the jDLS Distributed lock listener service in background. The shared memory will be configured to provide 13000 locks with 50 locks per group. The lock table algorithm will actually use the next prime number for the number of groups to provide a better spread of locks over the groups and so in this case configure the shared lock table with 13150 locks in 263 groups with 50 locks per group.

jDLS –ibD

This command instructs the jDLS to initialize only the jDLS Distributed lock listener service. Unless the jDLS Shared memory lock monitor or arbiter service had been previously started, the OS file locks will be used for the default lock mechanism for both distributed locks and local process locks.

jDLS  -kD

This command will stop only the jDLS Distributed lock listener service. If active, the jDLS Shared memory lock monitor or arbiter service will be unaffected.

jDLS –k

This command will stop both the jDLS Distributed lock listener and the jDLS Shared memory lock monitor or arbiter service.        

jDLS –K 

This command will remove the IPCS resource. Note all processes must be disconnected and the effective user id for the command must have adequate permissions to remove the resource.

NOTE: Some command line options are not applicable to Windows as the jDLS executable runs in background as a Windows service. See the jdls –h command display on Windows for list of available options.

Installing jDLS as a Windows Service

The jBASE Distributed Lock Service should be installed as a Windows Service when used on the Windows operating system.

Along with other jBASE services, the jBASE Distributed Lock Service can be installed using the jBASE jServControl command from the Windows console command line. For example,

jServControl –v –s manual –p%JBCRELEASEDIR%\bin\jDLS.exe jDLS install 

Once installed the service can then be stopped or started using Windows Services panel. Alternatively, the service can also be stopped or started from the command line via the jBASE jServControl command as shown below.

jServControl –v jDLS start | stop

To remove the service, use the jServControl command.

jServControl –v jDLS remove
NOTE: All jBASE processes must be disconnected before stopping and removing the jDLS service.

Bookmark Name Actions
Feedback
x