Home Help Center

IceTouch : Can't specify adapter endpoints

MatthieuMatthieu Member Mat ReiOrganization: 4sxs ConsultingProject: communication
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

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    I'm also wondering what this has to do with IceTouch? Did you misname your post?
Sign In or Register to comment.