"if you look in the JDK bin directory there are now many tools in there that I would categorize as providing "visibility" into the JVM: jcmd, jconsole, jhat, jinfo, jmap, jmc, jps, jsadebugd, jstack, jstat, jstatd, jvisualvm"
"If looping on Object.wait(), you might want to first reset the thread's interrupted state (e.g. if(Thread.currentThread().isInterrupted()) Thread.currentThread().interrupted();) before entering the wait() on each iteration or it could just throw the exception every iteration leading to a Livelock situation."