diff --git a/esp/services/ws_dfu/ws_dfuXRefService.cpp b/esp/services/ws_dfu/ws_dfuXRefService.cpp index 0bd88094f0f..759df1a7144 100644 --- a/esp/services/ws_dfu/ws_dfuXRefService.cpp +++ b/esp/services/ws_dfu/ws_dfuXRefService.cpp @@ -117,6 +117,10 @@ void CWsDfuXRefEx::init(IPropertyTree *cfg, const char *process, const char *ser throw MakeStringException(-1, "No Dali Connection Active. Please Specify a Dali to connect to in you configuration file"); } +#ifndef _CONTAINERIZED + initBareMetalRoxieTargets(roxieConnMap); +#endif + XRefNodeManager.setown(CreateXRefNodeFactory()); //Start out builder thread...... @@ -750,19 +754,24 @@ void CWsDfuXRefEx::findUnusedFilesWithDetailsInDFS(IEspContext &context, const c void CWsDfuXRefEx::getRoxieFiles(const char *process, bool checkPackageMaps, MapStringTo &usedFileMap) { SocketEndpointArray servers; + Owned controlXrefInfo; #ifdef _CONTAINERIZED StringBuffer epStr; getService(epStr, process, true); SocketEndpoint ep(epStr); servers.append(ep); -#else - getRoxieProcessServers(process, servers); if (!servers.length()) throw MakeStringExceptionDirect(ECLWATCH_INVALID_CLUSTER_INFO, "process cluster, not found."); + Owned sock = ISocket::connect_timeout(servers.item(0), ROXIECONNECTIONTIMEOUT); + controlXrefInfo.setown(sendRoxieControlQuery(sock, "", ROXIECONTROLXREFTIMEOUT)); +#else + ISmartSocketFactory *conn = roxieConnMap.getValue(process); + if (!conn) + throw makeStringExceptionV(ECLWATCH_CANNOT_GET_ENV_INFO, "Connection info for '%s' process cluster not found.", process ? process : "(null)"); + + controlXrefInfo.setown(sendRoxieControlQuery(conn, "", ROXIECONTROLXREFTIMEOUT, ROXIECONNECTIONTIMEOUT)); #endif - Owned sock = ISocket::connect_timeout(servers.item(0), ROXIECONNECTIONTIMEOUT); - Owned controlXrefInfo = sendRoxieControlQuery(sock, "", ROXIECONTROLXREFTIMEOUT); if (!controlXrefInfo) throw MakeStringExceptionDirect(ECLWATCH_INTERNAL_ERROR, "roxie cluster, not responding."); Owned roxieFiles = controlXrefInfo->getElements("//File"); diff --git a/esp/services/ws_dfu/ws_dfuXRefService.hpp b/esp/services/ws_dfu/ws_dfuXRefService.hpp index 9a17c4664a5..ded9f450a97 100644 --- a/esp/services/ws_dfu/ws_dfuXRefService.hpp +++ b/esp/services/ws_dfu/ws_dfuXRefService.hpp @@ -187,6 +187,7 @@ class CWsDfuXRefEx : public CWsDFUXRef { Owned XRefNodeManager; Owned m_XRefbuilder; + MapStringToMyClass roxieConnMap; IXRefFilesNode* getFileNodeInterface(IXRefNode& XRefNode,const char* nodeType); void addXRefNode(const char* name, IPropertyTree* pXRefNodeTree);