ORB_init()
call. The internal structure for
command-line options is the traditional
argc
/argv
vector of strings style
popularized by C/C++ and Unix. By convention,
ORB_init()
will consume any options that it recognizes,
removing them from argv
, whereas unrecognized options
will not be removed.
svc.conf
file. These ORB plug-ins
can be fine-tuned by specifying their options in the
svc.conf
file.
TAO provides several default plug-ins to deploy resource management
strategies, client/server strategies, and communication protocols
that can be further customized via the
svc.conf
file options described in this page. Advanced
users can also develop their own plug-ins to customize TAO.
A svc.conf
file, however, is not required to run TAO
programs since TAO provides a set of built-in strategies configured for
use with common use cases. Many of the default configuratiions for
these built-in strategies can also be customized when TAO is
compiled.
Environment Variable Description NameServiceIOR
whichSpecifies which IOR the Naming Service is listening on. NameServicePort
whichSpecifies which port the Naming Service is listening on for multicast requests. TradingServiceIOR
whichSpecifies which IOR the Trading Service is listening on. TradingServicePort
whichSpecifies which port the Trading Service is listening on for multicast requests. ImplRepoServiceIOR
whichSpecifies the IOR of an Implementation Repository. ImplRepoServicePort
whichSpecifies which port the Implementation Repository is listening on for multicast requests.
The following components can be tuned via the different options mentioned above:
The details of the options are mentioned below.
CORBA::ORB
Typically, the following options are set via command line parameters that are eventually passed to CORBA::ORB_init ().
Note:
-ORBGlobalCollocation
flag has been merged with-ORBCollocation
.
Option Description -ORBSvcConf
config filenameSpecifies the name of the file from which it will read dynamic service configuration directives ala ACE's Service Configurator. By default, a service configurator-based application will look for a file named "svc.conf" in the current directory. -ORBSvcConfDirective
directivestringSpecifies a service configuration directive, which is passed to ACE's Service Configurator. You can pass multiple of these options on the same command-line. -ORBServiceConfigLoggerKey
logger keySet the logger key in the ACE_Service_Config
framework. Equivalent to the-k
option on the ACE service configurator class.-ORBDaemon
Specifies that the ORB should daemonize itself. -ORBDebug
Turns on the output of debugging messages within ACE's Service Configurator componentry. -ORBDebugLevel
levelControl the level of debugging in the ORB. Higher number produce more output (try 10). -ORBEndpoint
endpointTells the ORB to listen for requests on the interface specified by endpoint. Endpoints are specified using a URL style format. An endpoint has the form: whereprotocol://V.v@addr1,...,W.w@addrN
V.v
andW.w
are optional protcol versions for each address. An example of an IIOP endpoint is:Sets of endpoints may be specified using multipleiiop://hostname:port
-ORBEndpoint
options or by delimiting endpoints with a semi-colon (;). For example,is equivalent to:-ORBEndpoint iiop://localhost:9999 -ORBEndpoint uiop:///tmp/mylocalsock -ORBEndpoint shmiop://10002
Notice the single quotes (') in the latter option specification. Single quotes are needed to prevent the shell from interpreting text after the semi-colon as another command to run.-ORBEndpoint 'iiop://localhost:9999;uiop:///tmp/mylocalsock;shmiop://10002'
If an endpoint is specified without an
addr
such as the following:then a default endpoint will be created for the specified protocol.-ORBEndpoint uiop:// -ORBEndpoint shmiop://
This is a server side option.
-ORBObjRefStyle
whichSpecifies the user-visible style of object references. The range of values is IOR
(default), which is the traditional nonsensical object reference, orURL
, which looks more like a URL.-ORBRcvSock
receive buffer sizeSpecify the size of the socket receive buffer as a positive, non-zero integer. If not specified, the ACE_DEFAULT_MAX_SOCKET_BUFSIZ default is used. -ORBSndSock
send buffer sizeSpecify the size of the socket send buffer as a positive, non-zero integer. If not specified, the ACE_DEFAULT_MAX_SOCKET_BUFSIZ default is used. -ORBNodelay
boolean (0|1)Enable or disable the TCP_NODELAY option. By default, TCP_NODELAY is enabled. -ORBNameServicePort
portspecSpecifies which port the Naming Service is listening on for multicast requests. By default, TAO_DEFAULT_NAME_SERVICE_REQUEST_PORT, which is 10013 is used. -ORBTradingServicePort
portspecSpecifies to which port the Trading Service is listening on for multicast requests. By default, TAO_DEFAULT_TRADING_SERVICE_REQUEST_PORT which is 10016 is used. -ORBImplRepoServicePort
portspecSpecifies to which port the Implementation Repository is listening on for multicast requests. By default, TAO_DEFAULT_IMPLREPO_SERVER_REQUEST_PORT which is 10018 is to be used. -ORBMulticastDiscoveryEndpoint
end_pointSpecifies the endpoint that should be used for locating the Naming Service through multicast. end_point is of the form ip-number:port-number (e.g., "tango.cs.wustl.edu:1234" or "128.252.166.57:1234"). If there is no ':' in the end_point it is assumed to be a port number, with the IP address being INADDR_ANY. -ORBCollocation
global/per-orb/noSpecifies the use of collocation object optimization. If global is specified, objects in the same process will be treated as collocated. If per-orb is specified, only objects in the same ORB are treated as collocated. When no is specified, no objects are treated as collocated. Default is global. -ORBCollocationStrategy
thru_poa/directSpecifies what kind of collocated object to use. If the thru_poa strategy is used, TAO uses the collocation object implementation that respects POA's current state and policies. When using the direct strategy, method invocations on collocated objects become direct calls to servant without checking POA's status (which translates to better performance.) Notice that the interfaces that you wish to use direct collocation with must be compiled with -Gd
. Default is thru_poa.-ORBPreconnect
endpointPre-establishes a blocking connection to each listed endpoint. If a connection cannot be established the failed preconnection will be ignored and the next preconnection in the list will be processed. Successful and unsuccessful preconnections will be displayed if a debugging level greater than or equal to one is specified by using the -ORBDebugLevel
option. Listing the same combination multiple times will properly establish multiple connections to that endpoint. The-ORBPreconnect
option uses the same endpoint format as the-ORBEndpoint
option.This is a client-side option.
-ORBPreconnect is deprecated. This option will be removed in the near future. The Real-Time CORBA standard
validate_connection()
method should be used instead.-ORBCDRTradeoff
maxsizeControl the strategy to tradeoff between copy vs. no copy marshalling of octet sequences. If an octet sequence is smaller than maxsize and the current message block contains enough space for it the octet sequence is copied instead of appended to the CDR stream. By default, ACE_DEFAULT_CDR_MEMORY_TRADEOFF is used. -ORBSkipServiceConfigOpen
Do not call the ACE_Service_Config::open
method when initializing the ORB. This option is generally only useful when dynamically loading the ORB.This option is deprecated. It is no longer needed since the Service Configurator is now reentrant and thread-safe.
-ORBDottedDecimalAddresses
boolean (0|1)Use the dotted decimal notation for addresses. This option helps to work around broken DNS implementations and may also reduce the time spent resolving IP addresses. By default domain names are used in IORs. -ORBInitRef
ObjectId=IORAllows specification of an arbitrary object reference for an initial service. The IOR could be in any one of the following formats : OMG IOR, URL, corbaloc (including uioploc) or file. corbaloc is a multiple end-point IOR understood by the string_to_object () method and used as a boot-strapping mechanism by the resolve_initial_references () method. The mappings specified through this argument override the orb-install-time defaults. The file://pathname interprets the contents of the pathname file as an object reference in any of the above formats. -ORBDefaultInitRef
IOR prefixThis argument allows resolution of initial references not explicitly specified with -ORBInitRef. It requires a URL prefix that, after appending a slash '/' ('|' for UIOP pluggable protocol) and a simple object key, forms a new URL to identify an initial object reference. The URL prefix format currently supported is corbaloc. -ORBStdProfileComponents
boolean (0|1)If 0 then the ORB does not generate the OMG standardized profile components, such as the ORB type and code sets. Notice that the presence of this components is optional in GIOP 1.1 The default value is controlled by a compile-time flag (check orbconf.h). -ORBResources
whichThis option is deprecated, since this option has almost negligible effect on the ORB. The right type of resources are selected by the ORB during runtime. For example the memory for the output datapath always defaults to TSS. The inour data path always defaults to stack for small messages and global pool for larger messages. There was no effect with the use of this option. -ORBUseIMR
boolean (0|1)This argument specifies that for POAs with the PERSISTENT policy, that the Implementation Repository should be used for notification of startup and shutdown and Object References should be changed to use the Implementation Repository also. -ORBLogFile
log file nameCauses all ACE_DEBUG and ACE_ERROR output to be redirected to the specified file. -ORBSingleReadOptimization
boolean (0|1)This option controls single read optimzations when reading requests. If this option is off, the ORB will do two reads to read a request. One to read the request header and the other to read the request payload. If this option is on, the ORB will do a read of size TAO_MAXBUFSIZE, hoping to read the entire request. However, in this case, there is a chance of reading more than one request. If any additional requests have been read, they are queued up for processing later. This option defaults to 1 because it can provide better performance since one less read is performed. However, in the case of RT-CORBA, this option should be set to 0. Consider the following scenario: two requests are read from one socket; the additional request is queued; a Reactor notify is dispatch to awake a follower threads; at this time, new requests arrive on others sockets of higher priority; however, since notifies are given preferences over normal I/O, the lower priority queued message will be processed before the newly arrived higher priority request.
-ORBListenEndpoints
endpointThis Option is similar to ORBEndPoint option described above. The ORBEndpoint option would be deprecated in later versions on TAO. This option is introduced with Object Reference Template Specification. -ORBId
ORB_NAMEThis option allows setting the name of an ORB as the Option name suggests. -ORBServerId
server_idThis option allows setting a name/id to a server to uniquely identify a server to the Implementation Repository.
TAO_Default_Resource_Factory
Typically, the following options are set via the service configurator (svc.conf) file. The following line in the svc.conf file (all in one line)would load all the options listed within "".
static Resource_Factory "[list of options]"
Option Description -ORBResources
whichThis option is deprecated, since this option has almost negligible effect on the ORB. The right type of resources are selected by the ORB during runtime. For example the memory for the output datapath always defaults to TSS. The inour data path always defaults to stack for small messages and global pool for larger messages. There was no effect with the use of this option. -ORBReactorMaskSignals
0/1ACE select reactors mask signals during upcalls to the event handlers. This is only useful if the application is going to trap those signals and handle them in any way. Disabling the mask can improve performance by reducing the number of kernel level locks. -ORBProtocolFactory
factorySpecify which pluggable protocol factory to load. By default, only the factory for the IIOP protocol ( IIOP_Factory
is loaded.For example, if some protocol called
Foo
whose factory was calledFoo_Factory
was available, then it could be loaded into TAO by specifying-ORBProtocolFactory Foo_Factory
in the service configurator file. TheFoo
pluggable protocol would then be available for use.-ORBIORParser
parserName an IOR Parser to load. IOR Parsers are used to interpret strings passed to ORB::string_to_object()
. By default the ORB can handle multiple string formats, includingIOR:
,corbaloc:
,corbaname:
, andfile:
. The application developer can add new IOR formats using this option.-ORBConnectionCachingStrategy
typeThis option is deprecated. Use -ORBConnectionPurgingStrategy instead. -ORBConnectionPurgingStrategy
typeOpened connections are added to the transport cache so they can be reused. However, if a process continues to run and these connections are not reused, the cache will continue to grow. Therefore, before each new connection, the cache is checked and purged if it has reached the limit specified by the -ORBConnectionCacheMax option or the system default if that option was not used. The possible values for type are lru, lfu, fifo and null. The default is LRU (Least Recently Used). The others LFU (Least Frequently Used), FIFO (First In First Out), and null (No connections are purged) are contained within the TAO Strategies library. -ORBConnectionCacheMax
limitThe transport cache will grow to a maximum of the specified limit. The default is system dependent, but can be overridden at compile time by defining the preprocessor macro TAO_CONNECTION_CACHE_MAXIMUM. -ORBMuxedConnectionMax
numberThe transport cache allows only specified number of connections-per-QoS property to be added to connection cache. Threads not getting the connections will wait for the connections to be released. This options is more useful for transports using a muxed connection strategy and want control on the number of connections that are created by the active threads. -ORBConnectionCachePurgePercentage
percentIf the transport cache is purged, the specified percentage (20 by default) of the total number of connections cached will be closed. -ORBPurgePercentage
percentThis option is deprecated and will automatically forward to -ORBConnectionCachePurgePercentage. -ORBConnectionCacheLock
locktypeSpecify the type of lock to be used by the Connection Cache. Possible values for lock type are thread
, which specifies that an inter-thread mutex is used to guarantee exclusive access, andnull
, which specifies that no locking be performed. The default is thread.-ORBFlushingStrategy
typeBy default TAO provides three strategies to flush queued messages. The leader_follower
strategy uses the Reactor and non-blocking I/O to send the outgoing messages, this strategy participates in the Leader/Followers protocol to synchronize access to the Reactor. Thereactive
strategy uses the Reactor but does not take part in the Leader/Followers protocol, thus it is better used only in single threaded applications. Finally, theblocking
strategy flushes the queue as soon as it becomes "full", and blocks the thread until all the data is sent.
TAO_Default_Server_Strategy_Factory
Typically, the following options are set via the service configurator (svc.conf) file. The following line in the svc.conf file (all in one line)would load all the options listed within ""
static Server_Strategy_Factory "[list of options]"
Note:
-ORBDemuxStrategy
flag has been changed to-ORBSystemidPolicyDemuxStrategy
and-ORBUseridPolicyDemuxStrategy
.Note:
-ORBTableSize
flag has been changed to-ORBActiveObjectMapSize
.
Option Description -ORBConcurrency
whichSpecify which concurrency strategy to use. Range of values is reactive
for a purely Reactor-driven concurrency strategy orthread-per-connection
for creating a new thread to service each connection. The default is reactive.-ORBThreadPerConnectionTimeout
millisecondsIn many platforms it is impossible to interrupt the server threads created by the thread-per-connection
model. This is because these threads are blocked inread()
operations (and not inselect()
). As a workaround, the server threads periodically poll the ORB to find out if they should shutdown. This option controls the period of the polling, expressed in milliseconds. Applications that do not shutdown, or that can otherwise ensure that no server threads will be running at shutdown (for example if all the clients terminate before the server) can disable the polling using the magic valueINFINITE
.If the option is not provided then the ORB uses the compile time flag
TAO_DEFAULT_THREAD_PER_CONNECTION_TIMEOUT
, this flag also expresses the time in milliseconds (as a string constant) and the magic value"INFINITE"
can be used to disable polling entirely. This yields a slight performance improvement (around 1%).-ORBActiveObjectMapSize
active object map sizeSpecify the size of the active object map. If not specified, the default value is 64. -ORBUseridPolicyDemuxStrategy
user id policy based demultiplexing strategySpecify the demultiplexing lookup strategy to be used with the user id policy. The demultiplexing strategy can be one of dynamic
orlinear
. This option defaults to use thedynamic
strategy.-ORBSystemidPolicyDemuxStrategy
system id policy based demultiplexing strategySpecify the demultiplexing lookup strategy to be used with the system id policy. The demultiplexing strategy can be one of dynamic
,linear
, oractive
. This option defaults to use thedynamic
strategy when-ORBAllowReactivationOfSystemids
is true, and toactive
strategy when-ORBAllowReactivationOfSystemids
is false.-ORBUniqueidPolicyReverseDemuxStrategy
unique id policy based reverse demultiplexing strategySpecify the reverse demultiplexing lookup strategy to be used with the unique id policy. The reverse demultiplexing strategy can be one of dynamic
orlinear
. This option defaults to use thedynamic
strategy.-ORBAllowReactivationOfSystemids
allows reactivation of system idsSpecify whether system ids can be reactivated, i.e., once an id that was generated by the system has be deactivated, will the user reactivate a new servant using the old id. If the user is not going to use this feature, the IORs can be shortened, an extra comparison in the critical upcall path removed, and some memory on the server side can be saved. The ORBAllowReactivationOfSystemids
can be0
or1
. This option defaults to1
.-ORBActiveHintInIds
adds an active hint in idsSpecify whether an active hint should be added to ids. With active hints, ids can be found quickly. However, they lead to larger IORs. Note that this option is disregarded -ORBAllowReactivationOfSystemids
is set to0
. The -ORBActiveHintInIds can be0
or1
. This option defaults to1
.-ORBPoaMapSize
poa map sizeSpecify the size of the poa map. If not specified, the default value is 24. -ORBPersistentidPolicyDemuxStrategy
persistent id policy based demultiplexing strategySpecify the demultiplexing lookup strategy to be used with the persistent id policy. The demultiplexing strategy can be one of dynamic
orlinear
. This option defaults to use thedynamic
strategy.-ORBTransientidPolicyDemuxStrategy
transient id policy based demultiplexing strategySpecify the demultiplexing lookup strategy to be used with the transient id policy. The demultiplexing strategy can be one of dynamic
,linear
, oractive
. This option defaults to use theactive
strategy.-ORBActiveHintInPOANames
adds an active hint in poa namesSpecify whether an active hint should be added to poa names. With active hints, poa names can be found quickly. However, they lead to larger IORs. The -ORBActiveHintInPOANames can be 0
or1
. This option defaults to1
.-ORBThreadFlags
thread flagsSpecify the flags used for thread creation. Flags can be any logical-OR combination of THR_DETACHED
,THR_BOUND
,THR_NEW_LWP
,THE_SUSPENDED
. The default isTHR_BOUND | THR_DETACHED
.-ORBPOALock
lock typeSpecify the type of lock to be used for POA accesses. Possible values for lock type are thread
, which specifies that an inter-thread mutex is used to guarantee exclusive access, andnull
, which specifies that no locking be performed. The default isthread
.
TAO_Default_Client_Strategy_Factory
Typically, the following options are set via the service configurator (svc.conf) file. The following line in the svc.conf file (all in one line)would load all the options listed within "".
static Client_Strategy_Factory "[list of options]"
Option Description -ORBProfileLock
whichSpecify the kind of synchronization primitive for the Profiles. Default is thread
, which means that a regular thread mutex is used. The second option isnull
, which means a null lock is used. This makes sense in case of optimizations and is allowed when no forwarding is used or only a single threaded client.-ORBClientConnectionHandler
MT / ST / RWST means use the single-threaded client connection handler, i.e., the leader follower model will not be used. However, ST does support nested upcalls and handling of new requests while waiting for the reply from a server. MT means use the multi-threaded client connection handler which uses the leader follower model. This model allows the use of multiple threads with a single Reactor.
RW selects a strategy that simply blocks in recv() when waiting for a response from the server instead of waiting in the Reactor. The RW strategy only works when the application does not have to worry about new request showing up when waiting for a response. Further, this strategy cannot be used with AMI calls. Therefore, this strategy is appropriate only for "pure" synchronous clients. Note that applications with nested upcalls are not "pure" synchronous clients. Also note that this strategy will only effect two way calls, since there is no waiting for one way calls. This strategy can also be used in an application that is both a client and a server if the server side is handled by a separate thread and the client threads are "pure" clients.
Default for this option is MT.
-ORBTransportMuxStrategy
EXCLUSIVE / MUXEDEXCLUSIVE means that the Transport does not multiplex requests on a connection. At a time, there can be only one request pending on a connection. MUXED means that Transport multiplexes more than one request at the same time on a connection. This option is often used in conjunction with Asynchronous Method Invocation, because multiple requests can be sent 'in bulk'.
Default for this option is MUXED.
-ORBConnectStrategy
typeTAO provides three strategies to connect to remote servers. The default leader_follower
strategy uses the Reactor and non-blocking connects to connect and this strategy participates in the Leader/Followers protocol to synchronize access to the Reactor. Thereactive
strategy uses the Reactor for non-blocking connects but does not take part in the Leader/Followers protocol, thus it is better used only in single threaded applications. Finally, theblocked
strategy as the name implies, blocks the thread until connection is complete. Some of the protocols in TAO viz. SHMIOP and SSLIOP can only use blocked strategy.
TAO_Advanced_Resource_Factory
This factory is located in the TAO_Strategies library.
It accepts the options below as well as those described above in the
TAO_Default_Resource_Factory
.
This factory can be loaded dynamically using a service configurator
directive of the form (all on one line):
dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBReactorType select_st"
It can also be loaded statically by doing the following:
#include "tao/Strategies/advanced_resource.h"
to the file containing main()
static Advanced_Resource_Factory "-ORBReactorType select_st"
You can omit the #include
if you always use dynamic libraries.
Once you have loaded the Advanced_Resource_Factory, then directives for the Resource_Factory have no effect (and generate warnings telling you so).
Note: -ORBReactorLock
flag has been
superseded by -ORBReactorType
.
RT_ORB_Loader
Typically, the following options are set via the service configurator (svc.conf) file. The following line in the svc.conf file (all in one line)would load all the options listed within "".
static RT_ORB_Loader "[list of options]"
Option Description -ORBSchedPolicy
policySpecify the scheduling policy used for the priority mapping computations and to specify the scheduling policy used when creating RTCORBA threads. Priority mappings map the CORBA priority range (from 0 to 32767) into the native OS priority range, but in some operating systems the range depends on the scheduling policy used. Valid values are SCHED_OTHER, SCHED_FIFO and SCHED_RR. Defaults to SCHED_OTHER. Note that in some operating systems some of the scheduling policies require super user privileges. -ORBScopePolicy
scopeSpecify the scheduling scope used when creating RTCORBA threads. Valid values are: PROCESS and SYSTEM. Defaults to PROCESS. -ORBPriorityMapping
mapping_typeSelect the priority mapping to use. There are three priority mappings provided by TAO: the linear mapping maps between the CORBA range of priorities and the native range of priorities; the direct mapping maps CORBA priorities directly to native priorities; and the continuous maps the first n CORBA priorities to the range of native priorities, where n is the number of native priorities. Defaults to direct. Note that continuous was previously referred to as direct.
Back to the TAO components documentation.