The CORBA Name Service sample application is a modification of the Simpapp sample application. This sample application provides a CORBA C++ client and server. The Name Service sample application uses a namespace to store the SimpleFactory object. The server application creates the SimpleFactory object and binds the object to the namespace. The client application connects to the namespace, resolves the name of the SimpleFactory object, and then invokes methods on the SimpleFactory. Figure 4‑1 illustrates how the Name Service sample application works.Figure 4‑1 The Name Service Sample Application
Creates object references to the Simple object Listing 4‑1 shows the simple.idl file that defines the CORBA interfaces in the Name Service sample application.
4. Execute the runme command./usr/local/tuxdir/samples/corba/cnssimpappUse the files listed in Table 4‑2 to build and run the Name Service sample application.
The makefile for the Name Service sample application on UNIX operating systems. This file is used to build the Name Service sample application manually. See the Readme.txt file for additional information. The location of the executable UNIX make command must be defined in the PATH environment variable. The makefile for the Name Service sample application on the Windows operating system. This makefile can be used directly by the Visual C++ nmake command. This file is used to manually build the Name Service sample application. See the Readme.txt file for more information. The location of the executable Windows nmake command must be defined in the PATH environment variable.
2. On UNIX platforms, you also need to change the permission of runme.ksh to allow execute permission, as follows:Before running the Name Service sample application, you need to verify that certain environment variables are defined to correct locations. In most cases, these environment variables are set as part of the installation procedure. Some environment variables are set when you execute the runme command. You need to check the environment variables to ensure they reflect correct information.Table 4‑3 lists the environment variables required to run the Name Service sample application.
Execution of the runme command sets this environment variable to the absolute path name of the current directory. Execute the runme command from the directory to which you copied the sample application files. For example: Execution of the runme command sets this environment variable to the results directory, subordinate to the location defined by the APPDIR environment variable. Execution of the runme command sets this environment variable to the directory path and filename of the configuration file.
1. ksh prompt> export TUXDIR=directorypathThe runme command completes the following steps end-to-end:
2. Loads the UBBCONFIG file.
5. Starts the server application using the tmboot command.
7. Stops the server application using the tmshutdown command.
Note: To build and run the Name Service sample application, enter the runme command, as follows:prompt> cd workdirectoryksh prompt> cd workdirectoryTable 4‑4 lists the files in the work directory generated by the runme command.
Table 4‑4 C++ Files Generated by the runme Command Generated by the idl command, this file contains the client stubs for the SimpleFactory and Simple interfaces. Generated by the idl command, this file contains the client definitions of the SimpleFactory and Simple interfaces. Generated by the idl command, this file contains the server skeletons for the SimpleFactory and Simple interfaces. Generated by the idl command, this file contains the server definition for the SimpleFactory and Simple interfaces. A file that contains the security encryption key database. The subdirectory is created by the tmloadcf command in the runme command. A directory created by the runme command, subordinate to the location defined by the APPDIR environment variable.
Contains the input that the runme command provides to the Java client application. Contains the output produced when the runme command executes the Java client application. Contains the output that is expected when the Java client application is executed by the runme command. The data in the output file is compared to the data in the expected_output file to determine whether or not the test passed or failed. Contains the output generated by the runme command. If the runme command fails, check this file for errors. Output from commands generated by the tmboot command, which is executed by the runme command. If the -noredirect JavaServer option is specified in the UBBCONFIG file, the System.err.println method sends the output to the stderr file instead of to the ULOG file. Output generated by the tmboot command, which is executed by the runme command. If the -noredirect JavaServer option is specified in the UBBCONFIG file, the System.out.println method sends the output to the stdout file instead of to the ULOG file. Contains filtering and notification rules used by the TMSYSEVT (system event reporting) process. This file is generated by the tmboot command in the runme command. A binary version of the UBBCONFIG file. The UBBCONFIG file for the Java Name Service sample application. ULOG.date A log file that contains messages generated by the tmboot command.