In community commons we have acquirelock and releaselock actions, which helps in locking the object during a transaction.
Hope this might help you.