21743
|
1 |
'\" t
|
|
2 |
.\" Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
.\"
|
|
4 |
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
5 |
.\"
|
|
6 |
.\" This code is free software; you can redistribute it and/or modify it
|
|
7 |
.\" under the terms of the GNU General Public License version 2 only, as
|
|
8 |
.\" published by the Free Software Foundation.
|
|
9 |
.\"
|
|
10 |
.\" This code is distributed in the hope that it will be useful, but WITHOUT
|
|
11 |
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
12 |
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
13 |
.\" version 2 for more details (a copy is included in the LICENSE file that
|
|
14 |
.\" accompanied this code).
|
|
15 |
.\"
|
|
16 |
.\" You should have received a copy of the GNU General Public License version
|
|
17 |
.\" 2 along with this work; if not, write to the Free Software Foundation,
|
|
18 |
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
19 |
.\"
|
|
20 |
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
21 |
.\" or visit www.oracle.com if you need additional information or have any
|
|
22 |
.\" questions.
|
|
23 |
.\"
|
|
24 |
.\" Arch: generic
|
|
25 |
.\" Software: JDK 8
|
|
26 |
.\" Date: 21 November 2013
|
|
27 |
.\" SectDesc: Java IDL and RMI-IIOP Tools
|
|
28 |
.\" Title: orbd.1
|
|
29 |
.\"
|
|
30 |
.if n .pl 99999
|
|
31 |
.TH orbd 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
|
|
32 |
.\" -----------------------------------------------------------------
|
|
33 |
.\" * Define some portability stuff
|
|
34 |
.\" -----------------------------------------------------------------
|
|
35 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
36 |
.\" http://bugs.debian.org/507673
|
|
37 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
|
38 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
39 |
.ie \n(.g .ds Aq \(aq
|
|
40 |
.el .ds Aq '
|
|
41 |
.\" -----------------------------------------------------------------
|
|
42 |
.\" * set default formatting
|
|
43 |
.\" -----------------------------------------------------------------
|
|
44 |
.\" disable hyphenation
|
|
45 |
.nh
|
|
46 |
.\" disable justification (adjust text to left margin only)
|
|
47 |
.ad l
|
|
48 |
.\" -----------------------------------------------------------------
|
|
49 |
.\" * MAIN CONTENT STARTS HERE *
|
|
50 |
.\" -----------------------------------------------------------------
|
2
|
51 |
|
21743
|
52 |
.SH NAME
|
|
53 |
orbd \- Enables clients to locate and call persistent objects on servers in the CORBA environment\&.
|
|
54 |
.SH SYNOPSIS
|
|
55 |
.sp
|
|
56 |
.nf
|
2
|
57 |
|
21743
|
58 |
\fBorbd\fR [ \fIoptions\fR ]
|
|
59 |
.fi
|
|
60 |
.sp
|
|
61 |
.TP
|
|
62 |
\fIoptions\fR
|
|
63 |
Command-line options\&. See Options\&.
|
|
64 |
.SH DESCRIPTION
|
|
65 |
The \f3orbd\fR command enables clients to transparently locate and call persistent objects on servers in the CORBA environment\&. The Server Manager included with the orbd tool is used to enable clients to transparently locate and call 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:
|
|
66 |
.TP 0.2i
|
|
67 |
\(bu
|
|
68 |
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 shut down, the ORBD returns the correct object reference to the calling client\&.
|
|
69 |
.TP 0.2i
|
|
70 |
\(bu
|
|
71 |
The client needs to look up the object reference in the naming service only once, and can keep reusing this reference independent of the changes introduced due to server life cycle\&.
|
|
72 |
.PP
|
|
73 |
To access the ORBD Server Manager, the server must be started using \f3servertool\fR, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server\&. For more information on the Server Manager, see Server Manager\&.
|
|
74 |
.PP
|
|
75 |
When \f3orbd\fR starts, it also starts a naming service\&. For more information about the naming service\&. See Start and Stop the Naming Service\&.
|
|
76 |
.SH OPTIONS
|
|
77 |
.TP
|
|
78 |
-ORBInitialPort \fInameserverport\fR
|
|
79 |
.br
|
|
80 |
Required\&. Specifies the port on which the name server should be started\&. After it is started, \f3orbd\fR listens for incoming requests on this port\&. On Oracle Solaris software, you must become the root user to start a process on a port below 1024\&. For this reason, Oracle recommends that you use a port number above or equal to 1024\&.
|
|
81 |
.SS NONREQUIRED\ OPTIONS
|
|
82 |
.TP
|
|
83 |
-port \fIport\fR
|
|
84 |
.br
|
|
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)\&.
|
|
86 |
.TP
|
|
87 |
-defaultdb \fIdirectory\fR
|
|
88 |
.br
|
|
89 |
Specifies the base where the ORBD persistent storage directory, \f3orb\&.db\fR, is created\&. If this option is not specified, then the default value is \f3\&./orb\&.db\fR\&.
|
|
90 |
.TP
|
|
91 |
-serverPollingTime \fImilliseconds\fR
|
|
92 |
.br
|
|
93 |
Specifies how often ORBD checks for the health of persistent servers registered through \f3servertool\fR\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
|
|
94 |
.TP
|
|
95 |
-serverStartupDelay milliseconds
|
|
96 |
.br
|
|
97 |
Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered through \f3servertool\fR is restarted\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
|
|
98 |
.TP
|
|
99 |
-J\fIoption\fR
|
2
|
100 |
.br
|
21743
|
101 |
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
|
|
102 |
.SS START\ AND\ STOP\ THE\ NAMING\ SERVICE
|
|
103 |
A naming service is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference\&. The name binding can be stored in the naming service, and a client can supply the name to obtain the desired object reference\&.
|
|
104 |
.PP
|
|
105 |
Before 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\&.
|
|
106 |
.PP
|
|
107 |
The Persistent Naming Service 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, then the Persistent Naming Service restores the naming context graph, so that the binding of all clients\&' and servers\&' names remains intact (persistent)\&.
|
|
108 |
.PP
|
|
109 |
For backward compatibility, \f3tnameserv\fR, a Transient Naming Service that shipped with earlier releases of the JDK, is also included in this release of Java SE\&. A transient naming service retains naming contexts as long as it is running\&. If there is a service interruption, then the naming context graph is lost\&.
|
|
110 |
.PP
|
|
111 |
The \f3-ORBInitialPort\fR argument is a required command-line argument for \f3orbd\fR, and is used to set the port number on which the naming service runs\&. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon\&. When using Oracle Solaris software, you must become a root user to start a process on a port lower than 1024\&. For this reason, it is recommended that you use a port number above or equal to 1024\&. You can substitute a different port when necessary\&.
|
|
112 |
.PP
|
|
113 |
To start \f3orbd\fR from a UNIX command shell, enter:
|
|
114 |
.sp
|
|
115 |
.nf
|
|
116 |
\f3orbd \-ORBInitialPort 1050&\fP
|
|
117 |
.fi
|
|
118 |
.nf
|
|
119 |
\f3\fP
|
|
120 |
.fi
|
|
121 |
.sp
|
|
122 |
From an MS-DOS system prompt (Windows), enter:
|
|
123 |
.sp
|
|
124 |
.nf
|
|
125 |
\f3start orbd \-ORBInitialPort 1050\fP
|
|
126 |
.fi
|
|
127 |
.nf
|
|
128 |
\f3\fP
|
|
129 |
.fi
|
|
130 |
.sp
|
|
131 |
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, when applicable) where the Naming Service is running\&. One way to do this is to add the following code to your application:
|
|
132 |
.sp
|
|
133 |
.nf
|
|
134 |
\f3Properties props = new Properties();\fP
|
|
135 |
.fi
|
|
136 |
.nf
|
|
137 |
\f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fP
|
|
138 |
.fi
|
|
139 |
.nf
|
|
140 |
\f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialHost", "MyHost");\fP
|
|
141 |
.fi
|
|
142 |
.nf
|
|
143 |
\f3ORB orb = ORB\&.init(args, props);\fP
|
|
144 |
.fi
|
|
145 |
.nf
|
|
146 |
\f3\fP
|
|
147 |
.fi
|
|
148 |
.sp
|
|
149 |
In this example, the naming service is running on port 1050 on host \f3MyHost\fR\&. 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 \f3HelloApplication\fR with the following command line:
|
|
150 |
.sp
|
|
151 |
.nf
|
|
152 |
\f3java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost\fP
|
|
153 |
.fi
|
|
154 |
.nf
|
|
155 |
\f3\fP
|
|
156 |
.fi
|
|
157 |
.sp
|
|
158 |
To stop the naming service, use the relevant operating system command, such as \f3pkill\fR\f3orbd\fR on Oracle Solaris, or \fICtrl+C\fR in the DOS window in which \f3orbd\fR is running\&. Note that names registered with the naming service can disappear when the service is terminated because of a transient naming service\&. The Java IDL naming service will run until it is explicitly stopped\&.
|
|
159 |
.PP
|
|
160 |
For more information about the naming service included with ORBD, see Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
|
|
161 |
.SH SERVER\ MANAGER
|
|
162 |
To access the ORBD Server Manager and run a persistent server, the server must be started with \f3servertool\fR, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server\&. When a server is started using \f3servertool\fR, it must be started on the same host and port on which \f3orbd\fR is executing\&. If the server is run on a different port, then the information stored in the database for local contexts will be invalid and the service will not work properly\&.
|
|
163 |
.PP
|
|
164 |
See Java IDL: The "Hello World" Example at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlExample\&.html
|
|
165 |
.PP
|
|
166 |
In this example, you run the \f3idlj\fR compiler and \f3javac\fR compiler as shown in the tutorial\&. To run the ORBD Server Manager, follow these steps for running the application:
|
|
167 |
.PP
|
|
168 |
Start \f3orbd\fR\&.
|
|
169 |
.PP
|
|
170 |
UNIX command shell, enter: \f3orbd -ORBInitialPort 1050\fR\&.
|
|
171 |
.PP
|
|
172 |
MS-DOS system prompt (Windows), enter: \f3s\fR\f3tart orbd -ORBInitialPort 105\fR\f30\fR\&.
|
|
173 |
.PP
|
|
174 |
Port 1050 is the port on which you want the name server to run\&. The \f3-ORBInitialPort\fR option is a required command-line argument\&. When using Oracle Solaris software, you must become a root user to start a process on a port below 1024\&. For this reason, it is recommended that you use a port number above or equal to 1024\&.
|
|
175 |
.PP
|
|
176 |
Start the \f3servertool\fR: \f3servertool -ORBInitialPort 1050\fR\&.
|
|
177 |
.PP
|
|
178 |
Make sure the name server (\f3orbd\fR) port is the same as in the previous step, for example, \f3-ORBInitialPort 1050\&.\fR The \f3servertool\fR must be started on the same port as the name server\&.
|
|
179 |
.PP
|
|
180 |
In the \f3servertool\fR command line interface, start the \f3Hello\fR server from the \f3servertool\fR prompt:
|
|
181 |
.sp
|
|
182 |
.nf
|
|
183 |
\f3servertool > register \-server HelloServer \-classpath \&. \-applicationName\fP
|
|
184 |
.fi
|
|
185 |
.nf
|
|
186 |
\f3 HelloServerApName\fP
|
|
187 |
.fi
|
|
188 |
.nf
|
|
189 |
\f3\fP
|
|
190 |
.fi
|
|
191 |
.sp
|
|
192 |
The \f3servertool\fR registers the server, assigns it the name \f3HelloServerApName\fR, and displays its server ID with a listing of all registered servers\&.Run the client application from another terminal window or prompt:
|
|
193 |
.sp
|
|
194 |
.nf
|
|
195 |
\f3java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost\fP
|
|
196 |
.fi
|
|
197 |
.nf
|
|
198 |
\f3\fP
|
|
199 |
.fi
|
|
200 |
.sp
|
|
201 |
For this example, you can omit \f3-ORBInitialHost localhost\fR because the name server is running on the same host as the \f3Hello\fR client\&. If the name server is running on a different host, then use the -\f3ORBInitialHost nameserverhost\fR option to specify the host on which the IDL name server is running\&.Specify the name server (\f3orbd\fR) port as done in the previous step, for example, \f3-ORBInitialPort 1050\fR\&. When you finish experimenting with the ORBD Server Manager, be sure to shut down or terminate the name server (\f3orbd\fR) and \f3servertool\fR\&. To shut down \f3orbd\fR from am MS-DOS prompt, select the window that is running the server and enter \fICtrl+C\fR to shut it down\&.
|
|
202 |
.PP
|
|
203 |
To shut down \f3orbd\fR from an Oracle Solaris shell, find the process, and terminate with the \f3kill\fR command\&. The server continues to wait for invocations until it is explicitly stopped\&. To shut down the \f3servertool\fR, type \fIquit\fR and press the \fIEnter\fR key\&.
|
|
204 |
.SH SEE\ ALSO
|
|
205 |
.TP 0.2i
|
|
206 |
\(bu
|
|
207 |
servertool(1)
|
|
208 |
.TP 0.2i
|
|
209 |
\(bu
|
|
210 |
Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
|
|
211 |
.RE
|
|
212 |
.br
|
|
213 |
'pl 8.5i
|
|
214 |
'bp
|