The basic idea is that if the name (in the above example, “Jessie”) is the only thing in the world described by the identifier (“my oldest friend”), use a comma before the name (and after it as well, unless you've come to the end of the sentence). If not, don't use any commas.