in flink-connector-jdbc-core/src/main/java/org/apache/flink/connector/jdbc/datasource/transactions/xa/exceptions/XaError.java [115:166]
private static String translateCode(int code) {
switch (code) {
case XAException.XA_HEURCOM:
return "heuristic commit decision was made";
case XAException.XA_HEURHAZ:
return "heuristic decision may have been made";
case XAException.XA_HEURMIX:
return "heuristic mixed decision was made";
case XAException.XA_HEURRB:
return "heuristic rollback decision was made";
case XAException.XA_NOMIGRATE:
return "the transaction resumption must happen where the suspension occurred";
case XAException.XA_RBCOMMFAIL:
return "rollback happened due to a communications failure";
case XAException.XA_RBDEADLOCK:
return "rollback happened because deadlock was detected";
case XAException.XA_RBINTEGRITY:
return "rollback happened because an internal integrity check failed";
case XAException.XA_RBOTHER:
return "rollback happened for some reason not fitting any of the other rollback error codes";
case XAException.XA_RBPROTO:
return "rollback happened due to a protocol error in the resource manager";
case XAException.XA_RBROLLBACK:
return "rollback happened for an unspecified reason";
case XAException.XA_RBTIMEOUT:
return "rollback happened because of a timeout";
case XAException.XA_RBTRANSIENT:
return "rollback happened due to a transient failure";
case XAException.XA_RDONLY:
return "the transaction branch was read-only, and has already been committed";
case XAException.XA_RETRY:
return "the method invoked returned without having any effect, and that it may be invoked again";
case XAException.XAER_ASYNC:
return "an asynchronous operation is outstanding";
case XAException.XAER_DUPID:
return "Xid given as an argument is already known to the resource manager";
case XAException.XAER_INVAL:
return "invalid arguments were passed";
case XAException.XAER_NOTA:
return "Xid is not valid";
case XAException.XAER_OUTSIDE:
return "the resource manager is doing work outside the global transaction";
case XAException.XAER_PROTO:
return "protocol error";
case XAException.XAER_RMERR:
return "resource manager error has occurred";
case XAException.XAER_RMFAIL:
return "the resource manager has failed and is not available";
default:
return "";
}
}