示例#1
0
unsigned SWProcess::getInstanceCount(const char* clusterName)
{
   StringBuffer xpath;
   if (clusterName && *clusterName)
     xpath.clear().appendf("%s[@name=\"%s\"]", m_processName.str(), clusterName);
   else
     xpath.clear().appendf("%s[1]", m_processName.str());
   //IPropertyTree * comp = m_envHelper->getEnvTree()->getPropTree(xpath);
   IPropertyTree * comp = m_envHelper->getEnvTree()->queryPropTree(xpath);

   return comp->getCount(m_instanceElemName.str());
}