📄 readme
字号:
// README,v 1.19 2001/02/02 20:21:38 schmidt Exp
This directory contains files that implement a server for the TAO
Naming Service. In addition, it contains files that run the TAO
Naming Service as a Windows NT Service. Both of these services are
described below.
How to Run the TAO Naming Service
=================================
The following describes how to run the TAO Naming Service.
1. Syntax
% Naming_Service [-ORBNameServicePort nsport]
[-o ior_output_file]
[-p pid_file_name]
[-s context_size]
[-t time]
[-f persitence_file_name]
[-b base_address]
[-m (1=enable multicast responses,0=disable(default)]
[-z time]
2. Optional Command-line Arguments
-ORBNameServicePort nsport
Multicast port for listening for requests from clients
trying to bootstrap to a Naming Service through the
use of multicast. This is only used when multicast
responding is enabled via '-m 1'.
-o ior_output_file
The name of the file, in which to store the IOR of the
root Naming Service context.
-p pid_file_name
The name of the file, in which to store the process id
of the Naming Service server.
-s context_size
Size of the hash table allocated for the root Naming
Context (if one is created). All contexts created
under the root will use the same size for their hash
tables. The default is 1024.
-t time
How long (in seconds) the server should listen for
client requests before terminating.
-f persistence_file_name
The name of the file to use to store/retrieve
persistent state of the Naming Service. Without this
option, Naming Service is started in non-persistent
mode.
-b base_address
The address used for memory mapping the file specified
with the "-f" option above. The value supplied with
this option is only used when the Naming Service runs
in persistent mode, i.e., "-f" option is present.
-m <0|1>
TAO offers a simple, very non-standard method for
clients to discover the initial reference for the
Naming Service. However, since it can be innadequate and cause
unexpected results if, for example, there are multiple
naming services running on the network, the DEFAULT
behavior is for the Naming Service to NOT RESPOND to
such multicast queries (use the Interoperable Naming
Service bootstrap options instead).
-z time
A relative round trip timeout value (in seconds) that
the service should wait for when trying to progress an
operation through a federated naming context before
timing out and throwing a 'Cannot proceed' exception
to the client. If no value is set this will never occur.
3. Environment Variables
NameServicePort
Multicast port for listening for requests from clients
trying to bootstrap to a Naming Service through the
use of multicast. This is only used when multicast
responding is enabled via '-m 1'.
4. Persistence
TAO Naming Service has an optional persistence capability. By
default, the Naming Service is started in a non-persistent
mode. Supplying "-f" command-line option to the server causes
a persistent version of the Naming Service to run.
The file specified with the "-f" option is used to store the
persistent state of the Naming Service, i.e., all Naming
Contexts and their bindings. When "-f" option is specified:
1. If the specified file does not exist, it is created and
used to store the state of the Naming Service. An initial
(root) Naming Context is also created.
2. If the specified file exists, it is scanned and:
a) If any inconsistency is detected in the stored
state, or the file is not recognized by the Naming
Service, the server exits. (This may happen, for
example, if a server or host crashed in the middle of
writing a record to this file on a previous run). A
noncorrupted version of the file must be used instead.
b) If the file is recognized and is ok, the state
stored in the file becomes the current state of the
Naming Service.
Internally, TAO uses memory mapped file to implement
persistence feature of the Naming Service. A default memory
address (ACE_DEFAULT_BASE_ADDR) is used for mapping the file.
Alternate mapping address can be specified at compile-time by
redefining TAO_NAMING_BASE_ADDR in tao/orbconf.h. Alternate
mapping address can also be specified at run-time
with the "-b" command-line option, which takes precedence over
TAO_NAMING_BASE_ADDR definition.
NOTE: Naming Service stores absolute pointers in its
memory-mapped file. Therefore, it is important to use the
same mapping address on each run for the same persistence file.
5. Implementation Policies
a. Destroying Binding Iterators
A binding iterator is destroyed when client invokes
<destroy> operation either on the iterator itself or
on the naming context it is iterating over. In both
cases, subsequent calls on the binding iterator object
will cause OBJECT_NOT_EXIST exception.
b. Dealing with orphaned contexts
This implementation of the Naming Service does not
include any form of 'garbage collection' for orphaned
naming contexts. It is solely the responsibility of
clients to clean up after themselves and not leak
server resources. All the resources, including
orphaned contexts, are released during the Naming
Server shutdown.
6. Clients: ways to bootstrap to the Naming Service:
There are several methods for a client to bootstrap to a
Naming Service, i.e., there are several mechanisms
<resolve_initial_references> can use when asked for
"NameService". In order of predictable behavior, they are:
1. Command-line options
The "-ORBInitRef NameService=IOR:..." or environment
variable NameServiceIOR can be used on the client side
to specify the object that the call to
<resolve_initial_references> should return to the
client. (On the server side, -o option can be used to
get the ior).
Example (Unix, same host):
% TAO_ROOT/orbsvcs/Naming_Service -o ior_file
% my_client -ORBInitRef NameService=file://ior_file
On the first line, we start the Naming
Service, and output its ior to <ior_file>. On
the second line, we start some client, and
specify the ior <resolve_initial_references>
should return for the Naming Service in a file
format.
2. Interoperable Naming Service.
TAO implements the standard CORBA Interoperable Naming
Service (ING). Therefore, most initialization options
provided by INS can be used to bootstrap to the Naming
Service (see TAO's releasenotes for the status of INS
implementation).
3. Multicast
When started with the "respond to multicast queries"
option turned on ('-m 1'), clients can use IP
multicast to query for a Naming Service, and this
instance will respond. TAO Naming Server is listening
for client multicast requests on a specified port. On
the client side, <resolve_initial_references> sends
out a multicast request on the network, trying to
locate a Naming Service. When a Naming Server
receives a multicast request from a client, it replies
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -