gpt4 book ai didi

bitronix.tm.internal.XAResourceHolderState.getUniqueName()方法的使用及代码示例

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

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

XAResourceHolderState.getUniqueName介绍

暂无

代码示例

代码示例来源:origin: bitronix/btm

protected static Set<String> collectResourcesUniqueNames(List<XAResourceHolderState> resources) {
  Set<String> uniqueNames = new HashSet<String>();
  for (XAResourceHolderState resourceHolderState : resources) {
    uniqueNames.add(resourceHolderState.getUniqueName());
  }
  return uniqueNames;
}

代码示例来源:origin: org.codehaus.btm/btm

protected static Set<String> collectResourcesUniqueNames(List<XAResourceHolderState> resources) {
  Set<String> uniqueNames = new HashSet<String>();
  for (XAResourceHolderState resourceHolderState : resources) {
    uniqueNames.add(resourceHolderState.getUniqueName());
  }
  return uniqueNames;
}

代码示例来源:origin: org.mule.btm/mule-btm

protected static Set<String> collectResourcesUniqueNames(List<XAResourceHolderState> resources) {
  Set<String> uniqueNames = new HashSet<String>();
  for (XAResourceHolderState resourceHolderState : resources) {
    uniqueNames.add(resourceHolderState.getUniqueName());
  }
  return uniqueNames;
}

代码示例来源:origin: com.github.marcus-nl.btm/btm

protected static Set<String> collectResourcesUniqueNames(List<XAResourceHolderState> resources) {
  Set<String> uniqueNames = new HashSet<String>();
  for (XAResourceHolderState resourceHolderState : resources) {
    uniqueNames.add(resourceHolderState.getUniqueName());
  }
  return uniqueNames;
}

代码示例来源:origin: org.codehaus.btm/btm

/**
 * Get a {@link Set} of unique names of all the enlisted {@link XAResourceHolderState}s.
 * @return a {@link Set} of unique names of all the enlisted {@link XAResourceHolderState}s.
 */
public Set<String> collectUniqueNames() {
  Set<String> names = new HashSet<String>(resources.size());
  for (XAResourceHolderState xaResourceHolderState : resources) {
    names.add(xaResourceHolderState.getUniqueName());
  }
  return Collections.unmodifiableSet(names);
}

代码示例来源:origin: com.github.marcus-nl.btm/btm

/**
 * Get a {@link Set} of unique names of all the enlisted {@link XAResourceHolderState}s.
 * @return a {@link Set} of unique names of all the enlisted {@link XAResourceHolderState}s.
 */
public Set<String> collectUniqueNames() {
  Set<String> names = new HashSet<String>(resources.size());
  for (XAResourceHolderState xaResourceHolderState : resources) {
    names.add(xaResourceHolderState.getUniqueName());
  }
  return Collections.unmodifiableSet(names);
}

代码示例来源:origin: bitronix/btm

/**
 * Get a {@link Set} of unique names of all the enlisted {@link XAResourceHolderState}s.
 * @return a {@link Set} of unique names of all the enlisted {@link XAResourceHolderState}s.
 */
public Set<String> collectUniqueNames() {
  Set<String> names = new HashSet<String>(resources.size());
  for (XAResourceHolderState xaResourceHolderState : resources) {
    names.add(xaResourceHolderState.getUniqueName());
  }
  return Collections.unmodifiableSet(names);
}

代码示例来源:origin: org.mule.btm/mule-btm

/**
 * Get a {@link Set} of unique names of all the enlisted {@link XAResourceHolderState}s.
 * @return a {@link Set} of unique names of all the enlisted {@link XAResourceHolderState}s.
 */
public Set<String> collectUniqueNames() {
  Set<String> names = new HashSet<String>(resources.size());
  for (XAResourceHolderState xaResourceHolderState : resources) {
    names.add(xaResourceHolderState.getUniqueName());
  }
  return Collections.unmodifiableSet(names);
}

代码示例来源:origin: com.github.marcus-nl.btm/btm

/**
 * Create a String representation of a list of {@link bitronix.tm.resource.common.XAResourceHolder}s. This
 * String will contain each resource's unique name.
 * @param resources a list of {@link bitronix.tm.resource.common.XAResourceHolder}s.
 * @return a String representation of the list.
 */
public static String collectResourcesNames(Collection<XAResourceHolderState> resources) {
  StringBuilder sb = new StringBuilder();
  sb.append("[");
  Iterator<XAResourceHolderState> it = resources.iterator();
  while (it.hasNext()) {
    XAResourceHolderState resourceHolderState = it.next();
    sb.append(resourceHolderState.getUniqueName());
    if (it.hasNext())
      sb.append(", ");
  }
  sb.append("]");
  return sb.toString();
}

代码示例来源:origin: bitronix/btm

/**
 * Create a String representation of a list of {@link bitronix.tm.resource.common.XAResourceHolder}s. This
 * String will contain each resource's unique name.
 * @param resources a list of {@link bitronix.tm.resource.common.XAResourceHolder}s.
 * @return a String representation of the list.
 */
public static String collectResourcesNames(Collection<XAResourceHolderState> resources) {
  StringBuilder sb = new StringBuilder();
  sb.append("[");
  Iterator<XAResourceHolderState> it = resources.iterator();
  while (it.hasNext()) {
    XAResourceHolderState resourceHolderState = it.next();
    sb.append(resourceHolderState.getUniqueName());
    if (it.hasNext())
      sb.append(", ");
  }
  sb.append("]");
  return sb.toString();
}

代码示例来源:origin: org.codehaus.btm/btm

/**
 * Create a String representation of a list of {@link bitronix.tm.resource.common.XAResourceHolder}s. This
 * String will contain each resource's unique name.
 * @param resources a list of {@link bitronix.tm.resource.common.XAResourceHolder}s.
 * @return a String representation of the list.
 */
public static String collectResourcesNames(Collection<XAResourceHolderState> resources) {
  StringBuilder sb = new StringBuilder();
  sb.append("[");
  Iterator<XAResourceHolderState> it = resources.iterator();
  while (it.hasNext()) {
    XAResourceHolderState resourceHolderState = it.next();
    sb.append(resourceHolderState.getUniqueName());
    if (it.hasNext())
      sb.append(", ");
  }
  sb.append("]");
  return sb.toString();
}

代码示例来源:origin: org.mule.btm/mule-btm

/**
 * Create a String representation of a list of {@link bitronix.tm.resource.common.XAResourceHolder}s. This
 * String will contain each resource's unique name.
 * @param resources a list of {@link bitronix.tm.resource.common.XAResourceHolder}s.
 * @return a String representation of the list.
 */
public static String collectResourcesNames(Collection<XAResourceHolderState> resources) {
  StringBuilder sb = new StringBuilder();
  sb.append("[");
  Iterator<XAResourceHolderState> it = resources.iterator();
  while (it.hasNext()) {
    XAResourceHolderState resourceHolderState = it.next();
    sb.append(resourceHolderState.getUniqueName());
    if (it.hasNext())
      sb.append(", ");
  }
  sb.append("]");
  return sb.toString();
}

代码示例来源:origin: bitronix/btm

/**
 * Log exceptions that happened during a phase failure.
 * @param ex the phase exception.
 */
protected void logFailedResources(PhaseException ex) {
  List<Exception> exceptions = ex.getExceptions();
  List<XAResourceHolderState> resources = ex.getResourceStates();
  for (int i = 0; i < exceptions.size(); i++) {
    Exception e = exceptions.get(i);
    XAResourceHolderState holderState = resources.get(i);
    log.error("resource " + holderState.getUniqueName() + " failed on " + holderState.getXid(), e);
  }
}

代码示例来源:origin: com.github.marcus-nl.btm/btm

/**
 * Log exceptions that happened during a phase failure.
 * @param ex the phase exception.
 */
protected void logFailedResources(PhaseException ex) {
  List<Exception> exceptions = ex.getExceptions();
  List<XAResourceHolderState> resources = ex.getResourceStates();
  for (int i = 0; i < exceptions.size(); i++) {
    Exception e = exceptions.get(i);
    XAResourceHolderState holderState = resources.get(i);
    log.error("resource " + holderState.getUniqueName() + " failed on " + holderState.getXid(), e);
  }
}

代码示例来源:origin: org.codehaus.btm/btm

/**
 * Log exceptions that happened during a phase failure.
 * @param ex the phase exception.
 */
protected void logFailedResources(PhaseException ex) {
  List<Exception> exceptions = ex.getExceptions();
  List<XAResourceHolderState> resources = ex.getResourceStates();
  for (int i = 0; i < exceptions.size(); i++) {
    Exception e = exceptions.get(i);
    XAResourceHolderState holderState = resources.get(i);
    log.error("resource " + holderState.getUniqueName() + " failed on " + holderState.getXid(), e);
  }
}

代码示例来源:origin: org.mule.btm/mule-btm

/**
 * Log exceptions that happened during a phase failure.
 * @param ex the phase exception.
 */
