orbd.1 12.3 KB
Newer Older
D
duke 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
." Copyright 2001-2006 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
." CA 95054 USA or visit www.sun.com if you need additional information or
." have any questions.
T
tbell 已提交
21 22 23
."
.TH orbd 1 "04 May 2009"
." Generated from HTML by html2man (author: Eric Armstrong)
D
duke 已提交
24 25

.LP
T
tbell 已提交
26
.SH "Name"
D
duke 已提交
27 28 29 30 31 32 33 34 35
orbd \- The Object Request Broker Daemon
.LP
.RS 3

.LP
.LP
\f3orbd\fP is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment.
.LP
.LP
T
tbell 已提交
36 37 38 39 40
\f3See also:\fP 
.na
\f2Naming Service\fP @
.fi
http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html
D
duke 已提交
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
.LP
.RE
.SH "SYNOPSIS"
.LP

.LP
.nf
\f3
.fl
orbd <\fP\f3options\fP\f3>
.fl
\fP
.fi

.LP
.SH "DESCRIPTION"
.LP

.LP
.LP
The Server Manager included with the \f3orbd\fP tool is used to enable clients to transparently locate and invoke 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:
.LP
.RS 3
.TP 2
o
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 shutdown, the ORBD will always return the correct object reference to the invoking client. 
.TP 2
o
The client needs to lookup the object reference in the Naming Service only once, and can keep re\-using this reference independent of the changes introduced due to server life cycle. 
.RE

.LP
.LP
T
tbell 已提交
74
To access ORBD's Server Manager, the server must be started using servertool(1), which is a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. For more information on the Server Manager, see the section in this document titled \f2Server Manager\fP.
D
duke 已提交
75 76
.LP
.LP
T
tbell 已提交
77 78 79 80 81
When \f2orbd\fP starts up, it also starts a naming service. For more information on the naming service, link to 
.na
\f2Naming Service\fP @
.fi
http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html.
D
duke 已提交
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
.LP
.SH "OPTIONS"
.LP
.SS 
Required Options
.LP
.RS 3
.TP 3
\-ORBInitialPort nameserverport 
Specifies the port on which the name server should be started. Once started, \f2orbd\fP will listen for incoming requests on this port. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. (required) 
.RE

.LP
.LP

.LP
.SS 
OTHER OPTIONS
.LP
.RS 3
.TP 3
\-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). (optional) 
.RE

.LP
.RS 3
.TP 3
\-defaultdb directory 
Specifies the base where the ORBD persistent storage directory \f2orb.db\fP is created. If this option is not specified, the default value is "./orb.db". (optional) 
.RE

.LP
.RS 3
.TP 3
\-serverPollingTime milliseconds 
Specifies how often ORBD checks for the health of persistent servers registered via \f2servertool\fP. The default value is 1,000 ms. The value specified for \f2milliseconds\fP must be a valid positive integer. (optional) 
.RE

.LP
.RS 3
.TP 3
\-serverStartupDelay milliseconds 
Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered via \f2servertool\fP is restarted. The default value is 1,000 ms. The value specified for \f2milliseconds\fP must be a valid positive integer. (optional) 
.RE

.LP
.RS 3
.TP 3
\-Joption 
T
tbell 已提交
132
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine. 
D
duke 已提交
133 134 135 136 137 138 139 140
.TP 3
 
.RE

.LP
.SH "Starting and Stopping the Naming Service"
.LP
.LP
T
tbell 已提交
141 142 143 144 145 146 147 148 149
A Naming Service is a CORBA service that allows 
.na
\f2CORBA objects\fP @
.fi
http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20object to be named by means of binding a name to an object reference. The 
.na
\f2name binding\fP @
.fi
http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlGlossary.html#name%20binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference.
D
duke 已提交
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
.LP
.LP
Prior to 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.
.LP
.LP
The \f4Persistent\fP\f3 Naming Service\fP 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, the Persistent Naming Service will restore the naming context graph, so that the binding of all clients' and servers' names remains intact (persistent).
.LP
.LP
\ 
.LP
.LP
For backward compatibility, \f2tnameserv\fP, a \f4Transient\fP\f3 Naming Service\fP shipped with older versions of the JDK, is also included in this release of J2SE. A transient naming service retains naming contexts as long as it is running. If there is a service interruption, the naming context graph is lost.
.LP
.LP
The \f2\-ORBInitialPort\fP argument is a required command\-line argument for \f2orbd\fP, and is used to set the port number on which the Naming Service will run. The following instructions assume you can use port 1050 for the Java\ IDL Object Request Broker Daemon. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. You can substitute a different port if necessary.
.LP
.LP
To start \f2orbd\fP from a UNIX command shell, enter:
.LP
.nf
\f3
.fl
  orbd \-ORBInitialPort 1050&
.fl
\fP
.fi

.LP
.LP
From an MS\-DOS system prompt (Windows), enter:
.LP
.nf
\f3
.fl
  start orbd \-ORBInitialPort 1050
.fl
\fP
.fi

