/* If we have a groovy configuration, clean the configuration, clearing
* the class cache and setting the embedded groovy classloader to null */
try {
if (context.getConfiguration() instanceof AggregateConfig) {
AggregateConfig ac = (AggregateConfig) context.getConfiguration();
if (ac.getOuterConfiguration() instanceof GroovyConfig) {
((GroovyConfig) ac.getOuterConfiguration()).clear();
}
if (context instanceof DefaultServiceBeanContext)
((DefaultServiceBeanContext) context).setConfiguration(null);
}
} catch (ConfigurationException e) {