How to find if deadlock has occurred

 Finding a deadlock is also difficult the user can not tell by looking at the application. The users usually complain that they need to restart application as it doesn’t response. Some developers look for memory issues when actually it is a deadlock that has occurred in their application. There are some ways which can be used to detect a deadlock in Java which include:
1) Using Thread dump in Linux
2) Using Thread analyzer tool released by Oracle
3) Using a Java profiler
4) Understanding the follow of application after going mad for few days
Obviously using a tool is much better than the fourth option listed above. The best practice is to use synchronization as rarely as possible and try to find out alternative ways to avoid synchronization in Java.

Related Post:-

People who read this post also read :


Did you know that that you can make dollars by locking selected pages of your blog or website?
Simply open an account with AdWorkMedia and add their Content Locking tool.

Post a Comment


Twitter Delicious Facebook Digg Stumbleupon Favorites More