.LP
.LP
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, if applicable) where the Naming Service is running. One way to do this is to add the following code to your application:
.LP
.nf
\f3
.fl
        Properties props = new Properties();
.fl
        props.put("org.omg.CORBA.ORBInitialPort", "1050");
.fl
        props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
.fl
        ORB orb = ORB.init(args, props);
.fl
\fP
.fi

.LP
.LP
In this example, the Naming Service is running on port 1050 on host "MyHost". 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 "HelloApplication" with the following command line:
.LP
.nf
\f3
.fl
     java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost
.fl
\fP
.fi

.LP
.LP
To stop the naming service, use the relevant operating system command, such as \f2pkill orbd\fP on Solaris, or \f2Ctrl+C\fP in the DOS window in which \f2orbd\fP is running. Note that names registered with the naming service may disappear when the service is terminated if the naming service is transient. The Java IDL naming service will run until it is explicitly stopped.
.LP
.LP
T
tbell 已提交
224 225 226 227 228
For more information on the Naming Service included with ORBD, see 
.na
\f2Naming Service\fP @
.fi
http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html.
D
duke 已提交
229 230 231 232
.LP
.SH "Server Manager"
.LP
.LP
T
tbell 已提交
233
To access ORBD's Server Manager and run a persistent server, the server must be started using servertool(1), which is a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. When a server is started using \f2servertool\fP, it must be started on the same host and port on which \f2orbd\fP is executing. If the server is run on a different port, the information stored in the database for local contexts will be invalid and the service will not work properly.
D
duke 已提交
234 235 236 237 238
.LP
.SS 
Server Manager: an Example
.LP
.LP
T
tbell 已提交
239 240 241 242 243
Using the 
.na
\f2sample tutorial\fP @
.fi
http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlExample.html for our demonstration, you would run the \f2idlj\fP compiler and \f2javac\fP compiler as shown in the tutorial. To run the Server Manager, follow these steps for running the application:
D
duke 已提交
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
.LP
.LP
Start \f2orbd\fP.
.LP
.LP
To start \f2orbd\fP from a UNIX command shell, enter:
.LP
.LP
\ 
.LP
.nf
\f3
.fl
  orbd \-ORBInitialPort 1050 
.fl
\fP
.fi

.LP
.LP
From an MS\-DOS system prompt (Windows), enter:
.LP
.nf
\f3
.fl
  start orbd \-ORBInitialPort 1050
.fl
\fP
.fi

.LP
.LP
Note that \f21050\fP is the port on which you want the name server to run. \f2\-ORBInitialPort\fP is a required command\-line argument. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.
.LP
.LP
Start the \f2servertool\fP:
.LP
.LP
To start the Hello server, enter:
.LP
.nf
\f3
.fl
  servertool \-ORBInitialPort 1050
.fl
\fP
.fi

.LP
.LP
Make sure the name server (\f2orbd\fP) port is the same as in the previous step, for example, \f2\-ORBInitialPort 1050\fP. The \f2servertool\fP must be started on the same port as the name server.
.LP
.LP
The \f2servertool\fP command line interface appears.
.LP
.LP

.LP
.LP
Start the Hello server from the \f2servertool\fP prompt:
.LP
.nf
\f3
.fl
  servertool  > register \-server HelloServer \-classpath . \-applicationName
.fl
                HelloServerApName
.fl
\fP
.fi

.LP
.LP
The \f2servertool\fP registers the server, assigns it the name of "HelloServerApName", and displays its server id, along with a listing of all registered servers.
.LP
.LP

.LP
.LP
Run the client application from another terminal window or prompt:
.LP
.LP
\ 
.LP
.nf
\f3
.fl
  java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost
.fl
\fP
.fi

.LP
.LP
For this example, you can omit \f2\-ORBInitialHost localhost\fP since the name server is running on the same host as the Hello client. If the name server is running on a different host, use \f2\-ORBInitialHost\fP \f2nameserverhost\fP to specify the host on which the IDL name server is running.
.LP
.LP
Specify the name server (\f2orbd\fP) port as done in the previous step, for example, \f2\-ORBInitialPort 1050\fP.
.LP
.LP
\ 
.LP
.LP
\ 
.LP
.LP
When you have finished experimenting with the Server Manager, be sure to shut down or kill the name server (\f2orbd\fP) and \f2servertool\fP.
.LP
.LP
To shut down \f2orbd\fP from a DOS prompt, select the window that is running the server and enter \f2Ctrl+C\fP to shut it down. To shut down \f2orbd\fPfrom a Unix shell, find the process, and kill it. The server will continue to wait for invocations until it is explicitly stopped.
.LP
.LP
To shut down the \f2servertool\fP, type \f2quit\fP and press the \f2Enter\fP key on the keyboard.
.LP
.SH "See Also"
.LP
.RS 3
.TP 2
o
T
tbell 已提交
363 364 365 366
.na
\f2Naming Service\fP @
.fi
http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html
D
duke 已提交
367 368 369
.br
.TP 2
o
T
tbell 已提交
370
servertool(1) 
D
duke 已提交
371 372 373 374 375 376 377 378 379
.RE

.LP
.br

.LP

.LP