Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
Arch: generic
Software: JDK 8
Date: 21 November 2013
SectDesc: Java IDL and RMI-IIOP Tools
Title: orbd.1
* Define some portability stuff
-----------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://bugs.debian.org/507673
http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------
* set default formatting
-----------------------------------------------------------------
disable hyphenation
disable justification (adjust text to left margin only)
-----------------------------------------------------------------
* MAIN CONTENT STARTS HERE *
-----------------------------------------------------------------
orbd [ options ]
options Command-line options. See Options.
0.2i The object reference in the naming service remains independent of the server life cycle. For example, the object reference could be published by the server in the Naming Service when it is first installed, and then, independent of how many times the server is started or shut down, the ORBD returns the correct object reference to the calling client.
0.2i The client needs to look up the object reference in the naming service only once, and can keep reusing this reference independent of the changes introduced due to server life cycle.
To access the ORBD Server Manager, the server must be started using \f3servertool, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server. For more information on the Server Manager, see Server Manager.
When \f3orbd starts, it also starts a naming service. For more information about the naming service. See Start and Stop the Naming Service.
-ORBInitialPort nameserverport
Required. Specifies the port on which the name server should be started. After it is started, \f3orbd listens for incoming requests on this port. On Oracle Solaris software, you must become the root user to start a process on a port below 1024. For this reason, Oracle recommends that you use a port number above or equal to 1024.
-port port
Specifies the activation port where ORBD should be started, and where ORBD will be accepting requests for persistent objects. The default value for this port is 1049. This port number is added to the port field of the persistent Interoperable Object References (IOR).
-defaultdb directory
Specifies the base where the ORBD persistent storage directory, \f3orb.db, is created. If this option is not specified, then the default value is \f3./orb.db.
-serverPollingTime milliseconds
Specifies how often ORBD checks for the health of persistent servers registered through \f3servertool. The default value is 1000 ms. The value specified for \f3milliseconds must be a valid positive integer.
-serverStartupDelay milliseconds
Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered through \f3servertool is restarted. The default value is 1000 ms. The value specified for \f3milliseconds must be a valid positive integer.
-Joption
Passes \f3option to the Java Virtual Machine, where \f3option is one of the options described on the reference page for the Java application launcher. For example, \f3-J-Xms48m sets the startup memory to 48 MB. See java(1).
Before running a client or a server, you will start ORBD. ORBD includes a persistent naming service and a transient naming service, both of which are an implementation of the COS Naming Service.
The Persistent Naming Service provides persistence for naming contexts. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure. If ORBD is restarted, then the Persistent Naming Service restores the naming context graph, so that the binding of all clients' and servers' names remains intact (persistent).
For backward compatibility, \f3tnameserv, a Transient Naming Service that shipped with earlier releases of the JDK, is also included in this release of Java SE. A transient naming service retains naming contexts as long as it is running. If there is a service interruption, then the naming context graph is lost.
The \f3-ORBInitialPort argument is a required command-line argument for \f3orbd, and is used to set the port number on which the naming service runs. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon. When using Oracle Solaris software, you must become a root user to start a process on a port lower than 1024. For this reason, it is recommended that you use a port number above or equal to 1024. You can substitute a different port when necessary.
To start \f3orbd from a UNIX command shell, enter:
\f3orbd -ORBInitialPort 1050&
\f3From an MS-DOS system prompt (Windows), enter:
\f3start orbd -ORBInitialPort 1050
\f3Now that ORBD is running, you can run your server and client applications. When running the client and server applications, they must be made aware of the port number (and machine name, when applicable) where the Naming Service is running. One way to do this is to add the following code to your application:
\f3Properties props = new Properties();
\f3props.put("org.omg.CORBA.ORBInitialPort", "1050");
\f3props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
\f3ORB orb = ORB.init(args, props);
\f3In this example, the naming service is running on port 1050 on host \f3MyHost. Another way is to specify the port number and/or machine name when running the server or client application from the command line. For example, you would start your \f3HelloApplication with the following command line:
\f3java HelloApplication -ORBInitialPort 1050 -ORBInitialHost MyHost
\f3To stop the naming service, use the relevant operating system command, such as \f3pkill\f3orbd on Oracle Solaris, or Ctrl+C in the DOS window in which \f3orbd is running. Note that names registered with the naming service can disappear when the service is terminated because of a transient naming service. The Java IDL naming service will run until it is explicitly stopped.
For more information about the naming service included with ORBD, see Naming Service at http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlNaming.html
See Java IDL: The "Hello World" Example at http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlExample.html
In this example, you run the \f3idlj compiler and \f3javac compiler as shown in the tutorial. To run the ORBD Server Manager, follow these steps for running the application:
Start \f3orbd.
UNIX command shell, enter: \f3orbd -ORBInitialPort 1050.
MS-DOS system prompt (Windows), enter: \f3s\f3tart orbd -ORBInitialPort 105\f30.
Port 1050 is the port on which you want the name server to run. The \f3-ORBInitialPort option is a required command-line argument. When using Oracle Solaris software, you must become a root user to start a process on a port below 1024. For this reason, it is recommended that you use a port number above or equal to 1024.
Start the \f3servertool: \f3servertool -ORBInitialPort 1050.
Make sure the name server (\f3orbd) port is the same as in the previous step, for example, \f3-ORBInitialPort 1050. The \f3servertool must be started on the same port as the name server.
In the \f3servertool command line interface, start the \f3Hello server from the \f3servertool prompt:
\f3servertool > register -server HelloServer -classpath . -applicationName
\f3 HelloServerApName
\f3The \f3servertool registers the server, assigns it the name \f3HelloServerApName, and displays its server ID with a listing of all registered servers.Run the client application from another terminal window or prompt:
\f3java HelloClient -ORBInitialPort 1050 -ORBInitialHost localhost
\f3For this example, you can omit \f3-ORBInitialHost localhost because the name server is running on the same host as the \f3Hello client. If the name server is running on a different host, then use the -\f3ORBInitialHost nameserverhost option to specify the host on which the IDL name server is running.Specify the name server (\f3orbd) port as done in the previous step, for example, \f3-ORBInitialPort 1050. When you finish experimenting with the ORBD Server Manager, be sure to shut down or terminate the name server (\f3orbd) and \f3servertool. To shut down \f3orbd from am MS-DOS prompt, select the window that is running the server and enter Ctrl+C to shut it down.
To shut down \f3orbd from an Oracle Solaris shell, find the process, and terminate with the \f3kill command. The server continues to wait for invocations until it is explicitly stopped. To shut down the \f3servertool, type quit and press the Enter key.
0.2i servertool(1)
0.2i Naming Service at http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlNaming.html
'pl 8.5i 'bp