getObject(getProperties().getProperty("dbPoolName", "DbPool"));
}
catch (Exception e) {
logger.fatal("Error initializing database connection pool.");
logger.fatal(e.getMessage(), e);
throw new CommandException(e.getMessage(), e);
}
}
// retrieve Sync Publisher from AppConfig. This object will be used to publish
// sync messages when create, delete or update message actions are performed
// in this authoritative system.
if (m_producerPool == null) {
try {
m_producerPool = (ProducerPool)getExecutorAppConfig().getObject("SyncPublisher");
}
catch (Exception e) {
logger.fatal("Error retrieving 'SyncPublisher' PubSubProducer from AppConfig");
logger.fatal(e.getMessage(), e);
throw new CommandException(e.getMessage(), e);
}
}
}
try {
// build the message object from the content of the message (DataArea)
XmlEnterpriseObject xeo = (XmlEnterpriseObject)getExecutorAppConfig().
getObject(getMessageObjectName() + "." + generateRelease(getMessageRelease()));
XmlEnterpriseObject baselineXeo = (XmlEnterpriseObject)getExecutorAppConfig().
getObject(getMessageObjectName() + "." + generateRelease(getMessageRelease()));
// getMessageObject returns an element (the DataArea in the create-request)
xeo.buildObjectFromInput(getMessageObject());
baselineXeo.buildObjectFromInput(getBaseline());
// create the BasicPerson
try {
update((BasicPerson)xeo, (BasicPerson)baselineXeo, getMessageObjectName(), getMessageRelease());
}
catch (Exception e) {
String errMessage = "Exception occurred Creating the " + getMessageObjectName() +
" Java object in the database. Exception: " + e.getMessage();
logger.fatal(errMessage);
throw new CommandException(e.getMessage(), e);
}
logger.info("Reply document built...");
/*
// remove DataArea from primed provide reply document.
replyDoc.getRootElement().
getChild(DATA_AREA).
removeChildren(getMessageObjectName());
replyDoc.getRootElement().
getChild(DATA_AREA).
addContent(eOutput);
*/
}
catch (Exception e) {
throw new CommandException(e.getMessage(), e);
}
}