Retrieve or set the current (default) CORBA naming service.

Usage

   namingService(id=character(0))

Arguments

id either no value if one is querying the current value or a CORBA identifier - IOR or character vector identifying a nested path in the naming context - specifying a CORBA Naming Context which is to be used as the new default naming service value.

Description

Allows one to query or set the value of the default naming service that is used in many functions to identify a named CORBA object. This can be used to simply re-root the default context searched for values or specify a totally different naming service process. For example, we may have a nested naming context called ``Project1'' and several objects within it. Rather than identifying them as "Project1", "A" and "Project1", "B" we can temporarily make "Project1" the default naming service and refer to these objects simply as "A" and "B".

Alternatively, we can switch to another naming service which may be managed by a different group, or contain objects for a different project, etc. This is a managerial/configuration decision.

Value

If no argument is supplied, the return value is the IOR of the current value for the default naming context. Otherwise, the value is the IOR of the previous naming context that has been replaced with the new value identified by the argument. This allows one to temporarily set the default to a value, storing the return value in order to restore it to its original value at the end of a computation. See the examples below.

Author(s)

Duncan Temple Lang

References

http://www.omegahat.org/CORBA

See Also

createNamingContext, namedCorbaObject, namingServiceContents

Examples

 namingService()
   # change the default to point to 
   # a naming context within the current default on.
 namingService("R")


   # start a new naming service and trap its IOR
 system("nameserv -OAport 5678 --ior > /tmp/Name.ref &") 
 old <- namingService(ior("/tmp/Name.ref"))
 on.exit(namingService(old))


[Package Contents]