cflock.set("succeeded",Boolean.TRUE);
cflock.set("errortext","");
pageContext.variablesScope().set("cflock",cflock);
start=System.nanoTime();
try {
((PageContextImpl)pageContext).setActiveLock(new ActiveLock(type,name,timeoutInMillis)); // this has to be first, otherwise LockTimeoutException has nothing to release
data = manager.lock(type,name,timeoutInMillis,pageContext.getId());
}
catch (LockTimeoutException e) {
LockManagerImpl mi = (LockManagerImpl)manager;
Boolean hasReadLock = mi.isReadLocked(name);