gpt4 book ai didi

com.arjuna.ats.jta.utils.XAHelper类的使用及代码示例

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

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

XAHelper介绍

[英]Some useful utility routines.
[中]一些有用的实用程序。

代码示例

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

jtaLogger.i18NLogger.warn_resources_arjunacore_rollbacknulltx("XAResourceRecord.rollback");
  _theXAResource = getNewXAResource();
      if (endAssociation())
        _theXAResource.end(_tranID, XAResource.TMSUCCESS);
      jtaLogger.i18NLogger.warn_resources_arjunacore_rollbackerror(XAHelper.xidToString(_tranID),
          _theXAResource.toString(), XAHelper.printXAErrorCode(e1), e1);
      removeConnection();
    jtaLogger.i18NLogger.warn_resources_arjunacore_rollbackerror(XAHelper.xidToString(_tranID), _theXAResource.toString(), "-", e);
    _theXAResource.rollback(_tranID);
      jtaLogger.i18NLogger.warn_resources_arjunacore_rollbackerror(XAHelper.xidToString(_tranID),
          _theXAResource.toString(), XAHelper.printXAErrorCode(e1), e1);
    jtaLogger.i18NLogger.warn_resources_arjunacore_rollbackerror(XAHelper.xidToString(_tranID),
        _theXAResource.toString(), "-", e2);
  jtaLogger.i18NLogger.warn_resources_arjunacore_noresource(XAHelper.xidToString(_tranID));
  jtaLogger.i18NLogger.info_resources_arjunacore_assumecomplete(XAHelper.xidToString(_tranID));

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

/**
 * Is the Xid is in the failure list, i.e., the list of those transactions
 * we couldn't recover, possibly because of transient failures. If so,
 * return the uid of (one of) the records and remove it from the list.
 */
private final Uid previousFailure(Xid xid)
{
  if (_failures == null)
  {
    return null;
  }
  Enumeration e = _failures.keys();
  while (e.hasMoreElements())
  {
    Xid theXid = (Xid) e.nextElement();
    if (XAHelper.sameXID(xid, theXid))
    {
      // remove uid from failure list
      Vector failureItem = (Vector) _failures.get(theXid);
      Uid u = (Uid) failureItem.remove(0);
      if (failureItem.size() == 0)
        _failures.remove(theXid);
      return u;
    }
  }
  // not present in the failures list.
  return null;
}

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

jtaLogger.i18NLogger.warn_resources_arjunacore_rollbackerror(XAHelper.xidToString(xid),
    xaResource.toString(), XAHelper.printXAErrorCode(e), e);

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

jtaLogger.i18NLogger.warn_resources_arjunacore_commitnulltx("XAResourceRecord.commit");
  _theXAResource = getNewXAResource();
    _theXAResource.commit(_tranID, false);
    if (notAProblem(e1, true))
      jtaLogger.i18NLogger.warn_resources_arjunacore_commitxaerror(XAHelper.xidToString(_tranID),
          _theXAResource.toString(), XAHelper.printXAErrorCode(e1), e1);
    jtaLogger.i18NLogger.warn_resources_arjunacore_commitxaerror(XAHelper.xidToString(_tranID),
          _theXAResource.toString(), "-", e2);
    removeConnection();
  jtaLogger.i18NLogger.warn_resources_arjunacore_noresource(XAHelper.xidToString(_tranID));
    jtaLogger.i18NLogger.info_resources_arjunacore_assumecomplete(XAHelper.xidToString(_tranID));

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

public int topLevelPrepare()
    jtaLogger.logger.trace("XAResourceRecord.topLevelPrepare for " + this + ", record id=" + order());
    jtaLogger.i18NLogger.warn_resources_arjunacore_preparenulltx("XAResourceRecord.prepare");
        removeConnection();
    endAssociation(XAResource.TMSUCCESS, TxInfo.NOT_ASSOCIATED);
    if (_theXAResource.prepare(_tranID) == XAResource.XA_RDONLY)
    addDeferredThrowable(e1);
    jtaLogger.i18NLogger.warn_resources_arjunacore_preparefailed(XAHelper.xidToString(_tranID),
        _theXAResource.toString(), XAHelper.printXAErrorCode(e1), e1);
    jtaLogger.i18NLogger.warn_resources_arjunacore_preparefailed(XAHelper.xidToString(_tranID),
        _theXAResource.toString(), "-", e2);

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

Enumeration el = _resources.keys();
    while (el.hasMoreElements())
      XAResource x = (XAResource) el.nextElement();
      if (x.isSameRM(xaRes))
        return (TxInfo) _resources.get(x);
  el = _duplicateResources.keys();
    while (el.hasMoreElements())
      XAResource x = (XAResource) el.nextElement();
      if (x.isSameRM(xaRes))
        return (TxInfo) _duplicateResources.get(x);
jtaLogger.i18NLogger.warn_transaction_arjunacore_newtmerror("TransactionImple.isNewRM",
          XAHelper.printXAErrorCode(ex), ex);
