Naming Service
The general naming service provided by SST conforms to the specifications for the naming service facilities within CORBA.
The API for CORBA's CosNaming module is thus reflected in the SST implementation of its generic naming service. However, in order to generate appropriate CORBA exceptions under error conditions, each of the various classes in the SstNamingService application is subclassed in the SstCosNaming application. You must therefore specify an instance of SstCosNamingContext when setting the default naming service.
Similarly, creating names is done using the from: method on SstCosName, not SstName. In all other respects, the SST CosNaming facilities mimic those of the general naming service facilities in SST. (See Managing access to remote references.)
The following code illustrates creating a CORBA-compliant CosNamingService facility within SST. This example is almost identical to the example given earlier in Managing access to remote references; however, the class names must use the SstCos prefix to support CORBA exceptions being generated.
| namingService serviceName name exampleText|
namingService := SstCosNamingContext new.
serviceName := SstCosName from: 'myNames'.
namingService bindNewContext: serviceName.
name := SstCosName from: 'myNames/example.txt'.
namingService bind: name obj: 'This is an object in myNames'.
exampleText := namingService resolve: name.
namingService unbind: name.
^exampleText
Comprehensive specification of CORBA's naming service is available in the CORBAServices document from the OMG. An example of the use of the naming service is given in SstPingPongIiopNamingService.
The defaultNamingServiceFor: protocol in SstApplicationContext does not generate an IOR for a naming service object on a CORBA Orb. IORs must be obtained in some other fashion, and made available within SST. Typically, this involves using the fromString: API protocol on SstIor.
Last modified date: 01/29/2015