final ClassLoader urlClassloader = createURLClassLoader(context);
// check, if the reloading classloader should be used
if (isReloadingClassloaderEnabled(context)) {
final ReloadingClassLoader classloader = new ReloadingClassLoader(urlClassloader);
final FilesystemAlterationMonitor fam = new FilesystemAlterationMonitor();
org.apache.commons.jci.listeners.ReloadingListener rl = new CocoonReloadingListener();
rl.addReloadNotificationListener(classloader);
addResourcesToFam(fam, rl, getRclConfResourceUrls(context));
fam.start();
ReloadingClassloaderManager.reloadingClassloader = classloader;
} else {
// otherwise use the URL classloader only
ReloadingClassloaderManager.reloadingClassloader = urlClassloader;