use of com.swiftmq.impl.store.standard.index.QueueIndexEntry in project swiftmq-ce by iitsoftware.
the class StoreWriteTransactionImpl method abort.
public void abort(XidImpl globalTxId) throws StoreException {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$store", toString() + "/abort, globalTxId: " + globalTxId);
txId = ctx.transactionManager.createTxId();
sem = new Semaphore();
journal = new ArrayList();
queueIndex.setJournal(journal);
try {
for (int i = 0; i < keys.size(); i++) {
addMessagePageReference(queueIndex.remove((QueueIndexEntry) keys.get(i)));
}
ctx.recoveryManager.commit(new CommitLogRecord(txId, sem, journal, this, messagePageRefs));
sem.waitHere();
ctx.transactionManager.removeTxId(txId);
} catch (Exception e) {
throw new StoreException(e.toString());
}
if (prepareLogRecord != null) {
try {
ctx.preparedLog.remove(prepareLogRecord);
} catch (IOException e) {
throw new StoreException(e.toString());
}
prepareLogRecord = null;
}
close();
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$store", toString() + "/abort, globalTxId: " + globalTxId + ", done");
}
Aggregations