gpt4 book ai didi

com.arjuna.ats.internal.jta.utils.XAUtils.getXANodeName()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 23:21:05 28 4
gpt4 key购买 nike

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

XAUtils.getXANodeName介绍

[英]Trying to convert Xid to Narayana implementation for being able to access the internal byte array in order to return node name codified inside of the Xid.
[中]尝试将Xid转换为Narayana实现,以便能够访问内部字节数组,以返回编码在Xid内部的节点名称。

代码示例

代码示例来源:origin: org.jboss.narayana.jta/jta

@Override
public Vote checkXid(Xid xid)
{
  List<String> _xaRecoveryNodes = jtaPropertyManager.getJTAEnvironmentBean().getXaRecoveryNodes();
  if(_xaRecoveryNodes == null || _xaRecoveryNodes.size() == 0) {
    doWarning();
    return Vote.ABSTAIN;
  }
  if ((_xaRecoveryNodes.contains(RECOVER_ALL_NODES)))
  {
    if (jtaLogger.logger.isDebugEnabled()) {
      jtaLogger.logger.debug("Ignoring node name. Will recover " + xid);
    }
    return Vote.ROLLBACK;
  }
  String nodeName = XAUtils.getXANodeName(xid);
  if (jtaLogger.logger.isDebugEnabled()) {
    jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);
  }
  if (_xaRecoveryNodes.contains(nodeName))
  {
    return Vote.ROLLBACK;
  }
  else
  {
    return Vote.ABSTAIN;
  }
}

代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta

@Override
public Vote checkXid(Xid xid)
{
  List<String> _xaRecoveryNodes = jtaPropertyManager.getJTAEnvironmentBean().getXaRecoveryNodes();
  if(_xaRecoveryNodes == null || _xaRecoveryNodes.size() == 0) {
    doWarning();
    return Vote.ABSTAIN;
  }
  if ((_xaRecoveryNodes.contains(RECOVER_ALL_NODES)))
  {
    if (jtaLogger.logger.isDebugEnabled()) {
      jtaLogger.logger.debug("Ignoring node name. Will recover " + xid);
    }
    return Vote.ROLLBACK;
  }
  String nodeName = XAUtils.getXANodeName(xid);
  if (jtaLogger.logger.isDebugEnabled()) {
    jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);
  }
  if (_xaRecoveryNodes.contains(nodeName))
  {
    return Vote.ROLLBACK;
  }
  else
  {
    return Vote.ABSTAIN;
  }
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

@Override
public Vote checkXid(Xid xid)
{
  List<String> _xaRecoveryNodes = jtaPropertyManager.getJTAEnvironmentBean().getXaRecoveryNodes();
  if(_xaRecoveryNodes == null || _xaRecoveryNodes.size() == 0) {
    doWarning();
    return Vote.ABSTAIN;
  }
  if ((_xaRecoveryNodes.contains(RECOVER_ALL_NODES)))
  {
    if (jtaLogger.logger.isDebugEnabled()) {
      jtaLogger.logger.debug("Ignoring node name. Will recover " + xid);
    }
    return Vote.ROLLBACK;
  }
  String nodeName = XAUtils.getXANodeName(xid);
  if (jtaLogger.logger.isDebugEnabled()) {
    jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);
  }
  if (_xaRecoveryNodes.contains(nodeName))
  {
    return Vote.ROLLBACK;
  }
  else
  {
    return Vote.ABSTAIN;
  }
}

代码示例来源:origin: jbosstm/narayana

@Override
public Vote checkXid(Xid xid)
{
  List<String> _xaRecoveryNodes = jtaPropertyManager.getJTAEnvironmentBean().getXaRecoveryNodes();
  if(_xaRecoveryNodes == null || _xaRecoveryNodes.size() == 0) {
    doWarning();
    return Vote.ABSTAIN;
  }
  if ((_xaRecoveryNodes.contains(RECOVER_ALL_NODES)))
  {
    if (jtaLogger.logger.isDebugEnabled()) {
      jtaLogger.logger.debug("Ignoring node name. Will recover " + xid);
    }
    return Vote.ROLLBACK;
  }
  String nodeName = XAUtils.getXANodeName(xid);
  if (jtaLogger.logger.isDebugEnabled()) {
    jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);
  }
  if (_xaRecoveryNodes.contains(nodeName))
  {
    return Vote.ROLLBACK;
  }
  else
  {
    return Vote.ABSTAIN;
  }
}

