playframework/play — pull request #524 by chrisyao (2012-07-14 00:21:11+00:00)
Title: compatibility fix for libraries that use the current ClassLoader directly

This fixes an issue between play and MyBatis 3.0.6, where after a hotload, MyBatis finds the old ClassLoader from Thread.currentThread().getContextClassLoader() and gets confused and breaks.

This patch sets the current thread's contextual ClassLoader immediately, fixing it.

Other libraries/code that do the same would also be fixed.