.server file format reference

## `.server` file format reference

This section describes the format of the `.server` files used by applications to tell the Bonobo Activation daemon about the interfaces they support.

## The `oaf_server` tag

Here follows a simple example of a minimalist `.server` file.

    <oaf_info>
      <oaf_server iid="OAFIID:Bonobo_CosNaming_NamingContext"
    	      type="exe"
                  location="/usr/lib/bonobo-activation/bonobo-activation-server">
      </oaf_server>
    </oaf_info>

Each `oaf_server` entry conventionally has three mandatory properties: iid (the FAQ of the Bonobo API reference manual explains how to create an iid), type (can be exe, factory, or shlib) and location.

If the type is exe, location is the name of the executable which creates the CORBA interfaces associated to this entry and registers them to Bonobo Activation. If the type is factory, location is the iid of the component which can create the corresponding CORBA server. If the type is shlib, location is the name of the library the code is in: `libgmf` for example.

### Portability Note

Don't include the `.so` suffix common on Linux systems in the location of a shlib component.

Here follows a simple example of a component activated through a factory:

    <oaf_info>
      <oaf_server iid="OAFIID:Bonobo_Sample_Echo_Factory" type="exe"
    	      location="/usr/lib/bonobo-2.0/samples/bonobo-echo-2">
      </oaf_server>

      <oaf_server iid="OAFIID:Bonobo_Sample_Echo" type="factory"
    	      location="OAFIID:Bonobo_Sample_Echo_Factory">
      </oaf_server>
    </oaf_info>

If you ask Bonobo Activation to activate the `OAFIID:Bonobo_Sample_Echo` component, Bonobo Activation will first check if it is a factory, make sure the corresponding factory compoenent is running (by activating it. Here, activating the factory component is a matter of launching the executable) and call `create` on the factory. It will return you that object.