Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > a5b20f7ff89b16488de4451524d040ed > files > 34

omniorb-doc-4.1.4-3mdv2010.1.x86_64.rpm

\documentclass[a4paper,11pt,twoside]{article}
\usepackage[T1]{fontenc}
\usepackage{palatino}
\addtolength{\oddsidemargin}{-0.2in}
\addtolength{\evensidemargin}{-0.6in}
\addtolength{\textwidth}{0.5in}
\pagestyle{headings}

\newcommand{\cmdline}[1]{\texttt{#1}}



\title{The OMNI Naming Service}

\date{14 February 2008}

\begin{document}

\maketitle

\section{Introduction}

The OMNI Naming Service (\emph{omniNames}) is an omniORB
implementation of the OMG's COS Naming Service Specification.  It
offers a way for a client to turn a human-readable name into an object
reference, on which the client can subsequently invoke operations in
the normal way.  See the OMG specification for full details of the
functionality provided by the Naming Service.

The Naming Service stores a set of bindings of names to objects.
These bindings can be arranged as an arbitrary directed graph,
although they are often arranged in a tree hierarchy.  Each node in
the graph is a \emph{naming context}.  There is a ``root'' context at
which name lookups usually start.  This is the object returned by the
call to \verb|CORBA::ORB::resolve_initial_references("NameService").|


\section{`Log' file}

The Naming Service is often part of the bootstrapping process of other
CORBA programs.  For this reason, if an instance of omniNames crashes
(or the machine on which it runs is rebooted), it is important that
certain aspects of its operation persist upon restarting.  Firstly the
root context of the Naming Service should always be accessible through
the same object reference.  This helps the ORB to implement the
\verb|resolve_initial_references| call by allowing the object
reference to be stored in a configuration file, for example.
Secondly, the naming graph with all its bindings should persist
between invocations.

To achieve this, omniNames generates a redo log file, to which it
writes out an entry every time a change is made to the naming graph.
The directory in which this log file is written can be specified with
the \verb|OMNINAMES_LOGDIR| environment variable.  When omniNames is
restarted it uses the log file so that it can regenerate the naming
graph.

Periodically the log file is checkpointed, removing unnecessary
entries from the log file.  The idle time between checkpoints can be
set with the \verb|OMNINAMES_ITBC| environment variable.  It defaults
to 15 minutes.

\section{Starting omniNames and setting omniORB.cfg}

When starting omniNames for the first time, you can either let it
start with the default TCP port of 2809, or you can specify the port
number on which it should listen.  This is written to the log file so
that on subsequent invocations it will listen on the same port number
and thus can be accessible through the same object reference.  When
omniNames starts up successfully it writes the stringified object
reference for its root context on standard error.

At startup, omniORB tries to read the configuration file
\verb|omniORB.cfg| to obtain the object reference to the root context
of the Naming Service.  This object reference is returned by
\verb|resolve_initial_references("NameService")|. There are a number
of methods of specifying the root naming context in
\verb|omniORB.cfg|---see the omniORB manual for details.


\section{Command line parameters}

omniNames accepts the following command line parameters.

\vspace{\baselineskip}

\begin{tabular}{lp{.8\textwidth}}
%HEVEA\\

\cmdline{-help} &
    Output usage information.\\[.5\baselineskip]

\cmdline{-start }\textit{[port]} &
    Start omniNames for the first time, listening on
    \textit{port}.\\[.5\baselineskip]

\cmdline{-always} &
    In conjunction with \cmdline{-start}, always start up
    omniNames, even if its log file already exists.\\[.5\baselineskip]

\cmdline{-logdir }\textit{directory} &
    Specifies the directory for the redo log file, overriding the
    default.\\[.5\baselineskip]

\cmdline{-errlog }\textit{filename} &
    Causes output that would normally be sent to stderr to go to the
    specified file instead.\\[.5\baselineskip]

\cmdline{-nohostname} &
    Normally, omniNames includes the host name in the name of the redo
    log file. This option disables that, meaning the log file can be
    used on a different host, or if the host name
    changes.\\[.5\baselineskip]

\cmdline{-ignoreport} &
    omniNames normally adds its own endpoint, based on the port
    specification (given with \cmdline{-start} or stored in the log
    file). This option causes it to ignore the port. It should be used
    in conjunction with specific \cmdline{-ORBendPoint} options to
    ensure object references are stable.\\[.5\baselineskip]

\cmdline{-install }\textit{[port]} &
    On Windows, install omniNames service. See below.\\[.5\baselineskip]

\cmdline{-manual} &
    On Windows, specify that the service should be started
    manually. See below.\\[.5\baselineskip]

\cmdline{-remove} &
    On Windows, uninstall omniNames service. See below.\\[.5\baselineskip]

\end{tabular}



\section{Windows service}

omniNames can be run as a Windows service.

To install the service, run with the \cmdline{-install} command line
option, with a port to override the default 2809 if necessary. The
command line should include any other parameters of relevance, such as
the log directory and error log file. It is particularly important to
specify an error log file, since the service runs in an environment
where stderr goes nowhere. Similarly, if omniORB tracing is requested
with the various \cmdline{-ORBtrace} options, \cmdline{-ORBtraceFile}
should be specified, otherwise the trace messages vanish.

The service is normally configured to start at system startup time.
Specifying \cmdline{-manual} configures it for manual startup.
Regardless of that setting, the service is not automatically started
at the time it is installed. It should be started manually with the
service control manager if it is to run before the next system
restart.

Once installed, the service can be uninstalled by running omniNames
with the \cmdline{-remove} option.



\end{document}