Archived

This forum has been archived. Please start a new discussion on GitHub.

IceTouch : Can't specify adapter endpoints

Hello !

We have some difficulties to specify the adapter endpoints whose I need for the server template instantiation.
AdapterDescriptor adapDesc = AdapterDescriptor();
adapDesc.name="ad_"+_nomBiblio;
adapDesc.id="${server}.ad_"+_nomBiblio;

for(int i=0;i<_fonctions.size();i++)
{
adapDesc.objects.push_back(_fonctions);
}
adapDesc.replicaGroupId = "rg_"+_nomBiblio;


I'm looking for something like : adapDesc.Endpoints="tcp";

I got the following error message :

Deployment Exception : server `sid_maBiblio1':
invalid endpoints for adapter `ad_maBiblio': empty string:confused:

So I would like to specify the endpoints for ad_maBiblio.

Thank you for your help !

Cheers

Matthieu & Romain

Comments

  • benoit
    benoit Rennes, France
    Hi Matthieu,

    Adapter endpoints need to be specified in the server properties. Something like the following should work:
      ServerDescriptorPtr server  = new ServerDescriptor();
      AdapterDescriptor adapDesc;
      adapDesc.name="ad_"+_nomBiblio;
      adapDesc.id="${server}.ad_"+_nomBiblio;
      for(int i=0;i<_fonctions.size();i++)
      {
          adapDesc.objects.push_back(_fonctions[i]);
      }
      adapDesc.replicaGroupId = "rg_"+_nomBiblio;
      server->adapters.push_back(adapter);
      PropertyDescriptor prop;
      prop.name = "ad_"+ _nomBiblio + ".Endpoints";
      prop.value = "tcp";
      server->propertySet.properties.push_back(prop);
    

    You might find the code from cpp/src/IceGrid/DescriptorBuilder.cpp useful for more information on how to create IceGrid descriptors.

    Cheers,
    Benoit.
  • matthew
    matthew NL, Canada
    I'm also wondering what this has to do with IceTouch? Did you misname your post?