}
public LockToken createAndLock(String name, LockTimeout arg1, LockInfo arg2)
throws NotAuthorizedException {
try {
Resource resource = createNew(name, new ByteArrayInputStream(new byte[0]), 0L, null);
if(resource instanceof LockableResource) {
return ((LockableResource)resource).lock(arg1, arg2).getLockToken();
}
} catch (Exception e) {
Logger.warn(this, "can't createAndLock resource "+name+" on host "+this.getName(),e);