protected void logFailedResources(PhaseException ex) {
  List<Exception> exceptions = ex.getExceptions();
  List<XAResourceHolderState> resources = ex.getResourceStates();
  for (int i = 0; i < exceptions.size(); i++) {
    Exception e = exceptions.get(i);
    XAResourceHolderState holderState = resources.get(i);
    log.error("resource " + holderState.getUniqueName() + " failed on " + holderState.getXid(), e);
  }
}

代码示例来源:origin: bitronix/btm

private void handleXAException(XAResourceHolderState failedResourceHolder, XAException xaException) throws XAException {
  switch (xaException.errorCode) {
    case XAException.XA_HEURRB:
      forgetHeuristicRollback(failedResourceHolder);
      return;
    case XAException.XA_HEURCOM:
    case XAException.XA_HEURHAZ:
    case XAException.XA_HEURMIX:
      log.error("heuristic rollback is incompatible with the global state of this transaction - guilty: " + failedResourceHolder);
      throw xaException;
    default:
      String extraErrorDetails = TransactionManagerServices.getExceptionAnalyzer().extractExtraXAExceptionDetails(xaException);
      log.warn("resource '" + failedResourceHolder.getUniqueName() + "' reported " + Decoder.decodeXAExceptionErrorCode(xaException) +
          " when asked to rollback transaction branch. Transaction is prepared and will rollback via recovery service when resource availability allows."
          + (extraErrorDetails == null ? "" : " Extra error=" + extraErrorDetails), xaException);
  }
}

代码示例来源:origin: org.codehaus.btm/btm

private void handleXAException(XAResourceHolderState failedResourceHolder, XAException xaException) throws XAException {
  switch (xaException.errorCode) {
    case XAException.XA_HEURRB:
      forgetHeuristicRollback(failedResourceHolder);
      return;
    case XAException.XA_HEURCOM:
    case XAException.XA_HEURHAZ:
    case XAException.XA_HEURMIX:
      log.error("heuristic rollback is incompatible with the global state of this transaction - guilty: " + failedResourceHolder);
      throw xaException;
    default:
      String extraErrorDetails = TransactionManagerServices.getExceptionAnalyzer().extractExtraXAExceptionDetails(xaException);
      log.warn("resource '" + failedResourceHolder.getUniqueName() + "' reported " + Decoder.decodeXAExceptionErrorCode(xaException) +
          " when asked to rollback transaction branch. Transaction is prepared and will rollback via recovery service when resource availability allows."
          + (extraErrorDetails == null ? "" : " Extra error=" + extraErrorDetails), xaException);
  }
}

代码示例来源:origin: com.github.marcus-nl.btm/btm

private void handleXAException(XAResourceHolderState failedResourceHolder, XAException xaException) throws XAException {
  switch (xaException.errorCode) {
    case XAException.XA_HEURRB:
      forgetHeuristicRollback(failedResourceHolder);
      return;
    case XAException.XA_HEURCOM:
    case XAException.XA_HEURHAZ:
    case XAException.XA_HEURMIX:
      log.error("heuristic rollback is incompatible with the global state of this transaction - guilty: " + failedResourceHolder);
      throw xaException;
    default:
      String extraErrorDetails = TransactionManagerServices.getExceptionAnalyzer().extractExtraXAExceptionDetails(xaException);
      log.warn("resource '" + failedResourceHolder.getUniqueName() + "' reported " + Decoder.decodeXAExceptionErrorCode(xaException) +
          " when asked to rollback transaction branch. Transaction is prepared and will rollback via recovery service when resource availability allows."
          + (extraErrorDetails == null ? "" : " Extra error=" + extraErrorDetails), xaException);
  }
}

代码示例来源:origin: org.mule.btm/mule-btm

private void handleXAException(XAResourceHolderState failedResourceHolder, XAException xaException) throws XAException {
  switch (xaException.errorCode) {
    case XAException.XA_HEURRB:
      forgetHeuristicRollback(failedResourceHolder);
      return;
    case XAException.XA_HEURCOM:
    case XAException.XA_HEURHAZ:
    case XAException.XA_HEURMIX:
      log.error("heuristic rollback is incompatible with the global state of this transaction - guilty: " + failedResourceHolder);
      throw xaException;
    default:
      String extraErrorDetails = TransactionManagerServices.getExceptionAnalyzer().extractExtraXAExceptionDetails(xaException);
      log.warn("resource '" + failedResourceHolder.getUniqueName() + "' reported " + Decoder.decodeXAExceptionErrorCode(xaException) +
          " when asked to rollback transaction branch. Transaction is prepared and will rollback via recovery service when resource availability allows."
          + (extraErrorDetails == null ? "" : " Extra error=" + extraErrorDetails), xaException);
  }
}

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