use of com.swiftmq.swiftlet.store.PrepareLogRecord in project swiftmq-ce by iitsoftware.
the class XAResourceManagerSwiftletImpl method buildPreparedTransactions.
private void buildPreparedTransactions() throws Exception {
List prepareRecordList = ctx.storeSwiftlet.getPrepareLogRecords();
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace(getName(), "buildPreparedTransactions, recordList: " + prepareRecordList);
if (prepareRecordList != null && prepareRecordList.size() > 0) {
for (int i = 0; i < prepareRecordList.size(); i++) {
PrepareLogRecord record = (PrepareLogRecord) prepareRecordList.get(i);
AbstractQueue queue = getPreparedQueue(record.getQueueName());
if (queue != null) {
XidImpl xid = record.getGlobalTxId();
Object localTxId = queue.buildPreparedTransaction(record);
XALiveContextImpl xac = (XALiveContextImpl) contexts.get(xid);
if (xac == null) {
xac = new XALiveContextImpl(ctx, xid, true);
xac.setRecovered(true);
xac.registerUsageList();
contexts.put(xid, xac);
}
xac._addTransaction(queue, localTxId);
}
}
}
}
Aggregations