List of usage examples for org.apache.commons.transaction.file FileResourceManager generatedUniqueTxId
public String generatedUniqueTxId() throws ResourceManagerSystemException
From source file:de.thorstenberger.examServer.dao.AbstractTransactionalFileIO.java
/** * Start a new transaction on the current working directory. * * @return an unique transaction id//from www . ja va2s . 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); } }