@Override
	public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {

		String transport = event.getEnvironment().resolvePlaceholders("${XD_TRANSPORT}");
		if (!"local".equals(transport)) {
			String jarsLocation = event.getEnvironment().resolvePlaceholders(MESSAGE_BUS_JARS_LOCATION);

			((DefaultResourceLoader) resolver.getResourceLoader()).setClassLoader(makeClassLoader(jarsLocation));
		}
	}
An ApplicationListener which tracks which MessageBus implementation ought to be used so that it exposes a ClassLoader
that knows about the correct jar files for that bus.
<p>Make sure that this listener is triggered before the created ClassLoader is used.</p>

@author Eric Bottard
@author David Turanski
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/server/MessageBusClassLoaderFactory.java