/** * write the Commit record to the Howl Log * @param xaCmRec the Commit Record * @return the XACommittingTx returned by putCommit * @throws LogException could not log the record * @throws IOException * @throws InterruptedException */ public XACommittingTx howlCommitLog(byte [][] xaCmRec) throws LogException, IOException, InterruptedException { if (TraceTm.recovery.isDebugEnabled()) { TraceTm.recovery.debug("Commit howl log"); } return xaLog.putCommit(xaCmRec); }
/** * write the Commit record to the Howl Log * @param xaCmRec the Commit Record * @return the XACommittingTx returned by putCommit * @throws LogException could not log the record * @throws IOException * @throws InterruptedException */ public XACommittingTx howlCommitLog(byte [][] xaCmRec) throws LogException, IOException, InterruptedException { if (TraceTm.recovery.isDebugEnabled()) { TraceTm.recovery.debug("Commit howl log"); } return xaLog.putCommit(xaCmRec); }
public Object prepare(Xid xid, List branches) throws LogException { int branchCount = branches.size(); byte[][] data = new byte[3 + 2 * branchCount][]; data[0] = intToBytes(xid.getFormatId()); data[1] = xid.getGlobalTransactionId(); data[2] = xid.getBranchQualifier(); int i = 3; for (Iterator iterator = branches.iterator(); iterator.hasNext();) { TransactionBranchInfo transactionBranchInfo = (TransactionBranchInfo) iterator.next(); data[i++] = transactionBranchInfo.getBranchXid().getBranchQualifier(); data[i++] = transactionBranchInfo.getResourceName().getBytes(); } try { XACommittingTx committingTx = logger.putCommit(data); return committingTx; } catch (LogClosedException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (LogRecordSizeException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (LogFileOverflowException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (InterruptedException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (IOException e) { throw new LogException(e); } }
public Object prepare(Xid xid, List branches) throws LogException { int branchCount = branches.size(); byte[][] data = new byte[3 + 2 * branchCount][]; data[0] = intToBytes(xid.getFormatId()); data[1] = xid.getGlobalTransactionId(); data[2] = xid.getBranchQualifier(); int i = 3; for (Iterator iterator = branches.iterator(); iterator.hasNext();) { TransactionBranchInfo transactionBranchInfo = (TransactionBranchInfo) iterator.next(); data[i++] = transactionBranchInfo.getBranchXid().getBranchQualifier(); data[i++] = transactionBranchInfo.getResourceName().getBytes(); } try { XACommittingTx committingTx = logger.putCommit(data); return committingTx; } catch (LogClosedException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (LogRecordSizeException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (LogFileOverflowException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (InterruptedException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (IOException e) { throw new LogException(e); } }
public Object prepare(Xid xid, List branches) throws LogException { int branchCount = branches.size(); byte[][] data = new byte[3 + 2 * branchCount][]; data[0] = intToBytes(xid.getFormatId()); data[1] = xid.getGlobalTransactionId(); data[2] = xid.getBranchQualifier(); int i = 3; for (Iterator iterator = branches.iterator(); iterator.hasNext();) { TransactionBranchInfo transactionBranchInfo = (TransactionBranchInfo) iterator.next(); data[i++] = transactionBranchInfo.getBranchXid().getBranchQualifier(); data[i++] = transactionBranchInfo.getResourceName().getBytes(); } try { XACommittingTx committingTx = logger.putCommit(data); return committingTx; } catch (LogClosedException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (LogRecordSizeException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (LogFileOverflowException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (InterruptedException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (IOException e) { throw new LogException(e); } }
public Object prepare(Xid xid, List<? extends TransactionBranchInfo> branches) throws LogException { int branchCount = branches.size(); byte[][] data = new byte[3 + 2 * branchCount][]; data[0] = intToBytes(xid.getFormatId()); data[1] = xid.getGlobalTransactionId(); data[2] = xid.getBranchQualifier(); int i = 3; for (TransactionBranchInfo transactionBranchInfo : branches) { data[i++] = transactionBranchInfo.getBranchXid().getBranchQualifier(); data[i++] = transactionBranchInfo.getResourceName().getBytes(); } try { XACommittingTx committingTx = logger.putCommit(data); return committingTx; } catch (LogClosedException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (LogRecordSizeException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (LogFileOverflowException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (InterruptedException e) { throw (IllegalStateException) new IllegalStateException().initCause(e); } catch (IOException e) { throw new LogException(e); } }