playframework/play — pull request #525 by chrisyao (2012-07-14 00:27:31+00:00)
Title: Set the current thread's contextual ClassLoader during reload.

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.