// apply patches if you are the patch master
while (currentPatchLevel < latestPatchAvailable) {
try {
currentPatchLevel = currentPatchLevel + 1;
Patch patch = (Patch) applicationContext.getBean("patch" + currentPatchLevel);
if (patch == null) {
logger.info("[BOOTSTRAP] class not found for patch" + currentPatchLevel);
logger.info("[BOOTSTRAP] patch " + currentPatchLevel + " not applied, exiting patch process");
break;
}
patch.applyPatch(applicationManager, applicationContext);
// if it fails do no set this.. there is no "continue" here.
systemInfo.setPatchLevel(currentPatchLevel);
systemStatusDAO.save(systemInfo);