code: public static String getXAResourceVoteString(int vote) {
          switch (vote) {
              case XAResource.XA_OK:
                  return "XA_OK (" + vote + ')'; 
  
              case XAResource.XA_RDONLY:
                  return "XA_RDONLY (" + vote + ')'; 
          }
  
          return "UNKNOWN XA RESOURCE VOTE (" + vote + ')'; 
      }
docs: Display the javax.xa.XAResource Resource Manager vote constant corresponding to the
  value supplied.
  
  @param level a valid javax.xa.XAResource vote constant.
  
  @return the name of the constant, or a string indicating the constant is unknown.