List of usage examples for org.apache.commons.transaction.file FileResourceManager startTransaction
public void startTransaction(Object txId) throws ResourceManagerException
From source file:de.thorstenberger.examServer.dao.AbstractTransactionalFileIO.java
/** * Start a new transaction on the current working directory. * * @return an unique transaction id/*w w w . j ava 2 s . c o m*/ */ protected String startTransaction() { final FileResourceManager frm = resourceManagers.get(workingPath); try { final String txId = frm.generatedUniqueTxId(); frm.startTransaction(txId); return txId; } catch (final ResourceManagerSystemException e) { throw new TaskModelPersistenceException("Could not start new transaction on directory " + workingPath, e); } catch (final ResourceManagerException e) { throw new TaskModelPersistenceException("Could not start new transaction on directory " + workingPath, e); } }