We have a junit test runner which timeout if one test is hanging. Now I want create a thread dump via API.
I know I can request the stacktraces via Thread.getAllStackTraces(). But the thread dump on the console include many more information like the monitor which a thread is waiting.
Are there an API to request the monitor on which a thread is waiting?