BBjEnterpriseNamespace::removeLock

Description

In BBj 13.0 and higher, this method removes any lock held by this BBjEnterpriseNamespace.

Syntax

Return Value

Method

void

removeLock()

void

removeLock(string varName)

Parameters

Variable

Description

varName

The name of the NamedVariable for which the lock is to be removed.

Return Value

None.

Remarks

The form of removeLock that does not accept a variableName has been deprecated. This form will throw an error if the BBj process holds more than one lock on the BBjNamespace.

The preferred form is the form accepting a variableName.

Example

host$="localhost"
port=2552
user$="admin"
password$="admin123"
declare BBjEnterpriseNamespace ns!
ns! = bbjapi().getBBjEnterpriseNamespace(host$,port,"test",user$,password$)
ns!.setLock("testCounter", 500)
x = num(ns!.getValue("testCounter",err=notDefined))
ns!.setValue("testCounter", x+1)
ns!.removeLock("testCounter")
stop 
notDefined:
ns!.setValue("testCounter", 22)
retry

See Also

BBjAPI

BBjEnterpriseNamespace

BBjNamespace

Object Variables

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.