String name = (String)handle.getKey();
TxCtx ctx = (TxCtx)this.ctxMap.get(sessionId);
if(ctx == null) {
throw new LockException("no transaction");
}
File f = new File(this.store.getAbsolutePath() + DELIM + name);
File txF = new File(f.getAbsolutePath() + TX);
if(!f.exists()) {
if(!ctx.locked.contains(txF))
throw new LockException(name + " does not exist or locked by another tx");
} else {
if(f.renameTo(txF)) {
ctx.lock(txF);
} else {
throw new LockException(name + " could not be locked");
}
}
}