if (log.isDebugEnabled()) {
log.debug("StartupTask Update from file : " + fileName + " : Started");
}
try {
Startup st = StartupFinder.getInstance().getStartup(artifactConfig, properties);
st.setFileName((new File(fileName)).getName());
if (log.isDebugEnabled()) {
log.debug("StartupTask named '" + st.getName()
+ "' has been built from the file " + fileName);
}
st.init(getSynapseEnvironment());
if (log.isDebugEnabled()) {
log.debug("Initialized the StartupTask : " + st.getName());
}
Startup existingSt =
getSynapseConfiguration().getStartup(existingArtifactName);
getSynapseConfiguration().removeStartup(existingArtifactName);
if (!existingArtifactName.equals(st.getName())) {
log.info("StartupTask named '" + existingArtifactName + "' has been Undeployed");
}
getSynapseConfiguration().addStartup(st);
existingSt.destroy();
if (log.isDebugEnabled()) {
log.debug("StartupTask " + (existingArtifactName.equals(st.getName()) ?
"update" : "deployment") + " from file : " + fileName + " : Completed");
}
log.info("StartupTask named '" + st.getName()