jtaLogger.i18NLogger.warn_transaction_arjunacore_newtmerror("TransactionImple.isNewRM",
          "-", e);

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

trans = xares.recover(XAResource.TMSTARTRSCAN);
  jtaLogger.i18NLogger.warn_recovery_xarecovery1(_logName+".xaRecovery", XAHelper.printXAErrorCode(e), e);
    xares.recover(XAResource.TMENDRSCAN);
  _xidScans = new Hashtable<XAResource,RecoveryXids>();
else
  xidsToRecover = _xidScans.get(xares);
    java.util.Enumeration<RecoveryXids> elements = _xidScans.elements();
    boolean found = false;
    while (elements.hasMoreElements())
      xidsToRecover = elements.nextElement();

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

info = (TxInfo) _resources.get(xaRes);
    info = (TxInfo) _duplicateResources.get(xaRes);
            .xaStartParameters(XAResource.TMRESUME));
    xaRes.start(info.xid(), xaStartResume);
            .xaStartParameters(XAResource.TMJOIN));
    xaRes.start(info.xid(), xaStartJoin);
jtaLogger.i18NLogger.warn_transaction_arjunacore_enlisterror("TransactionImple.enlistResource",
    XAHelper.printXAErrorCode(exp));
  if (_resources.size() == 0)// first ever, so no need for
          jtaLogger.i18NLogger.warn_transaction_arjunacore_timeouterror("TransactionImple.enlistResource",XAHelper.xidToString(xid),  XAHelper.printXAErrorCode(te), te);
      jtaLogger.i18NLogger.warn_transaction_arjunacore_enliststarterror("TransactionImple.enlistResource",
          XAHelper.xidToString(xid), XAHelper.printXAErrorCode(e), e);
      jtaLogger.i18NLogger.warn_transaction_arjunacore_enliststarterror("TransactionImple.enlistResource",
          XAHelper.xidToString(xid), XAHelper.printXAErrorCode(e), e);
  jtaLogger.i18NLogger.warn_transaction_arjunacore_xastart("TransactionImple.enlistResource - xa_start ",
      XAHelper.xidToString(xid), XAHelper.printXAErrorCode(ex), ex);

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

throw new javax.transaction.SystemException(
    "TransactionImple.enlistResource - "
        + jtaxLogger.i18NLogger.get_jtax_transaction_jts_nullparam());
    info = (TxInfo) _resources.get(xaRes);
      info = (TxInfo) _duplicateResources.get(xaRes);
      xaRes.start(info.xid(), XAResource.TMRESUME);
      xaRes.start(info.xid(), XAResource.TMJOIN);
      XAHelper.printXAErrorCode(exp), exp);
    if (_resources.size() == 0)// first ever, so no need for
            xaRes.setTransactionTimeout(timeout);
                XAHelper.printXAErrorCode(te), XAHelper.xidToString(xid), te);
              XAHelper.printXAErrorCode(e), XAHelper.xidToString(xid), e);
            XAHelper.printXAErrorCode(e), XAHelper.xidToString(xid), e);
    jtaxLogger.i18NLogger.warn_jtax_transaction_jts_xaerror("TransactionImple.enlistResource - xa_start: ", XAHelper.printXAErrorCode(ex), ex);

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

throw new javax.transaction.SystemException(
      "TransactionImple.delistResource - " + jtaLogger.i18NLogger.get_transaction_arjunacore_nullres() );
  break;
default:
  throw new IllegalStateException( jtaLogger.i18NLogger.get_transaction_arjunacore_inactive() );
    info = (TxInfo) _resources.get(xaRes);
      info = (TxInfo) _duplicateResources.get(xaRes);
    jtaLogger.i18NLogger.warn_transaction_arjunacore_unknownresource("TransactionImple.delistResource");
          xaRes.end(info.xid(), XAResource.TMFAIL);
          xaRes.rollback(info.xid());
        xaRes.end(info.xid(), XAResource.TMSUCCESS);
        info.setState(TxInfo.NOT_ASSOCIATED);
  jtaLogger.i18NLogger.warn_transaction_arjunacore_delistresource("TransactionImple.delistResource", XAHelper.printXAErrorCode(exp), exp);

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

