Also, it is probably a good idea to do a timed wait and implement some sane default action for InterruptedException (and a timeout) - say, return 504 and write to the log