if (log.isDebugEnabled()) {
log.debug("EventSource Update from file : " + fileName + " : Started");
}
try {
SynapseEventSource es = EventSourceFactory.createEventSource(
artifactConfig, properties);
if (es != null) {
es.setFileName((new File(fileName)).getName());
if (log.isDebugEnabled()) {
log.debug("EventSource named '" + es.getName()
+ "' has been built from the file " + fileName);
}
getSynapseConfiguration().removeEventSource(existingArtifactName);
if (!existingArtifactName.equals(es.getName())) {
log.info("EventSource named " + existingArtifactName + " has been Undeployed");
}
es.buildService(getSynapseConfiguration().getAxisConfiguration());
if (log.isDebugEnabled()) {
log.debug("Initialized the EventSource : " + es.getName());
}
getSynapseConfiguration().addEventSource(es.getName(), es);
if (log.isDebugEnabled()) {
log.debug("EventSource " + (existingArtifactName.equals(es.getName()) ?
"update" : "deployment") + " from file : " + fileName + " : Completed");
}
log.info("EventSource named '" + es.getName()
+ "' has been " + (existingArtifactName.equals(es.getName()) ?
"update" : "deployed") + " from file : " + fileName);
return es.getName();
} else {
handleSynapseArtifactDeploymentError("EventSource Update Failed. The artifact " +
"described in the file " + fileName + " is not a EventSource");
}
} catch (DeploymentException e) {