An Open Server application can specify the directory provider to use and register itself with the directory at start-up.
To specify a directory service provider other than the default, use srv_props to set the SRV_S_DS_PROVIDER server property. The default value for SRV_S_DS_PROVIDER is platform specific, and is specified in the Open Client and Open Server Configuration Guide for your platform.
To register an Open Server application with the directory service, use srv_props to set the SRV_S_DS_REGISTER server property to CS_TRUE (the default). Setting SRV_S_DS_REGISTER to CS_FALSE prevents the registration.
Set these properties after allocating and initializing the CS_CONTEXT structure (using cs_ctx_alloc and srv_version), and before calling srv_init.
When you call srv_init, the Open Server application:
Retrieves its listening address from the directory service.
Instructs the directory service to update the Open Server application’s directory service entry if SRV_S_DS_REGISTER is set to CS_TRUE.
The directory service then sets its “currentStatus” attribute to “active.”
Open Server automatically uses the interfaces file as a backup directory when the directory service driver initialization fails. The srv_init call may fail to successfully access the specified directory service if any of the following occur:
The libtcl.cfg file is not in the expected location, or is unreadable.
An informational error is returned.
The directory service driver is not in the expected location, or is unreadable.
An informational error is returned.
The directory service is not responding to requests.
An informational error is returned.
The server entry cannot be found in the directory service.
An error is returned indicating that there are no listeners; the Open Server application does not use the interfaces file as a backup directory in this case.