Fredrik Norling wrote back to me that "Application scope in the XPinC is local context."
XPinC is running an application in the Notes Client rather than on the web. Of course I was running the application in a Notes Client and that is why it was not working. We need to run it both on the web and in a Notes Client so I will have to determine a different way to lock the documents.