Ok, I found the difference... if I do not call getTransaction before closing the Session, then I get the same failure.