1orbd(1) Java IDL and RMI-IIOP Tools orbd(1)
2
3
4
6 orbd - Enables clients to locate and call persistent objects on servers
7 in the CORBA environment.
8
10 orbd [ options ]
11
12
13 options
14 Command-line options. See Options.
15
17 The orbd command enables clients to transparently locate and call
18 persistent objects on servers in the CORBA environment. The Server
19 Manager included with the orbd tool is used to enable clients to
20 transparently locate and call persistent objects on servers in the
21 CORBA environment. The persistent servers, while publishing the
22 persistent object references in the naming service, include the port
23 number of the ORBD in the object reference instead of the port number
24 of the server. The inclusion of an ORBD port number in the object
25 reference for persistent object references has the following
26 advantages:
27
28 · The object reference in the naming service remains independent of the
29 server life cycle. For example, the object reference could be
30 published by the server in the Naming Service when it is first
31 installed, and then, independent of how many times the server is
32 started or shut down, the ORBD returns the correct object reference
33 to the calling client.
34
35 · The client needs to look up the object reference in the naming
36 service only once, and can keep reusing this reference independent of
37 the changes introduced due to server life cycle.
38
39 To access the ORBD Server Manager, the server must be started using
40 servertool, which is a command-line interface for application
41 programmers to register, unregister, start up, and shut down a
42 persistent server. For more information on the Server Manager, see
43 Server Manager.
44
45 When orbd starts, it also starts a naming service. For more information
46 about the naming service. See Start and Stop the Naming Service.
47
49 -ORBInitialPort nameserverport
50 Required. Specifies the port on which the name server should be
51 started. After it is started, orbd listens for incoming requests
52 on this port. On Oracle Solaris software, you must become the
53 root user to start a process on a port below 1024. For this
54 reason, Oracle recommends that you use a port number above or
55 equal to 1024.
56
57 NONREQUIRED OPTIONS
58 -port port
59 Specifies the activation port where ORBD should be started, and
60 where ORBD will be accepting requests for persistent objects.
61 The default value for this port is 1049. This port number is
62 added to the port field of the persistent Interoperable Object
63 References (IOR).
64
65 -defaultdb directory
66 Specifies the base where the ORBD persistent storage directory,
67 orb.db, is created. If this option is not specified, then the
68 default value is ./orb.db.
69
70 -serverPollingTime milliseconds
71 Specifies how often ORBD checks for the health of persistent
72 servers registered through servertool. The default value is 1000
73 ms. The value specified for milliseconds must be a valid
74 positive integer.
75
76 -serverStartupDelay milliseconds
77 Specifies how long ORBD waits before sending a location forward
78 exception after a persistent server that is registered through
79 servertool is restarted. The default value is 1000 ms. The value
80 specified for milliseconds must be a valid positive integer.
81
82 -Joption
83 Passes option to the Java Virtual Machine, where option is one
84 of the options described on the reference page for the Java
85 application launcher. For example, -J-Xms48m sets the startup
86 memory to 48 MB. See java(1).
87
88 START AND STOP THE NAMING SERVICE
89 A naming service is a CORBA service that allows CORBA objects to be
90 named by means of binding a name to an object reference. The name
91 binding can be stored in the naming service, and a client can supply
92 the name to obtain the desired object reference.
93
94 Before running a client or a server, you will start ORBD. ORBD includes
95 a persistent naming service and a transient naming service, both of
96 which are an implementation of the COS Naming Service.
97
98 The Persistent Naming Service provides persistence for naming contexts.
99 This means that this information is persistent across service shutdowns
100 and startups, and is recoverable in the event of a service failure. If
101 ORBD is restarted, then the Persistent Naming Service restores the
102 naming context graph, so that the binding of all clients' and servers'
103 names remains intact (persistent).
104
105 For backward compatibility, tnameserv, a Transient Naming Service that
106 shipped with earlier releases of the JDK, is also included in this
107 release of Java SE. A transient naming service retains naming contexts
108 as long as it is running. If there is a service interruption, then the
109 naming context graph is lost.
110
111 The -ORBInitialPort argument is a required command-line argument for
112 orbd, and is used to set the port number on which the naming service
113 runs. The following instructions assume you can use port 1050 for the
114 Java IDL Object Request Broker Daemon. When using Oracle Solaris
115 software, you must become a root user to start a process on a port
116 lower than 1024. For this reason, it is recommended that you use a port
117 number above or equal to 1024. You can substitute a different port when
118 necessary.
119
120 To start orbd from a UNIX command shell, enter:
121
122 orbd -ORBInitialPort 1050&
123
124 From an MS-DOS system prompt (Windows), enter:
125
126 start orbd -ORBInitialPort 1050
127
128 Now that ORBD is running, you can run your server and client
129 applications. When running the client and server applications, they
130 must be made aware of the port number (and machine name, when
131 applicable) where the Naming Service is running. One way to do this is
132 to add the following code to your application:
133
134 Properties props = new Properties();
135 props.put("org.omg.CORBA.ORBInitialPort", "1050");
136 props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
137 ORB orb = ORB.init(args, props);
138
139 In this example, the naming service is running on port 1050 on host
140 MyHost. Another way is to specify the port number and/or machine name
141 when running the server or client application from the command line.
142 For example, you would start your HelloApplication with the following
143 command line:
144
145 java HelloApplication -ORBInitialPort 1050 -ORBInitialHost MyHost
146
147 To stop the naming service, use the relevant operating system command,
148 such as pkillorbd on Oracle Solaris, or Ctrl+C in the DOS window in
149 which orbd is running. Note that names registered with the naming
150 service can disappear when the service is terminated because of a
151 transient naming service. The Java IDL naming service will run until it
152 is explicitly stopped.
153
154 For more information about the naming service included with ORBD, see
155 Naming Service at
156 http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlNaming.html
157
159 To access the ORBD Server Manager and run a persistent server, the
160 server must be started with servertool, which is a command-line
161 interface for application programmers to register, unregister, start
162 up, and shut down a persistent server. When a server is started using
163 servertool, it must be started on the same host and port on which orbd
164 is executing. If the server is run on a different port, then the
165 information stored in the database for local contexts will be invalid
166 and the service will not work properly.
167
168 See Java IDL: The "Hello World" Example at
169 http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlExample.html
170
171 In this example, you run the idlj compiler and javac compiler as shown
172 in the tutorial. To run the ORBD Server Manager, follow these steps for
173 running the application:
174
175 Start orbd.
176
177 UNIX command shell, enter: orbd -ORBInitialPort 1050.
178
179 MS-DOS system prompt (Windows), enter: start orbd -ORBInitialPort 1050.
180
181 Port 1050 is the port on which you want the name server to run. The
182 -ORBInitialPort option is a required command-line argument. When using
183 Oracle Solaris software, you must become a root user to start a process
184 on a port below 1024. For this reason, it is recommended that you use a
185 port number above or equal to 1024.
186
187 Start the servertool: servertool -ORBInitialPort 1050.
188
189 Make sure the name server (orbd) port is the same as in the previous
190 step, for example, -ORBInitialPort 1050. The servertool must be started
191 on the same port as the name server.
192
193 In the servertool command line interface, start the Hello server from
194 the servertool prompt:
195
196 servertool > register -server HelloServer -classpath . -applicationName
197 HelloServerApName
198
199 The servertool registers the server, assigns it the name
200 HelloServerApName, and displays its server ID with a listing of all
201 registered servers.Run the client application from another terminal
202 window or prompt:
203
204 java HelloClient -ORBInitialPort 1050 -ORBInitialHost localhost
205
206 For this example, you can omit -ORBInitialHost localhost because the
207 name server is running on the same host as the Hello client. If the
208 name server is running on a different host, then use the
209 -ORBInitialHost nameserverhost option to specify the host on which the
210 IDL name server is running.Specify the name server (orbd) port as done
211 in the previous step, for example, -ORBInitialPort 1050. When you
212 finish experimenting with the ORBD Server Manager, be sure to shut down
213 or terminate the name server (orbd) and servertool. To shut down orbd
214 from am MS-DOS prompt, select the window that is running the server and
215 enter Ctrl+C to shut it down.
216
217 To shut down orbd from an Oracle Solaris shell, find the process, and
218 terminate with the kill command. The server continues to wait for
219 invocations until it is explicitly stopped. To shut down the
220 servertool, type quit and press the Enter key.
221
223 · servertool(1)
224
225 · Naming Service at
226 http://docs.oracle.com/javase/8/docs/technotes/guides/idl/jidlNaming.html
227
228
229
230JDK 8 21 November 2013 orbd(1)