Example usage for org.apache.commons.transaction.file FileResourceManager commitTransaction

List of usage examples for org.apache.commons.transaction.file FileResourceManager commitTransaction

Introduction

In this page you can find the example usage for org.apache.commons.transaction.file FileResourceManager commitTransaction.

Prototype

public void commitTransaction(Object txId) throws ResourceManagerException 

Source Link

Usage

From source file:de.thorstenberger.examServer.dao.AbstractTransactionalFileIO.java

/**
 * Commit the changes to the current working directory atomically.
 *
 * @param txId/*w  w w  . j a  v  a  2 s.c  o  m*/
 *            id of the current transaction
 */
protected void commitTransaction(final String txId) {
    final FileResourceManager frm = getFRM();
    try {
        frm.prepareTransaction(txId);
        frm.commitTransaction(txId);
    } catch (final ResourceManagerException e) {
        rollback(txId, e);
        throw new TaskModelPersistenceException(e);
    }

}