this.name = config.getChild("controller-name").getValue();
this.dbm = (DBManager) InstanceCreator.createConfiguredInstance(config.getChild("database-manager.configured-object"));
Configuration[] configOfServant = config.getChildren("extra-servant.configured-object");
ExtraServant eservant = null;
// None Channel...
if (configOfServant == null || configOfServant.length <= 0) {
echannel = new ServantChannel(new NoneServant());
} else {
for (int i = 0; i < configOfServant.length; i++) {
if (i == 0) {
eservant = (ExtraServant) InstanceCreator.createConfiguredInstance(configOfServant[i]);
echannel = new ServantChannel(eservant);
eservant.setChannel(echannel);
} else {
ExtraServant nextServant = (ExtraServant) InstanceCreator.createConfiguredInstance(configOfServant[i]);
eservant.setNext(nextServant);
eservant = nextServant;
}
}
}