Saturday, June 23, 2012

Document locking in xPages

Below info you can use.

  • Create a servlet that manages a list of locked documents. 
  • When you edit a document add it to the locked document list and will be removed it from there after 10-12 minutes.
  • This lock can be renewed. So when you edit a document you would request a lock, then run a CSJS timer code that would call the function to invoke lock for next 10 minutes every 10 minutes 
  • When there is a save call the unlock function (unless you stay in edit mode). 
  • Here if a user closes the browser, after 10-12 minutes the document will automatically be unlocked. 
  • You can implement the locking function, using user's id-location or any other specific information.