private void xaRecoverySecondPass(XAResource xares) { 		
  RecoveryXids xidsToRecover = _xidScans.get(xares);
  if (xidsToRecover != null) {
    try {
                jtaLogger.i18NLogger.warn_recovery_failedtorecover(_logName+".xaRecovery", Integer.toString(recoveryStatus));
                xares.forget(xids[j]);
                jtaLogger.i18NLogger.warn_recovery_forgetfailed(_logName+".xaRecovery", e);
      jtaLogger.i18NLogger.warn_recovery_generalrecoveryerror(_logName + ".xaRecovery", e);
        xares.recover(XAResource.TMENDRSCAN);
      jtaLogger.i18NLogger.warn_recovery_xarecovery1(_logName+".xaRecovery", XAHelper.printXAErrorCode(e), e);

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

throw new javax.transaction.SystemException(
    "TransactionImple.delistResource - "
        + jtaLogger.logMesg
  info = (TxInfo) _resources.get(xaRes);
    info = (TxInfo) _duplicateResources.get(xaRes);
        xaRes.end(info.xid(), XAResource.TMFAIL);
        xaRes.rollback(info.xid());
      xaRes.end(info.xid(), XAResource.TMSUCCESS);
      info.setState(TxInfo.NOT_ASSOCIATED);
          new Object[]
          { "TransactionImple.delistResource",
              XAHelper.printXAErrorCode(exp) });

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

jtaLogger.i18NLogger.warn_resources_arjunacore_opcnulltx("XAResourceRecord.1pc");
    if (endAssociation())
      _theXAResource.end(_tranID, XAResource.TMSUCCESS);
      default:
      jtaLogger.i18NLogger.warn_resources_arjunacore_opcerror(XAHelper.xidToString(_tranID),
          _theXAResource.toString(), XAHelper.printXAErrorCode(e1), e1);
      removeConnection();
    jtaLogger.i18NLogger.warn_resources_arjunacore_opcerror(XAHelper.xidToString(_tranID),
          _theXAResource.toString(), "-", e);
      _theXAResource.commit(_tranID, true);
    else
      _theXAResource.rollback(_tranID);
    jtaLogger.i18NLogger.warn_resources_arjunacore_opcerror(XAHelper.xidToString(_tranID),
          _theXAResource.toString(), XAHelper.printXAErrorCode(e1), e1);
    jtaLogger.i18NLogger.warn_resources_arjunacore_opcerror(XAHelper.xidToString(_tranID),
          _theXAResource.toString(), "-", e2);

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

/**
 * Commit the one phase resource.
 * @return TwoPhaseOutcome.FINISH_OK or TwoPhaseOutcome.FINISH_ERROR
 */
public int rollback()
{
  try
  {
    xaResource.rollback(xid) ;
    return TwoPhaseOutcome.FINISH_OK ;
  }
  catch (final XAException xae)
  {
    jtaLogger.i18NLogger.warn_resources_arjunacore_XAOnePhaseResource_rollbackexception(XAHelper.xidToString(xid), xae);
  }
  catch (final Throwable ex)
  {
    if (jtaLogger.logger.isTraceEnabled()) {
      jtaLogger.logger.trace("XAOnePhaseResource.rollback(" + xid + ") " + ex.getMessage());
    }
  }
  return TwoPhaseOutcome.FINISH_ERROR ;
}

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

((XAResource) connectableResource).commit(xid, false);
  hasCompleted = true;
  committed = true;
  return heuristic;
} catch (Throwable e) {
  jtaLogger.i18NLogger.warn_resources_arjunacore_commitxaerror(XAHelper.xidToString(xid),
    connectableResource.toString(), "-", e);
  return TwoPhaseOutcome.FINISH_ERROR;

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

((XAResource) connectableResource).rollback(xid);
  hasCompleted = true;
  committed = false;
  return heuristic;
} catch (Throwable e) {
    jtaLogger.i18NLogger.warn_resources_arjunacore_rollbackerror(XAHelper.xidToString(xid),
      connectableResource.toString(), "-", e);
  return TwoPhaseOutcome.FINISH_ERROR;

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

removeConnection();
removeConnection();
if (endAssociation())
  _theXAResource.end(_tranID, XAResource.TMSUCCESS);
if (_theXAResource.prepare(_tranID) == XAResource.XA_RDONLY)
      new Object[] { _tranID, _theXAResource, XAHelper.printXAErrorCode(e1) }, e1);

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

jtaLogger.i18NLogger.info_recovery_rollingback(XAHelper.xidToString(xid));
  xares.rollback(xid);
jtaLogger.i18NLogger.warn_recovery_xarecovery1(_logName+".xaRecovery", XAHelper.printXAErrorCode(e1), e1);
jtaLogger.i18NLogger.warn_recovery_xarecovery2(_logName+".xaRecovery", e2);

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

Iterator<SerializableXAResourceDeserializer> iterator = getXAResourceDeserializers().iterator();
      while (iterator.hasNext()) {
        SerializableXAResourceDeserializer proxyXAResourceDeserializer = iterator.next();
          jtaLogger.i18NLogger.warn_resources_arjunacore_classnotfound(className);
          haveXAResource = false;
      jtaLogger.i18NLogger.warn_resources_arjunacore_restorestate(ex);
    _theXAResource = getNewXAResource();
      jtaLogger.i18NLogger.warn_resources_arjunacore_norecoveryxa( toString() );
jtaLogger.i18NLogger.warn_resources_arjunacore_restorestateerror(_theXAResource.toString(), XAHelper.xidToString(_tranID), e);

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

jtaLogger.i18NLogger.warn_resources_arjunacore_restorestate(ex);
    _theXAResource = getNewXAResource();
      jtaLogger.i18NLogger.warn_resources_arjunacore_norecoveryxa( toString() );
jtaLogger.i18NLogger.warn_resources_arjunacore_restorestateerror(_theXAResource.toString(), XAHelper.xidToString(_tranID), e);

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