1orbd(1)                     General Commands Manual                    orbd(1)
2
3
4

Name

6       orbd - The Object Request Broker Daemon
7
8       orbd  is used to enable clients to transparently locate and invoke per‐
9       sistent objects on servers in the CORBA environment.
10
11       See also: Naming Service @
12       http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNam
13       ing.html
14

SYNOPSIS

16       orbd <options>
17
18

DESCRIPTION

20       The Server Manager included with the orbd tool is used to enable
21       clients to transparently locate and invoke persistent objects on
22       servers in the CORBA environment. The persistent servers, while pub‐
23       lishing the persistent object references in the Naming Service, include
24       the port number of the ORBD in the object reference instead of the port
25       number of the Server. The inclusion of an ORBD port number in the
26       object reference for persistent object references has the following
27       advantages:
28
29          o The object reference in the Naming Service remains independent of
30            the server life cycle. For example, the object reference could be
31            published by the server in the Naming Service when it is first
32            installed, and then, independent of how many times the server is
33            started or shutdown, the ORBD will always return the correct
34            object reference to the invoking client.
35
36          o The client needs to lookup the object reference in the Naming Ser‐
37            vice only once, and can keep re-using this reference independent
38            of the changes introduced due to server life cycle.
39
40
41       To access ORBD's Server Manager, the server must be started using
42       servertool(1), which is a command-line interface for application pro‐
43       grammers to register, unregister, startup, and shutdown a persistent
44       server. For more information on the Server Manager, see the section in
45       this document titled Server Manager.
46
47       When orbd starts up, it also starts a naming service. For more informa‐
48       tion on the naming service, link to Naming Service @
49       http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNam
50       ing.html.
51

OPTIONS

53   Required Options
54          -ORBInitialPort nameserverport
55             Specifies the port on which the name server should be started.
56             Once started, orbd will listen for incoming requests on this
57             port. Note that when using Solaris software, you must become root
58             to start a process on a port under 1024. For this reason, we rec‐
59             ommend that you use a port number greater than or equal to 1024.
60             (required)
61
62
63   OTHER OPTIONS
64          -port port
65             Specifies the activation port where ORBD should be started, and
66             where ORBD will be accepting requests for persistent objects. The
67             default value for this port is 1049. This port number is added to
68             the port field of the persistent Interoperable Object References
69             (IOR). (optional)
70
71
72          -defaultdb directory
73             Specifies the base where the ORBD persistent storage directory
74             orb.db is created. If this option is not specified, the default
75             value is "./orb.db". (optional)
76
77
78          -serverPollingTime milliseconds
79             Specifies how often ORBD checks for the health of persistent
80             servers registered via servertool. The default value is 1,000 ms.
81             The value specified for milliseconds must be a valid positive
82             integer. (optional)
83
84
85          -serverStartupDelay milliseconds
86             Specifies how long ORBD waits before sending a location forward
87             exception after a persistent server that is registered via
88             servertool is restarted. The default value is 1,000 ms. The value
89             specified for milliseconds must be a valid positive integer.
90             (optional)
91
92
93          -Joption
94             Pass option to the Java virtual machine, where option is one of
95             the options described on the reference page for java(1). For
96             example, -J-Xms48m sets the startup memory to 48 megabytes. It is
97             a common convention for -J to pass options to the underlying vir‐
98             tual machine.
99
100
101
102
103       Starting and Stopping the Naming Service
104
105       A Naming Service is a CORBA service that allows CORBA objects @
106       http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlos
107       sary.html#CORBA%20object to be named by means of binding a name to an
108       object reference. The name binding @
109       http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlos
110       sary.html#name%20binding may be stored in the naming service, and a
111       client may supply the name to obtain the desired object reference.
112
113       Prior to running a client or a server, you will start ORBD. ORBD
114       includes a persistent Naming Service and a transient Naming Service,
115       both of which are an implementation of the COS Naming Service.
116
117       The Persistent Naming Service provides persistence for naming contexts.
118       This means that this information is persistent across service shutdowns
119       and startups, and is recoverable in the event of a service failure. If
120       ORBD is restarted, the Persistent Naming Service will restore the nam‐
121       ing context graph, so that the binding of all clients' and servers'
122       names remains intact (persistent).
123
124
125
126       For backward compatibility, tnameserv, a Transient Naming Service
127       shipped with older versions of the JDK, is also included in this
128       release of J2SE. A transient naming service retains naming contexts as
129       long as it is running. If there is a service interruption, the naming
130       context graph is lost.
131
132       The -ORBInitialPort argument is a required command-line argument for
133       orbd, and is used to set the port number on which the Naming Service
134       will run. The following instructions assume you can use port 1050 for
135       the Java IDL Object Request Broker Daemon. When using Solaris software,
136       you must become root to start a process on a port under 1024. For this
137       reason, we recommend that you use a port number greater than or equal
138       to 1024. You can substitute a different port if necessary.
139
140       To start orbd from a UNIX command shell, enter:
141
142         orbd -ORBInitialPort 1050&
143
144
145       From an MS-DOS system prompt (Windows), enter:
146
147         start orbd -ORBInitialPort 1050
148
149
150       Now that ORBD is running, you can run your server and client applica‐
151       tions. When running the client and server applications, they must be
152       made aware of the port number (and machine name, if applicable) where
153       the Naming Service is running. One way to do this is to add the follow‐
154       ing code to your application:
155
156               Properties props = new Properties();
157               props.put("org.omg.CORBA.ORBInitialPort", "1050");
158               props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
159               ORB orb = ORB.init(args, props);
160
161
162       In this example, the Naming Service is running on port 1050 on host
163       "MyHost". Another way is to specify the port number and/or machine name
164       when running the server or client application from the command line.
165       For example, you would start your "HelloApplication" with the following
166       command line:
167
168            java HelloApplication -ORBInitialPort 1050 -ORBInitialHost MyHost
169
170
171       To stop the naming service, use the relevant operating system command,
172       such as pkill orbd on Solaris, or Ctrl+C in the DOS window in which
173       orbd is running. Note that names registered with the naming service may
174       disappear when the service is terminated if the naming service is tran‐
175       sient. The Java IDL naming service will run until it is explicitly
176       stopped.
177
178       For more information on the Naming Service included with ORBD, see Nam‐
179       ing Service @
180       http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNam
181       ing.html.
182

