List of usage examples for org.apache.commons.transaction.locking MultiLevelLock release
public boolean release(Object ownerId);
From source file:de.innovationgate.wgpublisher.WGPDeployer.java
public String locateTmlResource(WGTMLModule tmlLib, ServletRequest servletRequest) throws WGAPIException, DeployerException { DesignReference ref = WGADesignManager.createDesignReference(tmlLib); DeployedLayout layout = getDeployedLayout(tmlLib, ref); if (layout == null) { MultiLevelLock lock = _lockManager.atomicGetOrCreateLock(ref.toString()); try {//ww w .j av a2s.c o m try { lock.acquire(Thread.currentThread(), 1, true, true, Long.MAX_VALUE); } catch (InterruptedException e) { } layout = getDeployedLayout(tmlLib, ref); if (layout == null) { servletRequest.setAttribute(REQATTRIB_TML_DEPLOYED, true); layout = deployTML(tmlLib); } } finally { lock.release(Thread.currentThread()); } } return layout.getResourcePath(); }