WriteLock wLock = new WriteLock(zkUtil.getSession(), lockPath,
Ids.OPEN_ACL_UNSAFE);
RMLockListener myLockListener = new RMLockListener();
wLock.setLockListener(myLockListener);
try {
boolean lockGrabbed = wLock.lock();
if (lockGrabbed == false) {
//TO DO : Let this request queue up and try obtaining lock.
throw new IOException(
"Unable to obtain lock for keep alive of transaction. "
+ transaction.toString());