OSDN Git Service

Add linux.x86 linux.x86_64 target
[pizza-ipa-oss/jre.git] / features / jp.pizzafactory.com.sun.jre / rootfiles.linux.x86 / jre / man / man1 / orbd.1
1 ." Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 
2 ."
3 .TH orbd 1 "06 Apr 2010"
4 ." Generated from HTML by html2man (author: Eric Armstrong)
5
6 .LP
7 .SH "Name"
8 orbd \- The Object Request Broker Daemon
9 .LP
10 .RS 3
11
12 .LP
13 .LP
14 \f3orbd\fP is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment.
15 .LP
16 .LP
17 \f3See also:\fP 
18 .na
19 \f2Naming Service\fP @
20 .fi
21 http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html
22 .LP
23 .RE
24 .SH "SYNOPSIS"
25 .LP
26
27 .LP
28 .nf
29 \f3
30 .fl
31 orbd <\fP\f3options\fP\f3>
32 .fl
33 \fP
34 .fi
35
36 .LP
37 .SH "DESCRIPTION"
38 .LP
39
40 .LP
41 .LP
42 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:
43 .LP
44 .RS 3
45 .TP 2
46 o
47 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. 
48 .TP 2
49 o
50 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. 
51 .RE
52
53 .LP
54 .LP
55 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.
56 .LP
57 .LP
58 When \f2orbd\fP starts up, it also starts a naming service. For more information on the naming service, link to 
59 .na
60 \f2Naming Service\fP @
61 .fi
62 http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html.
63 .LP
64 .SH "OPTIONS"
65 .LP
66 .SS 
67 Required Options
68 .LP
69 .RS 3
70 .TP 3
71 \-ORBInitialPort nameserverport 
72 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) 
73 .RE
74
75 .LP
76 .LP
77
78 .LP
79 .SS 
80 OTHER OPTIONS
81 .LP
82 .RS 3
83 .TP 3
84 \-port port 
85 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) 
86 .RE
87
88 .LP
89 .RS 3
90 .TP 3
91 \-defaultdb directory 
92 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) 
93 .RE
94
95 .LP
96 .RS 3
97 .TP 3
98 \-serverPollingTime milliseconds 
99 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) 
100 .RE
101
102 .LP
103 .RS 3
104 .TP 3
105 \-serverStartupDelay milliseconds 
106 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) 
107 .RE
108
109 .LP
110 .RS 3
111 .TP 3
112 \-Joption 
113 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. 
114 .TP 3
115  
116 .RE
117
118 .LP
119 .SH "Starting and Stopping the Naming Service"
120 .LP
121 .LP
122 A Naming Service is a CORBA service that allows 
123 .na
124 \f2CORBA objects\fP @
125 .fi
126 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 
127 .na
128 \f2name binding\fP @
129 .fi
130 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.
131 .LP
132 .LP
133 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.
134 .LP
135 .LP
136 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).
137 .LP
138 .LP
139
140 .LP
141 .LP
142 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.
143 .LP
144 .LP
145 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.
146 .LP
147 .LP
148 To start \f2orbd\fP from a UNIX command shell, enter:
149 .LP
150 .nf
151 \f3
152 .fl
153   orbd \-ORBInitialPort 1050&
154 .fl
155 \fP
156 .fi
157
158 .LP
159 .LP
160 From an MS\-DOS system prompt (Windows), enter:
161 .LP
162 .nf
163 \f3
164 .fl
165   start orbd \-ORBInitialPort 1050
166 .fl
167 \fP
168 .fi
169
170 .LP
171 .LP
172 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:
173 .LP
174 .nf
175 \f3
176 .fl
177         Properties props = new Properties();
178 .fl
179         props.put("org.omg.CORBA.ORBInitialPort", "1050");
180 .fl
181         props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
182 .fl
183         ORB orb = ORB.init(args, props);
184 .fl
185 \fP
186 .fi
187
188 .LP
189 .LP
190 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:
191 .LP
192 .nf
193 \f3
194 .fl
195      java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost
196 .fl
197 \fP
198 .fi
199
200 .LP
201 .LP
202 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.
203 .LP
204 .LP
205 For more information on the Naming Service included with ORBD, see 
206 .na
207 \f2Naming Service\fP @
208 .fi
209 http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html.
210 .LP
211 .SH "Server Manager"
212 .LP
213 .LP
214 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.
215 .LP
216 .SS 
217 Server Manager: an Example
218 .LP
219 .LP
220 Using the 
221 .na
222 \f2sample tutorial\fP @
223 .fi
224 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:
225 .LP
226 .LP
227 Start \f2orbd\fP.
228 .LP
229 .LP
230 To start \f2orbd\fP from a UNIX command shell, enter:
231 .LP
232 .LP
233
234 .LP
235 .nf
236 \f3
237 .fl
238   orbd \-ORBInitialPort 1050 
239 .fl
240 \fP
241 .fi
242
243 .LP
244 .LP
245 From an MS\-DOS system prompt (Windows), enter:
246 .LP
247 .nf
248 \f3
249 .fl
250   start orbd \-ORBInitialPort 1050
251 .fl
252 \fP
253 .fi
254
255 .LP
256 .LP
257 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.
258 .LP
259 .LP
260 Start the \f2servertool\fP:
261 .LP
262 .LP
263 To start the Hello server, enter:
264 .LP
265 .nf
266 \f3
267 .fl
268   servertool \-ORBInitialPort 1050
269 .fl
270 \fP
271 .fi
272
273 .LP
274 .LP
275 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.
276 .LP
277 .LP
278 The \f2servertool\fP command line interface appears.
279 .LP
280 .LP
281
282 .LP
283 .LP
284 Start the Hello server from the \f2servertool\fP prompt:
285 .LP
286 .nf
287 \f3
288 .fl
289   servertool  > register \-server HelloServer \-classpath . \-applicationName
290 .fl
291                 HelloServerApName
292 .fl
293 \fP
294 .fi
295
296 .LP
297 .LP
298 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.
299 .LP
300 .LP
301
302 .LP
303 .LP
304 Run the client application from another terminal window or prompt:
305 .LP
306 .LP
307
308 .LP
309 .nf
310 \f3
311 .fl
312   java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost
313 .fl
314 \fP
315 .fi
316
317 .LP
318 .LP
319 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.
320 .LP
321 .LP
322 Specify the name server (\f2orbd\fP) port as done in the previous step, for example, \f2\-ORBInitialPort 1050\fP.
323 .LP
324 .LP
325
326 .LP
327 .LP
328
329 .LP
330 .LP
331 When you have finished experimenting with the Server Manager, be sure to shut down or kill the name server (\f2orbd\fP) and \f2servertool\fP.
332 .LP
333 .LP
334 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.
335 .LP
336 .LP
337 To shut down the \f2servertool\fP, type \f2quit\fP and press the \f2Enter\fP key on the keyboard.
338 .LP
339 .SH "See Also"
340 .LP
341 .RS 3
342 .TP 2
343 o
344 .na
345 \f2Naming Service\fP @
346 .fi
347 http://java.sun.com/javase/6/docs/technotes/guides/idl/jidlNaming.html
348 .br
349 .TP 2
350 o
351 servertool(1) 
352 .RE
353
354 .LP
355 .br
356
357 .LP
358