@Override
	public Object invoke(MethodInvocation invocation) throws Throwable {
		ClassLoader previous = Thread.currentThread().getContextClassLoader();
		try {
			Thread.currentThread().setContextClassLoader(classLoaderToUse);
			return invocation.proceed();
		}
		finally {
			Thread.currentThread().setContextClassLoader(previous);
		}
	}
An advice that will set the {@link Thread#setContextClassLoader(ClassLoader) thread context ClassLoader} to the
enclosing {@link ApplicationContext#getClassLoader() ApplicationContext's class loader} before invocation and reset
it afterwards.

@author Eric Bottard
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/support/ThreadContextClassLoaderSetterAdvice.java