Server programs may be activated either
When a server is activated automatically by somdd, it will be passed a single argument (in argv[1]) that is the implementation ID assigned to the server implementation when it was registered into the Implementation Repository (discussed above and in section 6.6, "Configuring DSOM Applications"). This is useful when the server program cannot know until activation which "logical" server it is implementing. (This is true for the generic server provided with DSOM.) The implementation ID is used by the server to retrieve its ImplementationDef from the Implementation Repository.
A server that is not activated by somdd may obtain its ImplementationDef from the Implementation Repository in any manner that is convenient: by ID, by alias, and so forth. Moreover, a server may choose to "register itself" dynamically, as part of its initialization. To do so, the server would use the programmatic interface to the Implementation Repository.
For example, suppose that the server program "myserver" was designed so that it could be activated either automatically or manually. This requires that it be written to expect the implementation ID as its first argument, and to use that argument to retrieve its ImplementationDef from the Implementation Repository. If an application defines a server in the Implementation Repository whose implementation ID is
2bcdc4f2-0f62f780-7f-00-10005aa8afdcthen "myserver" could be run as that server by invoking the following command:
myserver 2bcdc4f2-0f62f780-7f-00-10005aa8afdc
AIX users should be aware that, unless the SetUserID mode bit is set on the file containing the server program, the UID for the server process will be inherited from the somdd process. To set the SetUserID mode bit from the AIX command line, type one of the following commands:
chmod 4000 <filename> - or - chmod u+s <filename>
where "<filename>" denotes the name of the file containing the server program. For additional details, see the "chmod" command in InfoExplorer or consult the "man" pages.