What I actually did was add a DISABLELOCKING option which when true will stop all locking in the DBLocking class, then I use a map of locks in my java library to grab a write lock for a given database (using the db name as the key) when doing any update. However there is one problem with this, when we release the lock at the end of the query, as I understand it the pending update list may not have been flushed. To fix this I'm going to have to release the lock after a server side forward, but is there any better way of doing this?
I'm planning on submitting a pull request for the DISABLELOCKING feature soon.
Thanks,
Joe