Server Manager

184       To access ORBD's Server Manager and run a persistent server, the server
185       must be started using servertool(1), which is a command-line interface
186       for application programmers to register, unregister, startup, and shut‐
187       down a persistent server. When a server is started using servertool, it
188       must be started on the same host and port on which orbd is executing.
189       If the server is run on a different port, the information stored in the
190       database for local contexts will be invalid and the service will not
191       work properly.
192
193   Server Manager: an Example
194       Using the sample tutorial @
195       http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlExam
196       ple.html for our demonstration, you would run the idlj compiler and
197       javac compiler as shown in the tutorial. To run the Server Manager,
198       follow these steps for running the application:
199
200       Start orbd.
201
202       To start orbd from a UNIX command shell, enter:
203
204
205
206         orbd -ORBInitialPort 1050
207
208
209       From an MS-DOS system prompt (Windows), enter:
210
211         start orbd -ORBInitialPort 1050
212
213
214       Note that 1050 is the port on which you want the name server to run.
215       -ORBInitialPort is a required command-line argument. When using Solaris
216       software, you must become root to start a process on a port under 1024.
217       For this reason, we recommend that you use a port number greater than
218       or equal to 1024.
219
220       Start the servertool:
221
222       To start the Hello server, enter:
223
224         servertool -ORBInitialPort 1050
225
226
227       Make sure the name server (orbd) port is the same as in the previous
228       step, for example, -ORBInitialPort 1050. The servertool must be started
229       on the same port as the name server.
230
231       The servertool command line interface appears.
232
233       Start the Hello server from the servertool prompt:
234
235         servertool  > register -server HelloServer -classpath . -applicationName
236                       HelloServerApName
237
238
239       The servertool registers the server, assigns it the name of "Hel‐
240       loServerApName", and displays its server id, along with a listing of
241       all registered servers.
242
243       Run the client application from another terminal window or prompt:
244
245
246
247         java HelloClient -ORBInitialPort 1050 -ORBInitialHost localhost
248
249
250       For this example, you can omit -ORBInitialHost localhost since the name
251       server is running on the same host as the Hello client. If the name
252       server is running on a different host, use -ORBInitialHost nameserver‐
253       host to specify the host on which the IDL name server is running.
254
255       Specify the name server (orbd) port as done in the previous step, for
256       example, -ORBInitialPort 1050.
257
258
259
260
261
262       When you have finished experimenting with the Server Manager, be sure
263       to shut down or kill the name server (orbd) and servertool.
264
265       To shut down orbd from a DOS prompt, select the window that is running
266       the server and enter Ctrl+C to shut it down. To shut down orbdfrom a
267       Unix shell, find the process, and kill it. The server will continue to
268       wait for invocations until it is explicitly stopped.
269
270       To shut down the servertool, type quit and press the Enter key on the
271       keyboard.
272

See Also

274          o Naming Service @
275            http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNam
276            ing.html
277
278          o servertool(1)
279
280
281                                  16 Mar 2012                          orbd(1)
Impressum