Posts

Showing posts from August, 2013

Unsupported major.minor version For Jar

This is Usually caused by the Build version Conflicts. Check if the jar build and consumed JDK are same.

programmatically check thread lock in Multi Threaded Environment.

This Code below can check for thread locks in a concurrent environment. this code needs to be executed by a Deamon or Timer task.                 ThreadMXBean tmx = ManagementFactory.getThreadMXBean(); long[] ids = tmx.findDeadlockedThreads(); if (ids != null)                  { ThreadInfo[] infos = tmx.getThreadInfo(ids, true, true); LOG.fatal("********************************************The following threads                          are deadlocked:**************************************"); for (ThreadInfo ti : infos)                         { LOG.fatal(ti); } LOG.fatal("************************************************************                        ************************************************************"); }