The ORB instance is created using the standard OMG
org.omg.CORBA.ORB.init()
API.
ORB orb = ORB.init(String[] args, Properties props);
You can pass the ORB initialization properties in the following ways:
set the ORB properties in the JDK orb.properties file
When the ORB is initialized, the properties from the
orb.properties
file under the<java.home>/jre/lib
directory are read in. Here,<java.home>
is the string returned by theSystem.getProperty("java.home")
call. Theorb.properties
file is a good place to put machine wide ORB defaults.
set ORB properties in the Java system properties
java -DORBDefaultInitRef=iiopboot://godel myServer
pass command line parameters to ORB init
java myServer -ORBDefaultInitRef iiopboot://godel
Note: This assumes that the arguments to
your server main method are passed to ORB.init()
. Notice that you need
two arguments to specify an ORB property.
pass an explicit property object to ORB.init
Properties props = new Properties(); props.put("ORBDefaultInitRef", "iiopboot://godel"); ORB _orb = orb.init(args, props);
At the time of ORB initialization, the ORB properties are parsed in the following order:
orb.properties
file
System properties
Passed properties
Passed arguments
If a property (other that ORBInitRef
) is specified more than once,
the earlier value is over-ridden by the later value.
The table below summarizes the properties that are understood by the ORB. These include the OMG standard ORB properties, the Java IDL specific properties, the ORB core properties, and platform specific properties.
|
|
|
ORBClass |
The name of the ORB Class. This name is used to created the ORB object instance returned by the static ORB.init(..) methods. |
|
ORBSingletonClass |
The name of the Singleton ORB Class. This name is used to create the singleton ORB that is returned by the static ORB.init(void) method. |
SingletonORB |
StubClass |
The Class to which the methods of the javax.rmi.CORBA.Stub are delegate to. |
StubDelegate |
UtilClass |
The Class to which the methods of the javax.rmi.CORBA.Util are delegated to. |
UtilDelegate |
PortableRemoteObjectClass |
The Class to which the methods of the javax.rmi.PortableRemoteObject are delegated to. |
PortableRemoteObjectDelegate |
|
Allows specification of an arbitrary object reference for an initial
service. For format is:
-ORBInitRef <ObjectId>=<ObjectURL> The ORB supports several URL formats including iioploc, iiopname, iiopboot, file, http, and ftp. Multiple initial references can be specified by specifying ORBInitRef multiple times on the command line. |
|
|
This ORB property assists inresolution of initial references not explicitly
specified with ORBInitRef. It requires a URL that, after appending
a slash '/' character
and a stringified object key, forms a new URL to identify an initial object reference. |
|
|
|
|
ORBInitialHost |
The host name of the Initialization Agent from which to obtain the
intial service references like the "NameService" using the IIOP Bootstrap
protocol.
Note: This property is only supported for compatability with Java IDL. You should really use ORB specific ORBDefaultInitRef property instead with the iiopboot style URL. |
|
ORBInitialPort |
The port of the Initialization Agent from which to obtain the intial
service references like the "NameService" using the IIOP Bootstrap protocol.
Note: This property is only supported for compatability with Java IDL. You should really use ORB specific ORBDefaultInitRef property instead with the iiopboot style URL. |
Note: This is different than the default value of 900 used by Java IDL as the Initialization agent in the ORB runs inside the ORB Daemon on the default port of 2506. |
|
|
|
|
same as Java IDL property org.omg.CORBA.ORBInitialHost |
|
|
same as Java IDL property org.omg.CORBA.ORBInitialPort |
|
|
Specify the name of the host on which you to listen for connections.
This is useful for atleast the following two situations.
|
Default is to listen on all network interfaces, and to use the hostname returned by the Java APIs. |
|
The port on which to listen for connections. | System choosen ephemeral port. |
|
The alias of a registered Server. It is only necessary to specify this property for server with persistent servers that are manually started. | There is no default. If you manually start your server without this property, persistent object support in that server is disabled. |
|
This is a boolean property. If true, on the server side, any CORBA
System exceptions or any other unexpected Java exceptions on the server
side are printed out to System.err before they are marshalled back to the
client and may loose certain debugging information.
On the client side, if using RMI-IIOP, a CORBA exception is printed out before it is converted to an RMI exception. |
|
|
This is a boolean property. If true, the client and server side will print detailed IIOP information about requests going out from a process and responses coming back to a process. |
|
|
This is a boolean property. The property should only be used for client programs. It tells the ORB to locate an IIOP Connection Concentrator and then use it to communicate with others. |
|
|
This iiop URL specifies the host and port where the gateway is running.
For example iiop://godel:7777 tells the ORB to use the gateway
running at host godel and port 7777 to communicate with
others.
Multiple addresses can be specified in the URL. The ORB will use the first gateway that can be contacted. For example iiop://godel:7777,turing:7777 |
|
|
The maximum number of threads in the Thread Pool. If this value is less than 0, then no limit is enforced. |
|
|
The time in seconds after which an idle thread sitting in the Thread pool times out and dies releasing thread related system resources. |
|
|
The directory under which a user created in-process persistent NameService maintains its state. | db/names under the ORB's install directory. |
(JDK 1.2 only) |
If the property is true, then, before dispatching the request to the servant, the ORB automatically sets the Thread context class loader to the ClassLoader of the servant. After the request, the context class loader is reset to its original value. |
|
|
If an SSL protected object also supports communication using no SSL, then setting this property will enable bypassing of SSL. |
|
|
The URL of the HTTP Tunnel Servlet. For example - http://chandra/orb/tunnel. |
|
|
The send buffer size set on client and server sockets. The value is passed down to the
Socket.setSendBufferSize() method. |
|
|
The receive buffer size set on client and server sockets. The value is passed down to the
Socket.setReceiveBufferSize() method. |
|
|
The TCP "no delay" setting on client and server sockets. If set to true, the
Socket.setTcpNoDelay() method will be called with true. |
|
|
The maximum number of sockets to use between a client and server process. If a client process has a large number of threads executing concurrently against objects in the same server, increasing this value may improve performance. |
|
|
Whether to use a separate thread writing client requests. By default, the client thread doing the invocation will write the request to the socket. Setting this property to true may reduce context switches in client applications with many threads. |
|
|
|
|
|
This is a boolean property. When set to true, it enables the intra-machine optimization of GIOP messages using Solaris Doors. |
|
|
The maximum number of threads in the thread pool maintained by the Solaris Doors API. |
|
Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.