ORB Initialization

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:

At the time of ORB initialization, the ORB properties are parsed in the following order:

  1. orb.properties file

  2. System properties

  3. Passed properties

  4. Passed arguments

If a property (other that ORBInitRef) is specified more than once, the earlier value is over-ridden by the later value.

ORB Properties

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.

Table 1: The OMG specified ORB properties.
ORB Properties
Description
Default Value
org.omg.CORBA.
ORBClass
The name of the ORB Class. This name is used to created the ORB object instance returned by the static ORB.init(..) methods.
com.sssw.jbroker.ORB
org.omg.CORBA.
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.
com.sssw.jbroker.orb.
SingletonORB
javax.rmi.CORBA.
StubClass
The Class to which the methods of the javax.rmi.CORBA.Stub are delegate to.
com.sssw.jbroker.rmi.
StubDelegate
javax.rmi.CORBA.
UtilClass
The Class to which the methods of the javax.rmi.CORBA.Util are delegated to.
com.sssw.jbroker.rmi.
UtilDelegate
javax.rmi.CORBA.
PortableRemoteObjectClass
The Class to which the methods of the javax.rmi.PortableRemoteObject are delegated to.
com.sssw.jbroker.rmi.
PortableRemoteObjectDelegate
ORBInitRef
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.

<none>
ORBDefaultInitRef
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.
iiopboot://localhost:2506

 
Table 2: Java IDL specific properties.
ORB Property
Description
Default Value
org.omg.CORBA.
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.

localhost
org.omg.CORBA.
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.

2506

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.

 
Table 3: The core ORB properties.
ORB Property
Description
Default value
ORBInitialHost
same as Java IDL property org.omg.CORBA.ORBInitialHost
localhost
ORBInitialPort
same as Java IDL property org.omg.CORBA.ORBInitialPort
2506
ORBHost
Specify the name of the host on which you to listen for connections. This is useful for atleast the following two situations. 
  • On multi-homed hosts, you may want your server to only listen for requests from a particular network interface.

  • Sometime, it is impossible to determine the domain name of a machine using the Java APIs. If you expect to hand out the object references outside of your local domain, it is a good idea to use this property and specify the complete hostname.

Default is to listen on all network interfaces, and to use the hostname returned by the Java APIs.
ORBPort
The port on which to listen for connections. System choosen ephemeral port.
ORBServerAlias
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.
ORBDebug
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.

false
ORBDump
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.
false
ORBUseGateway
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.
false
ORBGatewayURL
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

<none>
ORBThreadPoolMax
The maximum number of threads in the Thread Pool. If this value is less than 0, then no limit is enforced.
-1 (unlimited)
ORBThreadPoolTimeout
The time in seconds after which an idle thread sitting in the Thread pool times out and dies releasing thread related system resources.
300
ORBNamesDBDirectory
The directory under which a user created in-process persistent NameService maintains its state. db/names under the ORB's install directory.
ORBSetContextClassLoader
(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.
true
ORBEnableNoProtection
If an SSL protected object also supports communication using no SSL, then setting this property will enable bypassing of SSL.
false
ORBHttpTunnelURL
The URL of the HTTP Tunnel Servlet. For example - http://chandra/orb/tunnel.
<none>
ORBSendBufferSize
The send buffer size set on client and server sockets. The value is passed down to the Socket.setSendBufferSize() method.
Please refer to the JDK documentation
ORBReceiveBufferSize
The receive buffer size set on client and server sockets. The value is passed down to the Socket.setReceiveBufferSize() method.
Please refer to the JDK documentation
ORBTcpNoDelay
The TCP "no delay" setting on client and server sockets. If set to true, the Socket.setTcpNoDelay() method will be called with true.
false
ORBSocketMax
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.
1
ORBRequestWriter
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.
false

 
Table 4: The Doors Transport ORB properties.
ORB Property
Description
Default Value
ORBUseDoors
This is a boolean property. When set to true, it enables the intra-machine optimization of GIOP messages using Solaris Doors.
false
ORBDoorsThreadPoolMax
The maximum number of threads in the thread pool maintained by the Solaris Doors API.
25


Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.