in src/java/org/apache/fulcrum/yaafi/service/reconfiguration/ReconfigurationServiceImpl.java [243:275]
protected void onReconfigure(ReconfigurationEntry reconfigurationEntry) throws Exception {
if (reconfigurationEntry.getServiceList() == null) {
// reconfigure the whole container using Avalon Lifecycle Spec
InputStream is = reconfigurationEntry.locate();
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
Configuration configuration = builder.build(is);
is.close();
is = null;
this.getLogger().warn("Starting to reconfigure the container");
if (this.serviceManager instanceof Suspendable) {
this.getLogger().info("Calling suspend() of the container");
((Suspendable) this.serviceManager).suspend();
}
if (this.serviceManager instanceof Reconfigurable) {
this.getLogger().info("Calling reconfigure() of the container");
((Reconfigurable) this.serviceManager).reconfigure(configuration);
}
if (this.serviceManager instanceof Suspendable) {
this.getLogger().info("Calling resume() of the container");
((Suspendable) this.serviceManager).resume();
}
this.getLogger().info("Reconfiguring the container was successful");
} else {
String[] serviceList = reconfigurationEntry.getServiceList();
this.getLogger().warn("Calling reconfigure() on individual services : " + serviceList.length);
this.serviceLifecycleManager.reconfigure(serviceList);
}
}