final HostDao hostDao = new HostDaoImpl();
while(true) {
Transaction txn = Transaction.currentTxn();
try {
HostVO host = hostDao.acquireInLockTable(getRandomLockId(), 10);
if(host != null) {
s_logger.info("Thread " + (current + 1) + " acquired lock");
try { Thread.sleep(getRandomMilliseconds(1000, 5000)); } catch (InterruptedException e) {}