}
private void executeInitTemplates() throws ResourceNotFoundException {
if (this.inits != null) {
final Out out = new DiscardOut();
final GlobalManager myGlobalManager = this.globalManager;
final Bag globalBag = myGlobalManager.getGlobalBag();
final Bag constBag = myGlobalManager.getGlobalBag();
final KeyValues params = KeyValuesUtil.wrap(
new String[]{"GLOBAL", "CONST"},
new Object[]{globalBag, constBag}
);
for (String templateName : StringUtil.toArray(this.inits)) {
if (this.logger.isInfoEnabled()) {
this.logger.info("Merge init template: {}", templateName);
}
this.getTemplate(templateName)
.merge(params, out);
//Commit Global
myGlobalManager.commit();
}
}
}