1 '\" t
   2 .\" Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
   3 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 .\"
   5 .\" This code is free software; you can redistribute it and/or modify it
   6 .\" under the terms of the GNU General Public License version 2 only, as
   7 .\" published by the Free Software Foundation.
   8 .\"
   9 .\" This code is distributed in the hope that it will be useful, but WITHOUT
  10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 .\" version 2 for more details (a copy is included in the LICENSE file that
  13 .\" accompanied this code).
  14 .\"
  15 .\" You should have received a copy of the GNU General Public License version
  16 .\" 2 along with this work; if not, write to the Free Software Foundation,
  17 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 .\"
  19 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 .\" or visit www.oracle.com if you need additional information or have any
  21 .\" questions.
  22 .\"
  23 .\"     Arch: generic
  24 .\"     Software: JDK 8
  25 .\"     Date: 21 November 2013
  26 .\"     SectDesc: Java IDL and RMI-IIOP Tools
  27 .\"     Title: orbd.1
  28 .\"
  29 .if n .pl 99999
  30 .TH orbd 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
  31 .\" -----------------------------------------------------------------
  32 .\" * Define some portability stuff
  33 .\" -----------------------------------------------------------------
  34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  35 .\" http://bugs.debian.org/507673
  36 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  37 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38 .ie \n(.g .ds Aq \(aq
  39 .el       .ds Aq '
  40 .\" -----------------------------------------------------------------
  41 .\" * set default formatting
  42 .\" -----------------------------------------------------------------
  43 .\" disable hyphenation
  44 .nh
  45 .\" disable justification (adjust text to left margin only)
  46 .ad l
  47 .\" -----------------------------------------------------------------
  48 .\" * MAIN CONTENT STARTS HERE *
  49 .\" -----------------------------------------------------------------
  50 
  51 .SH NAME    
  52 orbd \- Enables clients to locate and call persistent objects on servers in the CORBA environment\&.
  53 .SH SYNOPSIS    
  54 .sp     
  55 .nf     
  56 
  57 \fBorbd\fR [ \fIoptions\fR ]
  58 .fi     
  59 .sp     
  60 .TP     
  61 \fIoptions\fR
  62 Command-line options\&. See Options\&.
  63 .SH DESCRIPTION    
  64 The \f3orbd\fR command enables clients to transparently locate and call persistent objects on servers in the CORBA environment\&. The Server Manager included with the orbd tool is used to enable clients to transparently locate and call persistent objects on servers in the CORBA environment\&. The persistent servers, while publishing the persistent object references in the naming service, include the port number of the ORBD in the object reference instead of the port number of the server\&. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages:
  65 .TP 0.2i    
  66 \(bu
  67 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\&.
  68 .TP 0.2i    
  69 \(bu
  70 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\&.
  71 .PP
  72 To access the ORBD Server Manager, the server must be started using \f3servertool\fR, 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\&.
  73 .PP
  74 When \f3orbd\fR starts, it also starts a naming service\&. For more information about the naming service\&. See Start and Stop the Naming Service\&.
  75 .SH OPTIONS    
  76 .TP
  77 -ORBInitialPort \fInameserverport\fR
  78 .br
  79 Required\&. Specifies the port on which the name server should be started\&. After it is started, \f3orbd\fR 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\&.
  80 .SS NONREQUIRED\ OPTIONS    
  81 .TP
  82 -port \fIport\fR
  83 .br
  84 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)\&.
  85 .TP
  86 -defaultdb \fIdirectory\fR
  87 .br
  88 Specifies the base where the ORBD persistent storage directory, \f3orb\&.db\fR, is created\&. If this option is not specified, then the default value is \f3\&./orb\&.db\fR\&.
  89 .TP
  90 -serverPollingTime \fImilliseconds\fR
  91 .br
  92 Specifies how often ORBD checks for the health of persistent servers registered through \f3servertool\fR\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
  93 .TP
  94 -serverStartupDelay milliseconds
  95 .br
  96 Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered through \f3servertool\fR is restarted\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
  97 .TP
  98 -J\fIoption\fR
  99 .br
 100 Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
 101 .SS START\ AND\ STOP\ THE\ NAMING\ SERVICE    
 102 A naming service is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference\&. The name binding can be stored in the naming service, and a client can supply the name to obtain the desired object reference\&.
 103 .PP
 104 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\&.
 105 .PP
 106 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)\&.
 107 .PP
 108 For backward compatibility, \f3tnameserv\fR, 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\&.
 109 .PP
 110 The \f3-ORBInitialPort\fR argument is a required command-line argument for \f3orbd\fR, 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\&.
 111 .PP
 112 To start \f3orbd\fR from a UNIX command shell, enter:
 113 .sp     
 114 .nf     
 115 \f3orbd \-ORBInitialPort 1050&\fP
 116 .fi     
 117 .nf     
 118 \f3\fP
 119 .fi     
 120 .sp     
 121 From an MS-DOS system prompt (Windows), enter:
 122 .sp     
 123 .nf     
 124 \f3start orbd \-ORBInitialPort 1050\fP
 125 .fi     
 126 .nf     
 127 \f3\fP
 128 .fi     
 129 .sp     
 130 Now 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:
 131 .sp     
 132 .nf     
 133 \f3Properties props = new Properties();\fP
 134 .fi     
 135 .nf     
 136 \f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fP
 137 .fi     
 138 .nf     
 139 \f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialHost", "MyHost");\fP
 140 .fi     
 141 .nf     
 142 \f3ORB orb = ORB\&.init(args, props);\fP
 143 .fi     
 144 .nf     
 145 \f3\fP
 146 .fi     
 147 .sp     
 148 In this example, the naming service is running on port 1050 on host \f3MyHost\fR\&. 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\fR with the following command line:
 149 .sp     
 150 .nf     
 151 \f3java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost\fP
 152 .fi     
 153 .nf     
 154 \f3\fP
 155 .fi     
 156 .sp     
 157 To stop the naming service, use the relevant operating system command, such as \f3pkill\fR\f3orbd\fR on Oracle Solaris, or \fICtrl+C\fR in the DOS window in which \f3orbd\fR 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\&.
 158 .PP
 159 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
 160 .SH SERVER\ MANAGER    
 161 To access the ORBD Server Manager and run a persistent server, the server must be started with \f3servertool\fR, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server\&. When a server is started using \f3servertool\fR, it must be started on the same host and port on which \f3orbd\fR is executing\&. If the server is run on a different port, then the information stored in the database for local contexts will be invalid and the service will not work properly\&.
 162 .PP
 163 See Java IDL: The "Hello World" Example at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlExample\&.html
 164 .PP
 165 In this example, you run the \f3idlj\fR compiler and \f3javac\fR compiler as shown in the tutorial\&. To run the ORBD Server Manager, follow these steps for running the application:
 166 .PP
 167 Start \f3orbd\fR\&.
 168 .PP
 169 UNIX command shell, enter: \f3orbd -ORBInitialPort 1050\fR\&.
 170 .PP
 171 MS-DOS system prompt (Windows), enter: \f3s\fR\f3tart orbd -ORBInitialPort 105\fR\f30\fR\&.
 172 .PP
 173 Port 1050 is the port on which you want the name server to run\&. The \f3-ORBInitialPort\fR 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\&.
 174 .PP
 175 Start the \f3servertool\fR: \f3servertool -ORBInitialPort 1050\fR\&.
 176 .PP
 177 Make sure the name server (\f3orbd\fR) port is the same as in the previous step, for example, \f3-ORBInitialPort 1050\&.\fR The \f3servertool\fR must be started on the same port as the name server\&.
 178 .PP
 179 In the \f3servertool\fR command line interface, start the \f3Hello\fR server from the \f3servertool\fR prompt:
 180 .sp     
 181 .nf     
 182 \f3servertool  > register \-server HelloServer \-classpath \&. \-applicationName\fP
 183 .fi     
 184 .nf     
 185 \f3                HelloServerApName\fP
 186 .fi     
 187 .nf     
 188 \f3\fP
 189 .fi     
 190 .sp     
 191 The \f3servertool\fR registers the server, assigns it the name \f3HelloServerApName\fR, and displays its server ID with a listing of all registered servers\&.Run the client application from another terminal window or prompt:
 192 .sp     
 193 .nf     
 194 \f3java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost\fP
 195 .fi     
 196 .nf     
 197 \f3\fP
 198 .fi     
 199 .sp     
 200 For this example, you can omit \f3-ORBInitialHost localhost\fR because the name server is running on the same host as the \f3Hello\fR client\&. If the name server is running on a different host, then use the -\f3ORBInitialHost nameserverhost\fR option to specify the host on which the IDL name server is running\&.Specify the name server (\f3orbd\fR) port as done in the previous step, for example, \f3-ORBInitialPort 1050\fR\&. When you finish experimenting with the ORBD Server Manager, be sure to shut down or terminate the name server (\f3orbd\fR) and \f3servertool\fR\&. To shut down \f3orbd\fR from am MS-DOS prompt, select the window that is running the server and enter \fICtrl+C\fR to shut it down\&.
 201 .PP
 202 To shut down \f3orbd\fR from an Oracle Solaris shell, find the process, and terminate with the \f3kill\fR command\&. The server continues to wait for invocations until it is explicitly stopped\&. To shut down the \f3servertool\fR, type \fIquit\fR and press the \fIEnter\fR key\&.
 203 .SH SEE\ ALSO    
 204 .TP 0.2i    
 205 \(bu
 206 servertool(1)
 207 .TP 0.2i    
 208 \(bu
 209 Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
 210 .RE
 211 .br
 212 'pl 8.5i
 213 'bp