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

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

Introduction

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

Prototype

public Object getResourceId() 

Source Link

Document

Gets the resource assotiated to this lock.

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;//from ww w .  j ava2s . c o  m

    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);
    }
}