Document Locking in XPages

People editing documents at the same time can be a big pain for the developer resulting in unwanted problems in an deployed application. To handle this problem I created a managed bean DocLock to handle the problem. The managed bean stores the username and an id each time the users edits a document. If another user tries to edit the document, you can block the user from entering edit mode. 

To implement the managed bean in your own database is very simple, Copy the java class and add the managed bean setup into faces-config.xml ( check the supplied readme file)

The project is released on Openntf –> Link

Snap83

Enjoy getting less document conflicts.

  1. Gotta remember that beans don’t work in a clustered environment though πŸ™
    It would be amazing if Domino could replicate scoped variables and beans around a clustered environment!!!
    I recently wrote a cluster friendly document locking xpage addon that uses old-school notes documents to control the locks (can’t release IP unfortunately). The only downside is the dependency on cluster replication being lightning quick. A central lock server, with failover to the current server, may be better in some cases! In any case, it’d be cool to add a cluster friendly option to your control πŸ™‚

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>