Configurations and starting IIOP
To better understand this section, examine the sample SstPingPongIiop.
The GIOP marshaler is configured by an SstGiopMarshalerConfiguration. There are a number of configuration options:
alwaysCheckLocation
In certain circumstances it is expensive to resend large requests and better to send GIOP locate messages before actually sending their request. Setting this option to true enables this behavior in SST. It should be noted that between the receipt of the locate reply and the actual sending of the real request the target may move, requiring you to resend the request.
defaultBufferSize
Sets the amount of space pre-allocated by the marshaler. You use this option to optimize memory management.
endianOutput
Controls the endianness of the GIOP marshaler's output. By default, the GIOP marshaler's configuration uses the endianness of the host platform. It can be set to big or little endian (SstBigEndian or SstLittleEndian). This option is required as some commercial ORBs use only big or little endian.
trapException
Traps marshaling exceptions and converts them into CORBA system exceptions when set to true. When set to false, the underlying exception handles the error. This usually results in a walkback in a debugger and can be useful while debugging.
When setting up a local space for use with IIOP, the space configuration must use SstGiopRemoteReference for its remoteReferenceClass setting. You can use the instance method giopProxyConfiguration in SstSpaceConfiguration to create and return a suitable space configuration.
Additionally, you can use the iiopConfiguration method in SstInvocationConfiguration to get a copy of the default configuration settings for IIOP method invocation. You modify the result of this method, rather than build invocation configurations explicitly.
You can modify most of the invocation configuration options. There are, however, two options which must have IIOP-specific settings: marshaler and replyFutureClass. The marshaler option must be set to SstGiopMarshalerConfiguration (for example, SstGiopMarshaler defaultConfiguration) and the replyFutureClass option set to SstGiopReplyFuture. You will rarely need to alter the default settings for IIOP invocation. SST provides a pre-defined invocation configuration scheme called iiop. You can vary the settings for an option in this configuration, but you should always use the SstGiopReplyFuture setting as an SstGiopMarshalerConfiguration.
In certain situations, SST needs a configuration scheme while building references to remote CORBA objects. There are cases in which the system knows very little about the machine hosting the remote object (when there is no existing connection to, or space definition for, the machine). In such cases, SST uses information supplied in the application context. In particular, the IIOP infrastructure needs to know the scheme name to use when building a URL to the remote machine. You can specify the default scheme using the SstApplicationContext protocol shown below. If the value is not set then the default of iiop is used.
iiopInvocationScheme: value
Sets the name of the default invocation scheme to be used when building remote references to CORBA objects within the receiver.
If the default IIOP configuration settings are not appropriate in your environment, you can overwrite them in the scheme registry by storing your own IIOP invocation configuration. Be careful, however, as all users use this default IIOP scheme if they do not specify an iiopInvocationScheme setting for their application context.
See SstPingPongIiop for example configurations.
Last modified date: 04/21/2020