代码示例来源:origin: jbosstm/narayana

@Override
public Vote checkXid(Xid xid)
{
  List<String> _xaRecoveryNodes = jtaPropertyManager.getJTAEnvironmentBean().getXaRecoveryNodes();
  if(_xaRecoveryNodes == null || _xaRecoveryNodes.size() == 0) {
    doWarning();
    return Vote.ABSTAIN;
  }
  if ((_xaRecoveryNodes.contains(RECOVER_ALL_NODES)))
  {
    if (jtaLogger.logger.isDebugEnabled()) {
      jtaLogger.logger.debug("Ignoring node name. Will recover " + xid);
    }
    return Vote.ROLLBACK;
  }
  String nodeName = XAUtils.getXANodeName(xid);
  if (jtaLogger.logger.isDebugEnabled()) {
    jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);
  }
  if (_xaRecoveryNodes.contains(nodeName))
  {
    return Vote.ROLLBACK;
  }
  else
  {
    return Vote.ABSTAIN;
  }
}

代码示例来源:origin: org.jboss.jbossts/jbossjta

@Override
public Vote checkXid(Xid xid)
{
  List<String> _xaRecoveryNodes = jtaPropertyManager.getJTAEnvironmentBean().getXaRecoveryNodes();
  if(_xaRecoveryNodes == null || _xaRecoveryNodes.size() == 0) {
    doWarning();
    return Vote.ABSTAIN;
  }
  if ((_xaRecoveryNodes.contains(RECOVER_ALL_NODES)))
  {
    if (jtaLogger.logger.isDebugEnabled()) {
      jtaLogger.logger.debug("Ignoring node name. Will recover " + xid);
    }
    return Vote.ROLLBACK;
  }
  String nodeName = XAUtils.getXANodeName(xid);
  if (jtaLogger.logger.isDebugEnabled()) {
    jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);
  }
  if (_xaRecoveryNodes.contains(nodeName))
  {
    return Vote.ROLLBACK;
  }
  else
  {
    return Vote.ABSTAIN;
  }
}

代码示例来源:origin: jbosstm/narayana

@Test
public void test()
{
  Vector xaRecoveryNodes = new Vector();
  xaRecoveryNodes.add("2");
  System.err.println("Bogus XA node name: "+"2");
  XidImple xid = new XidImple(new Uid());
  String nodeName = XAUtils.getXANodeName(xid);
  // should fail.
  System.err.println("XA node name: "+nodeName);
  System.err.println("Xid to recover: "+xid);
  assertFalse( xaRecoveryNodes.contains(nodeName) );
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

String nodeName = XAUtils.getXANodeName(xid);
if (jtaLogger.logger.isDebugEnabled()) {
  jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);

代码示例来源:origin: jbosstm/narayana

String nodeName = XAUtils.getXANodeName(xid);
if (jtaLogger.logger.isDebugEnabled()) {
  jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);

代码示例来源:origin: org.jboss.narayana.jta/jta

String nodeName = XAUtils.getXANodeName(xid);
if (jtaLogger.logger.isDebugEnabled()) {
  jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);

代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta

String nodeName = XAUtils.getXANodeName(xid);
if (jtaLogger.logger.isDebugEnabled()) {
  jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);

代码示例来源:origin: jbosstm/narayana

String nodeName = XAUtils.getXANodeName(xid);
if (jtaLogger.logger.isDebugEnabled()) {
  jtaLogger.logger.debug("node name of " + xid + " is " + nodeName);

代码示例来源:origin: jbosstm/narayana

@Test
public void test()
{
  DummyXA xa = new DummyXA(false);
  
  assertFalse(XAUtils.mustEndSuspendedRMs(xa));
  assertTrue(XAUtils.canOptimizeDelist(xa));      
  assertEquals(XAUtils.getXANodeName(new XidImple(new Uid())), TxControl.getXANodeName());
}

代码示例来源:origin: jboss.jbossts/jbossjts

.getXANodeName((Xid) xids[j]);
boolean doRecovery = false;

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