Package org.apache.commons.transaction.locking

Examples of org.apache.commons.transaction.locking.MultiLevelLock


        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;
View Full Code Here


        }

        protected void dispose() {
            super.dispose();
            for (Iterator it = locks.iterator(); it.hasNext();) {
                MultiLevelLock lock = (MultiLevelLock) it.next();
                lock.release(this);
            }
        }
View Full Code Here

     */
    public OJBLock atomicGetOrCreateLock(Object resourceId, Object isolationId)
    {
        synchronized(globalLocks)
        {
            MultiLevelLock lock = getLock(resourceId);
            if(lock == null)
            {
                lock = createLock(resourceId, isolationId);
            }
            return (OJBLock) lock;
View Full Code Here

     */
    public OJBLock atomicGetOrCreateLock(Object resourceId, Object isolationId)
    {
        synchronized(globalLocks)
        {
            MultiLevelLock lock = getLock(resourceId);
            if(lock == null)
            {
                lock = createLock(resourceId, isolationId);
            }
            return (OJBLock) lock;
View Full Code Here

TOP

Related Classes of org.apache.commons.transaction.locking.MultiLevelLock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.