You do not need to lock "Document", because there is no "Document" to lock.
The concept of Document in locking document refers to an Autodesk.AutoCAD.ApplicationServices.Document obkect existing in memory of an AutoCAD session. The need to lock is, is due to the relation of Document object and Database object in an MDI environment.
While you read a file form a dwg "document", the document refers a file, which is different thing from Document class object in memory.
Of course, your code may need to handle possible file acess exception, such as, if the drawing you try to read has alreay been opened by someone else for wrtie, then your code will throw file access exception.
Because what I'm trying to do is modify the xref path of documents, and when i detach the xref and then attach the newer xref, if i access the database from the alternative 1, I don't get any error and the xref is updated. But when I use the alternative number 2, when I attach a newer xref i get and ePermantlyErased exception. Shouldn't that be the same? By the way, I need to open the document silently that is why I'm using alternative number 2.