Archived

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

adapter element can't be a child of icebox element

Ice 3.4.1 on Ubuntu Linux:

The documentation says:
The element may optionally contain a single adapter element that configures the IceBox service manager's object adapter and must have the name IceBox.ServiceManager.

But when I do that in my template:
<icebox id="${icebox-name}" exe="icebox" activation="on-demand">
        <adapter name="IceBox.ServiceManager" id="${instance-name}.IceBox.ServiceManager" endpoints="tcp"/>
      </icebox>

The node complains thus:
error in <Templates.xml> descriptor, line 60, column 8:
<adapter> element can't be a child of an <icebox> element

...which contradicts the documentation.

What's wrong?

Comments

  • xdm
    xdm La Coruña, Spain
    The documentation you quoted refers to the Service element, see also:
    Service Descriptor Element - Ice 3.4 - ZeroC
  • The documentation I quoted was from the <icebox> Descriptor Element, not the <service> element as you say.

    Here it is from the PDF version:

    38.17.9 IceBox
    An icebox element defines an IceBox server to be deployed on a node. It typi-
    cally contains at least one service element (Section 38.17.22), and may supply
    additional information such as command-line options (Section 38.17.26), environ-
    ment variables (Section 38.17.27), configuration properties (Section 38.17.17)
    and a server distribution (Section 38.13).

    The element may optionally contain a single adapter element
    (Section 38.17.1) that configures the IceBox service manager’s object adapter and
    must have the name IceBox.ServiceManager. If no such element is
    defined, the service manager’s object adapter is disabled. Note however that the
    service manager’s functionality remains available as an administrative facet even
    when its object adapter is disabled. See Chapter 43 for more information on
    IceBox.
  • bernard
    bernard Jupiter, FL
    Hi John,

    Thank you for reporting this inconsistency. This is a bug in the documentation: you can't create an <adapter> child element to configure IceBox.ServiceManager as an indirect object adapter. I don't see a use-case for configuring IceBox.ServiceManager as an indirect object adapter.

    If you want to configure IceBox.ServiceManager as a direct object adapter, you can use regular properties to do so, for example:
     <properties>
         <property name="IceBox.ServiceManager.Endpoints" value="tcp -h 127.0.0.1"/   
      </properties>
    

    (alternatively, configure the Admin facet / Ice.Admin object adapter, like in the IceGrid/icebox demo).

    Best regards,
    Bernard