code: public static String getXAResourceEndFlagString(int flag) {
          switch (flag) {
              case XAResource.TMFAIL:
                  return "TMFAIL (" + flag + ')'; 
  
              case XAResource.TMSUCCESS:
                  return "TMSUCCESS (" + flag + ')'; 
  
              case XAResource.TMSUSPEND:
                  return "TMSUSPEND (" + flag + ')'; 
          }
  
          return "UNKNOWN XA RESOURCE END FLAG (" + flag + ')'; 
      }
docs: Display the javax.xa.XAResource end flag constant corresponding to the
  value supplied.
  
  @param level a valid javax.xa.XAResource end flag constant.
  
  @return the name of the constant, or a string indicating the constant is unknown.