gpt4 book ai didi

org.objectweb.howl.log.xa.XALogRecord.getTx()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 13:03:05 25 4
gpt4 key购买 nike

本文整理了Java中org.objectweb.howl.log.xa.XALogRecord.getTx()方法的一些代码示例,展示了XALogRecord.getTx()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XALogRecord.getTx()方法的具体详情如下:
包路径:org.objectweb.howl.log.xa.XALogRecord
类名称:XALogRecord
方法名:getTx

XALogRecord.getTx介绍

暂无

代码示例

代码示例来源:origin: org.apache.geronimo.components/geronimo-transaction

public void onRecord(LogRecord plainlr) {
  XALogRecord lr = (XALogRecord) plainlr;
  short recordType = lr.type;
  XACommittingTx tx = lr.getTx();
  if (recordType == LogRecordType.XACOMMIT) {
    byte[][] data = tx.getRecord();
    assert data[0].length == 4;
    int formatId = bytesToInt(data[1]);
    byte[] globalId = data[1];
    byte[] branchId = data[2];
    Xid masterXid = xidFactory.recover(formatId, globalId, branchId);
    Recovery.XidBranchesPair xidBranchesPair = new Recovery.XidBranchesPair(masterXid, tx);
    recoveredTx.put(masterXid, xidBranchesPair);
    log.debug("recovered prepare record for master xid: " + masterXid);
    for (int i = 3; i < data.length; i += 2) {
      byte[] branchBranchId = data[i];
      String name = new String(data[i + 1]);
      Xid branchXid = xidFactory.recover(formatId, globalId, branchBranchId);
      TransactionBranchInfoImpl branchInfo = new TransactionBranchInfoImpl(branchXid, name);
      xidBranchesPair.addBranch(branchInfo);
      log.debug("recovered branch for resource manager, branchId " + name + ", " + branchXid);
    }
  } else {
    if(recordType != LogRecordType.END_OF_LOG) { // This value crops up every time the server is started
      log.warn("Received unexpected log record: " + lr +" ("+recordType+")");
    }
  }
}

代码示例来源:origin: apache/felix

public void onRecord(LogRecord plainlr) {
  XALogRecord lr = (XALogRecord) plainlr;
  short recordType = lr.type;
  XACommittingTx tx = lr.getTx();
  if (recordType == LogRecordType.XACOMMIT) {
    byte[][] data = tx.getRecord();
    assert data[0].length == 4;
    int formatId = bytesToInt(data[1]);
    byte[] globalId = data[1];
    byte[] branchId = data[2];
    Xid masterXid = xidFactory.recover(formatId, globalId, branchId);
    Recovery.XidBranchesPair xidBranchesPair = new Recovery.XidBranchesPair(masterXid, tx);
    recoveredTx.put(masterXid, xidBranchesPair);
    log.debug("recovered prepare record for master xid: " + masterXid);
    for (int i = 3; i < data.length; i += 2) {
      byte[] branchBranchId = data[i];
      String name = new String(data[i + 1]);
      Xid branchXid = xidFactory.recover(formatId, globalId, branchBranchId);
      TransactionBranchInfoImpl branchInfo = new TransactionBranchInfoImpl(branchXid, name);
      xidBranchesPair.addBranch(branchInfo);
      log.debug("recovered branch for resource manager, branchId " + name + ", " + branchXid);
    }
  } else {
    if(recordType != LogRecordType.END_OF_LOG) { // This value crops up every time the server is started
      log.warn("Received unexpected log record: " + lr +" ("+recordType+")");
    }
  }
}

代码示例来源:origin: org.apache.servicemix.transaction/org.apache.servicemix.transaction

public void onRecord(LogRecord plainlr) {
  XALogRecord lr = (XALogRecord) plainlr;
  short recordType = lr.type;
  XACommittingTx tx = lr.getTx();
  if (recordType == LogRecordType.XACOMMIT) {
    byte[][] data = tx.getRecord();
    assert data[0].length == 4;
    int formatId = bytesToInt(data[1]);
    byte[] globalId = data[1];
    byte[] branchId = data[2];
    Xid masterXid = xidFactory.recover(formatId, globalId, branchId);
    Recovery.XidBranchesPair xidBranchesPair = new Recovery.XidBranchesPair(masterXid, tx);
    recoveredTx.put(masterXid, xidBranchesPair);
    log.debug("recovered prepare record for master xid: " + masterXid);
    for (int i = 3; i < data.length; i += 2) {
      byte[] branchBranchId = data[i];
      String name = new String(data[i + 1]);
      Xid branchXid = xidFactory.recover(formatId, globalId, branchBranchId);
      TransactionBranchInfoImpl branchInfo = new TransactionBranchInfoImpl(branchXid, name);
      xidBranchesPair.addBranch(branchInfo);
      log.debug("recovered branch for resource manager, branchId " + name + ", " + branchXid);
    }
  } else {
    if(recordType != LogRecordType.END_OF_LOG) { // This value crops up every time the server is started
      log.warn("Received unexpected log record: " + lr +" ("+recordType+")");
    }
  }
}

代码示例来源:origin: org.apache.geronimo/com.springsource.org.apache.geronimo.transaction

public void onRecord(LogRecord plainlr) {
  XALogRecord lr = (XALogRecord) plainlr;
  short recordType = lr.type;
  XACommittingTx tx = lr.getTx();
  if (recordType == LogRecordType.XACOMMIT) {
    byte[][] data = tx.getRecord();
    assert data[0].length == 4;
    int formatId = bytesToInt(data[1]);
    byte[] globalId = data[1];
    byte[] branchId = data[2];
    Xid masterXid = xidFactory.recover(formatId, globalId, branchId);
    Recovery.XidBranchesPair xidBranchesPair = new Recovery.XidBranchesPair(masterXid, tx);
    recoveredTx.put(masterXid, xidBranchesPair);
    log.debug("recovered prepare record for master xid: " + masterXid);
    for (int i = 3; i < data.length; i += 2) {
      byte[] branchBranchId = data[i];
      String name = new String(data[i + 1]);
      Xid branchXid = xidFactory.recover(formatId, globalId, branchBranchId);
      TransactionBranchInfoImpl branchInfo = new TransactionBranchInfoImpl(branchXid, name);
      xidBranchesPair.addBranch(branchInfo);
      log.debug("recovered branch for resource manager, branchId " + name + ", " + branchXid);
    }
  } else {
    if(recordType != LogRecordType.END_OF_LOG) { // This value crops up every time the server is started
      log.warn("Received unexpected log record: " + lr +" ("+recordType+")");
    }
  }
}

代码示例来源:origin: org.kuali.jotm/jotm-core

int xidstatus;
XACommittingTx myxacommittx = lr.getTx();
tempRec = lr.getFields() [0];

代码示例来源:origin: org.ow2.jotm/jotm-core

int xidstatus;
XACommittingTx myxacommittx = lr.getTx();
tempRec = lr.getFields() [0];

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com