|
@@ -238,6 +238,7 @@ bool CWsEclService::init(const char * name, const char * type, IPropertyTree * c
|
|
|
|
|
|
IPropertyTree *vips = serviceTree->queryPropTree("VIPS");
|
|
IPropertyTree *vips = serviceTree->queryPropTree("VIPS");
|
|
Owned<IStringIterator> roxieTargets = getTargetClusters("RoxieCluster", NULL);
|
|
Owned<IStringIterator> roxieTargets = getTargetClusters("RoxieCluster", NULL);
|
|
|
|
+
|
|
ForEach(*roxieTargets)
|
|
ForEach(*roxieTargets)
|
|
{
|
|
{
|
|
SCMStringBuffer target;
|
|
SCMStringBuffer target;
|
|
@@ -260,6 +261,7 @@ bool CWsEclService::init(const char * name, const char * type, IPropertyTree * c
|
|
{
|
|
{
|
|
vip = pc->queryProp("@vip");
|
|
vip = pc->queryProp("@vip");
|
|
includeTargetInURL = pc->getPropBool("@includeTargetInURL", true);
|
|
includeTargetInURL = pc->getPropBool("@includeTargetInURL", true);
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
StringBuffer list;
|
|
StringBuffer list;
|
|
@@ -282,8 +284,12 @@ bool CWsEclService::init(const char * name, const char * type, IPropertyTree * c
|
|
}
|
|
}
|
|
if (list.length())
|
|
if (list.length())
|
|
{
|
|
{
|
|
- Owned<ISmartSocketFactory> sf = new RoxieSocketFactory(list.str(), !loadBalanced, includeTargetInURL);
|
|
|
|
|
|
+ SCMStringBuffer alias;
|
|
|
|
+ clusterInfo->getAlias(alias);
|
|
|
|
+ Owned<ISmartSocketFactory> sf = new RoxieSocketFactory(list.str(), !loadBalanced, includeTargetInURL, loadBalanced ? alias.str() : NULL);
|
|
connMap.setValue(target.str(), sf.get());
|
|
connMap.setValue(target.str(), sf.get());
|
|
|
|
+ if (alias.length() && !connMap.getValue(alias.str())) //only need one vip per alias for routing purposes
|
|
|
|
+ connMap.setValue(alias.str(), sf.get());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1915,8 +1921,9 @@ void CWsEclBinding::sendRoxieRequest(const char *target, StringBuffer &req, Stri
|
|
Owned<IHttpClientContext> httpctx = getHttpClientContext();
|
|
Owned<IHttpClientContext> httpctx = getHttpClientContext();
|
|
StringBuffer url("http://");
|
|
StringBuffer url("http://");
|
|
ep.getIpText(url).append(':').append(ep.port ? ep.port : 9876).append('/');
|
|
ep.getIpText(url).append(':').append(ep.port ? ep.port : 9876).append('/');
|
|
- if (static_cast<RoxieSocketFactory*>(conn)->includeTargetInURL)
|
|
|
|
- url.append(target);
|
|
|
|
|
|
+ RoxieSocketFactory *roxieConn = static_cast<RoxieSocketFactory*>(conn);
|
|
|
|
+ if (roxieConn->includeTargetInURL)
|
|
|
|
+ url.append(roxieConn->alias.isEmpty() ? target : roxieConn->alias.str());
|
|
if (!trim)
|
|
if (!trim)
|
|
url.append("?.trim=0");
|
|
url.append("?.trim=0");
|
|
|
|
|