DesignReference ref = WGADesignManager.createDesignReference(tmlLib);
DeployedLayout layout = getDeployedLayout(tmlLib, ref);
if (layout == null) {
MultiLevelLock lock = _lockManager.atomicGetOrCreateLock(ref.toString());
try {
try {
lock.acquire(Thread.currentThread(), 1, true, true, Long.MAX_VALUE);
}
catch (InterruptedException e) {
}
layout = getDeployedLayout(tmlLib, ref);
if (layout == null) {
layout = deployTML(tmlLib);
}
}
finally {
lock.release(Thread.currentThread());
}
}
String resourcePath = "/" + FOLDER_DYNAMIC_RESOURCES + "/" + layout.getFile().getName();
return resourcePath;