Errors in multithreaded programs may not be easy to reproduce. The program
may deadlock or encounter other thread-related errors under only very
specific circumstances, or may behave differently when running different VMs.
If you use multithreading in your client- or server-side Java, you should
seriously consider a detection solution for the most common problems with
threaded programming, including:
Deadlocks
Potential Deadlocks
Data Races
Deadlocks
A deadlock is a situation where threads are blocked because one or both are
waiting for access to a resource that will not be freed. The application can
never terminate because the threads are blocked indefinitely.
This behavior results from improper use of the synchronized keyword to manage
thread interaction with specific objects. The synchronized keyword ensures
that only one thread is permitted to execute a given block... (more)