text
stringlengths 0
2.2M
|
---|
#if defined(BUILD_AUTOCONF) || defined(BUILD_CMAKE)
|
ret = TemplateEngine::evaluate(cffileloc,cntxt);
|
AfcUtil::writeTofile(cffileamloc,ret,true);
|
#endif
|
/*string configureFilePath = rtdcfpath+"/autotools/configure";
|
if (access( configureFilePath.c_str(), F_OK ) == -1 )
|
{
|
std::string compres = rtdcfpath+"/autotools/autogen.sh "+serverRootDirectory;
|
std::string output = ScriptHandler::execute(compres, true);
|
logger << "Set up configure for intermediate libraries\n\n" << std::endl;
|
}
|
std::string compres = respath+"rundyn-configure.sh "+serverRootDirectory;
|
#ifdef DEBUG
|
compres += " --enable-debug=yes";
|
#endif
|
std::string output = ScriptHandler::execute(compres, true);
|
logger << "Set up makefiles for intermediate libraries\n\n" << std::endl;
|
logger << output << std::endl;*/
|
//#endif
|
}
|
void ConfigurationHandler::configureDataSources(const std::string& name, const std::string& configFile, std::map<std::string, ClassStructure, std::less<> >& allclsmap)
|
{
|
Logger logger = LoggerFactory::getLogger("ConfigurationHandler");
|
SimpleXmlParser parser("Parser");
|
logger << ("started reading sdorm config file " + configFile) << std::endl;
|
Document doc;
|
parser.readDocument(configFile, doc);
|
const Element& dbroot = doc.getRootElement();
|
std::map<std::string, ConnectionProperties, std::less<> > allProps;
|
std::map<std::string, Mapping, std::less<> > allMapps;
|
bool isSinglEVH = StringUtil::toLowerCopy(ConfigurationData::getInstance()->coreServerProperties.sprops["EVH_SINGLE"])=="true";
|
if(dbroot.getTagName()=="sdorm")
|
{
|
ElementList datasrcs = dbroot.getChildElements();
|
bool found_default = false;
|
for (unsigned int dsnu = 0; dsnu < datasrcs.size(); dsnu++)
|
{
|
if(datasrcs.at(dsnu).getTagName()=="data-source")
|
{
|
ConnectionProperties cprops;
|
if(!found_default && (datasrcs.at(dsnu).getAttribute("default")=="true" || datasrcs.size()==1)) {
|
cprops.addProperty("_isdefault_", "true");
|
found_default = true;
|
}
|
Mapping mapping;
|
mapping.appName = name;
|
ElementList dbeles = datasrcs.at(dsnu).getChildElements();
|
for (unsigned int dbs = 0; dbs < dbeles.size(); dbs++)
|
{
|
if(dbeles.at(dbs).getTagName()=="config")
|
{
|
ElementList confs = dbeles.at(dbs).getChildElements();
|
int psize= 2;
|
for (unsigned int cns = 0; cns < confs.size(); cns++)
|
{
|
if(confs.at(cns).getTagName()=="nodes")
|
{
|
ElementList nodec = confs.at(cns).getChildElements();
|
for (unsigned int nn = 0; nn < nodec.size(); nn++)
|
{
|
if(nodec.at(nn).getTagName()!="node")continue;
|
ConnectionNode cnode;
|
ElementList nodes = nodec.at(nn).getChildElements();
|
for (unsigned int ncc = 0; ncc < nodes.size(); ncc++)
|
{
|
if(nodes.at(ncc).getTagName()=="url")
|
{
|
cnode.url = nodes.at(ncc).getText();
|
}
|
else if(nodes.at(ncc).getTagName()=="username")
|
{
|
cnode.username = nodes.at(ncc).getText();
|
}
|
else if(nodes.at(ncc).getTagName()=="password")
|
{
|
cnode.password = nodes.at(ncc).getText();
|
}
|
else if(nodes.at(ncc).getTagName()=="host")
|
{
|
cnode.host = nodes.at(ncc).getText();
|
}
|
else if(nodes.at(ncc).getTagName()=="port")
|
{
|
try {
|
cnode.port = CastUtil::toInt(nodes.at(ncc).getText());
|
} catch(const std::exception& e) {
|
}
|
}
|
else if(nodes.at(ncc).getTagName()=="readTimeout")
|
{
|
try {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.