Registration steps Using 'regimpl'

Registering a server implementation and its classes requires the steps described in the following paragraphs.

First, make sure the SOMDDIR environment variable is defined to the name of the Implementation Repository directory, as discussed in the section "Preparing the Environment."

Then, to run the regimpl utility, at the system prompt enter:

> regimpl

This brings up the DSOM Implementation Registration Utility menu, shown below. To begin registering the new implementation, select "1.Add" from the IMPLEMENTATION OPERATIONS section; that is, at the "Enter operation:" prompt, enter "1" (as shown in bold):

DSOM IMPLEMENTATION REGISTRATION UTILITY
(C) Copyright IBM Corp. 1992,1993.  All rights reserved.

Implementation data being loaded from: /u/xyz/dsomRepos/

[ IMPLEMENTATION OPERATIONS ]
 1.Add  2.Delete  3.Change
 4.Show one  5.Show all  6.List aliases
[ CLASS OPERATIONS ]
 7.Add  8.Delete  9.Delete from all  10.List classes
[ SAVE & EXIT OPERATIONS ]
 11.Save data  12.Exit
Enter operation: 1

The regimpl utility then issues several prompts for information about the server implementation (typical responses are shown in bold as an example).

Implementation alias. Enter a "shorthand" name for conveniently referencing the registered server implementation while using regimpl:

Enter an alias for new implementation:  myServer

Program name. Enter the name of the program that will execute as the server. This may be the name of one of the DSOM generic servers (discussed under the later topic "Running DSOM Servers") or a user-defined name for one of these servers. If the program is located in PATH, only the program name needs to be specified. Otherwise, the pathname must be specified.

Enter server program name:(default: somdsvr)  <return>

Multi-threading. Specify whether or not the server expects the SOM Object Adapter (SOMOA) to run each method in a separate thread or not. Notes: You must ensure that methods executed by the server are "thread safe". On AIX or Windows, you must also register a thread package to use a multi-threaded server. See "Customizing Multi-threading Services" in Chapter 5, "Implementing Classes in SOM".

Allow multiple threads in the server? [y/n]
(default: n) : n

Server class. Enter the name of the SOMDServer class or subclass that will manage the objects in the server.

Enter server class (default: SOMDServer) : <return>

Reference data file name. Enter the full pathname of the file used to store ReferenceData associated with object references created by this server. Note: A file name is required only if the server is using the create method to generate object references.

Enter object reference file name (optional) :  <return>
Backup reference data file name. Enter the full pathname of the backup file used to mirror the primary ReferenceData file for this server. Note: a file name is required only if (1) a primary reference data file has been specified, and (2) the application desires an online backup to be maintained. This file can be used to restore a copy of the primary file should it become corrupted.
Enter object reference backup file name (optional) : <return>

Host machine name. This is the name of the machine on which the server program code is stored. The same name should be indicated in the HOSTNAME environment variable. (If "localhost" is entered, the contents of the HOSTNAME environment variable will be used.

Enter host machine name:(default: localhost)  <return>

The regimpl system next displays a summary of the information defined thus far, and asks for confirmation before adding it. Enter "y" to save the implementation information in the Implementation Repository.

================================================================
Implementation id.........: 2befc82b-13a11e00-7f-00-10005ac9272a
Implementation alias......: myServer
Program name..............: somdsvr
Multithreaded.............: No
Server class..............:SOMDServer
Object reference file.....:
Object reference backup...:
Host Name.................: localhost

The above implementation is about to be added. Add? [y/n] y
Implementation 'myServer' successfully added
Add class. Once the server implementation is added, the complete menu reappears. The next series of prompts and entries will identify the classes associated with this server. To begin, from the CLASS OPERATIONS section, select "7.Add":
[ IMPLEMENTATION OPERATIONS ]
 1.Add  2.Delete  3.Change
 4.Show one  5.Show all  6.List aliases
[ CLASS OPERATIONS ]
 7.Add  8.Delete  9.Delete from all  10.List classes
[ SAVE & EXIT OPERATIONS ]
 11.Save data  12.Exit

Enter operation: 7
Class name. Enter the name of a class associated with the implementation alias.
Enter name of class:  class1

Implementation alias. Enter the alias for the server that implements the new class (this should be the same alias as given above).

Enter alias of implementation that implements class:  myServer

Class 'class1' now associated with implementation 'myServer'

The top-level menu will then reappear. Repeat the previous three steps until all classes have been associated with the server.

Then, from the SAVE & EXIT OPERATIONS section, select "11.Save data" to complete the registration. Finally, select "12.Exit" to exit the regimpl utility.

[ IMPLEMENTATION OPERATIONS ]
 1.Add  2.Delete  3.Change
 4.Show one  5.Show all  6.List aliases
[ CLASS OPERATIONS ]
 7.Add  8.Delete  9.Delete from all  10.List classes
[ SAVE & EXIT OPERATIONS ]
 11.Save data  12.Exit

Enter operation:  11

Enter operation:  12


[Back: The 'regimpl', 'pregimpl', 'wregimpl' registration utilities]
[Next: Command line interface to 'regimpl']