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
9          persistent objects on servers in the CORBA environment.
10
11          See also: Naming Service
12

SYNOPSIS

14       orbd <options>
15
16

DESCRIPTION

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

OPTIONS

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

Server Manager

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

See Also

263          o Naming Service
264
265          o servertool
266
267
268                                  07 Aug 2006                          orbd(1)
Impressum