[PAXWEB-649] Add a timeout to avoid running into a deadlock
Fix bad javadoc