BBjNamespace::removeLock

Description

In BBj 3.00 and higher, this method removes any lock held by this BBjNamespace.

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

api! = BBjAPI()
NS! = BBjAPI().getNamespace("basis.eng.test","testLocks",1)
NS!.setLock("testCounter", 500)
x = NS!.getValue("testCounter",err = notDefined)
NS!.setValue("testCounter", x + 1)
NS!.removeLock("testCounter")
escape
end

notDefined:
    NS!.setValue("testCounter", 22)
retry

See Also

BBjAPI

BBjNamespace

Object Variables

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