DB Cross-Server Locking example There are 2 main tests that demonstrate how it works. First is using update query could be found in UpdateLockTest. Second inside InsertLockTest. To run this code you should edit AbstractDBTest.createConnection method to connect to database.