Chris:
Starting to push in another direction with the locking code and though I would give you the heads up.
Previously I was pushing a model of using "SELECT FOR UPDATE" to lock individual rows in Postgis.
This has several limitations:
a) I would need to cache the DataSource used to acquire the lock, for later use in a Transaction
b) Multiple Locks on the same FeatureType would be difficult to sort out during a Transaction
c) Transaction with partial Lock release were not feasible (the locks are lost on a commit, reacquiring them leaves room for race conditions).
It seems like this was a complicated idea, with plenty of opportunity for error.
Currently I am looking into placing an authorization table in Postgis (id, authorization, expire). Integrity would be maintained by using Before Update and Before Delete checks. I will let you know tomorrow how this turns out.
It does seem that the WFS specification was written with this design in mind.
Jody Garnett