getLock(final int, final int, final long) method

This function makes 2 things: it creates an entry in table BATCHRUNS and directly checks, if no other instance of the given batchType is running ( finished is null).

Syntax

long getLock ( final int batchType , final int maxAgeInSeconds , final long callerId ) throws LockingException

Parameters

Exceptions

Usage

The maxAgeInSeconds specifies after which time an old, unfinished BatchRun is ignored. The function

releaseLock

has to be called to release the lock.