"setting logger to be org.openeai.OpenEaiObject.logger.");
logger = org.openeai.OpenEaiObject.logger;
}
// Get and set the general properties for this command.
PropertyConfig pConfig = new PropertyConfig();
try {
pConfig = (PropertyConfig)getAppConfig()
.getObject("I2sRequestCommandProperties");
}
catch (EnterpriseConfigurationObjectException eoce) {
String errMsg = "Error retrieving a PropertyConfig object from " +
"AppConfig: The exception is: " + eoce.getMessage();
logger.fatal("[I2sRequestCommand] " + errMsg);
throw new InstantiationException(errMsg);
}
setProperties(pConfig.getProperties());
// Initialize response and provide documents.
XmlDocumentReader xmlReader = new XmlDocumentReader();
try {
logger.debug("[I2sRequestCommand] " +
"responseDocumentUri: " + getProperties()
.getProperty("responseDocumentUri"));
m_responseDoc = xmlReader.initializeDocument(getProperties()
.getProperty("responseDocumentUri"), getOutboundXmlValidation());
if (m_responseDoc == null) {
String errMsg = "Missing 'responseDocumentUri' " +
"property in the deployment descriptor. Can't continue.";
logger.fatal("[I2sRequestCommand] " + errMsg);
throw new InstantiationException(errMsg);
}
logger.debug("[I2sRequestCommand] " +
"provideDocumentUri: " + getProperties()
.getProperty("provideDocumentUri"));
m_provideDoc = xmlReader.initializeDocument(getProperties()
.getProperty("provideDocumentUri"), getOutboundXmlValidation());
if (m_provideDoc == null) {
String errMsg = "Missing 'provideDocumentUri' " +
"property in the deployment descriptor. Can't continue.";
logger.fatal("[I2sRequestCommand] " + errMsg);
throw new InstantiationException(errMsg);
}
}
catch (XmlDocumentReaderException e) {
logger.fatal("[I2sRequestCommand] Error initializing" +
" the primed documents.");
e.printStackTrace();
throw new InstantiationException(e.getMessage());
}
// Get the I2sRepositoryProperties from AppConfig.
PropertyConfig i2spConfig = new PropertyConfig();
try {
i2spConfig = (PropertyConfig)getAppConfig()
.getObject("I2sRepositoryProperties");
}
catch (EnterpriseConfigurationObjectException eoce) {
String errMsg = "Error retrieving PropertyConfig object from " +
"AppConfig for the I2sRepositoryProperties. The exception is: " +
eoce.getMessage();
logger.fatal("[I2sRequestCommand] " + errMsg);
throw new InstantiationException(errMsg);
}
Properties i2sRepositoryProps = i2spConfig.getProperties();
// Determine which I2sRepository implementation to use.
String repositoryClassName = i2sRepositoryProps
.getProperty("repositoryClassName");
if (repositoryClassName == null) {