Example usage for org.apache.commons.transaction.locking GenericLock release

List of usage examples for org.apache.commons.transaction.locking GenericLock release

Introduction

In this page you can find the example usage for org.apache.commons.transaction.locking GenericLock release.

Prototype

public synchronized boolean release(Object ownerId) 

Source Link

Usage

From source file:org.apache.slide.store.ExtendedStore.java

protected void releaseTransientLocks() {
    // XXX can be the case when an external transaction took up work in another thread
    // no need to implement suspend and resume here as tlocks will not be used with external transactions
    if (locks.get() == null)
        return;// ww w .j a  v  a2  s  .  com

    Xid txId = (Xid) activeTransactionBranch.get();
    for (Iterator it = ((HashSet) locks.get()).iterator(); it.hasNext();) {
        GenericLock lock = (GenericLock) it.next();
        lock.release(txId);
        getLogger().log("Release lock: " + txId + " released " + lock.getResourceId().toString(), LOG_CHANNEL,
                Logger.DEBUG);
    }
}