Originally posted by David Ulicny:
How can I recognize deadlock in application?
In Java Threads, we actually develop a class that can be used to detect a deadlock. Even so, it is not completely reliable. The issue is because, a "deadlock" may be caused by other causes than locks, it could even be caused by two threads waiting on variables to be in particular states.
In any case, feel free to download the source code from
http://www.oreilly.com/catalog/jthreads3, if you are interested in deadlock detection. The source for the deadlock detecting lock is in the chapter 6 package.
Henry