Monthly Archives: April 2016

Cleanup Stale Hibernate Session in Tomcat

Problem: When Hibernate is configured to use thread based session management, a thread may get stuck (unable to unbind) with a closed session under certain condition, therefore all subsequent incoming HTTP calls assigned to such a thread would fail until … Continue reading

Posted in Database, Java | Tagged , , , , | Leave a comment

Gradle Task to Validate Clover On OFF Comment

One way to tell Clover to skip instrumentation of a chunk of code is to enclose the code with “/// CLOVER:OFF” and “/// CLOVER:ON”. For example, you may want to skip the JMockit expectation and verifications chunks. /// CLOVER:OFF new … Continue reading

Posted in Build, Java, Tool and Debug | Tagged , , , , , | Leave a comment