CORBA::ORB_init()
, by an application
using the standard argc/argv tuple passed to the application's
main()
. Most of the options that can be exercised
through
environment variables can also be manipulated through command-line
options. Command-line options override the environment variable
settings if both are enabled.
svc.conf
. The service configurator is opened and
processed by the ORB in CORBA::ORB_init()
. The service
configurator processing is done after all the command-line options
have been parsed.
In addition to being able to define the port where these known services are listening for multicast requests, as above, it is possible to set an environment variable that specifies the IOR of any named service. For example
Environment Variable Description NameServicePort
whichSpecifies which port the Naming Service is listening on for multicast requests. TradingServicePort
whichSpecifies which port the Trading Service is listening on for multicast requests. ImplRepoServicePort
whichSpecifies which port the Implementation Repository is listening on for multicast requests.
NameServiceIOR=<which>,TradingServiceIOR=<which>,
ImplRepoServiceIOR=<which>, MyServiceIOR=<which>
. This
will have a similar effect to defining an -ORBInitRef value on the
command line (see below). Any value set as a command line -ORBInitRef
option will override any value set as an environment variable for the
same service name.
% NameService.exe -ORBEndpoint iiop://localhost:12345
% client.exe -ORBInitRef NameService=corbaloc:iiop:localhost:12345/NameService
An explanation of these command-line options appears below.
CORBA::ORB_init()
. ORB
initialization options are commonly passed into the program from the
command-line, using the argc
and argv
parameters available to the main()
function.
Command-line options can be classified into the following groups according to their purposes:
Option Description -ORBSvcConf
config filenameSpecifies the name of the file used to read service configuration directives via the Service Configurator framework. 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 the 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.-ORBSkipServiceConfigOpen
Do not process any svc.conf
files, which has the side-effect of not initializing the ACE Service Configurator framework or registering the SIGHUP signal.
Option Description -ORBDebug
Instructs the ORB to print debugging messages from the service configurator framework. This option does not have a value but is used as a toggle to enable or disable debugging messages. -ORBDebugLevel
levelControl the level of debugging in the ORB. Higher numbers generate more output (try 10). The default value of this option is 0. -ORBVerboseLogging level (0|1|2)
Controls the amount of status data printed on each line of the debug log. Higher numbers generate more output. The default value of this option is 0. -ORBLogFile
LogfilenameCauses all ACE_DEBUG
andACE_ERROR
output to be redirected to the designatedLogfilename
.-ORBObjRefStyle
IOR/URLSpecifies the user-visible style of object references. The IOR
style (default) is the conventional CORBA object reference, whereas theURL
style looks more like a URL.
Option Description -ORBCDRTradeoff
maxsizeControl the strategy to tradeoff between copy vs. no copy marshaling of octet sequences. If an octet sequence is smaller than maxsize
(which defaults toACE_DEFAULT_CDR_MEMORY_TRADEOFF
) -- and the current message block contains enough space for it -- the octet sequence is copied instead of appended to the CDR stream.-ORBMaxMessageSize
maxsizeSet maximum size of outgoing GIOP request/reply. The request or reply being sent will be fragmented, if necessary. -ORBCollocation
global/per-orb/noSpecifies the use of collocation object optimization. If global
is specified (default), objects in the same process will be treated as collocated. Ifper-orb
is specified, only objects in the same ORB are treated as collocated. When no is specified, no objects are treated as collocated.-ORBCollocationStrategy
thru_poa/directSpecifies what type of collocated object to use. If the thru_poa
(default) strategy is used, TAO uses the collocation object implementation that respects POA's current state and policies. When using thedirect
strategy, method invocations on collocated objects become direct calls to servant without checking POA's status, which can increase performance. If you use thedirect
strategy, your interfaces must be compiled with the-Gd
IDL compiler option.-ORBAMICollocation
1|0Specifies what happens when making collocated AMI invocations. When 1 (default) an AMI call will be done on a collocated servant and the client thread will be used to invoke the servant, when 0 the collocated call will be converted to a remote call so that a different thread could be used to execute the servant. -ORBNodelay
boolean (0|1)Enable or disable the TCP_NODELAY
option (Nagle's algorithm). By default,TCP_NODELAY
is enabled.-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.-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 defined in orbconf.h
.-ORBNegotiateCodesets
boolean (0|1)If 0 then the ORB does not include the codeset negotiation subsystem, TAO_Codeset. This yields a somewhat smaller runtime footprint as well as a smaller IOR. However this also removes the ability to interoperate with ORBs on systems using alternative character or wide charater encodings. The default value may be set at compile time by defining TAO_NEGOTIATE_CODESETS 0
inorbconf.h
. Codeset negotiation support is enabled by default in TAO as shipped.
Note to static lib users In order to build TAO statically and get the codeset negotiation feature, two additional steps are needed to ensure the TAO_Codeset library is linked in and initalized. Add the MPC feature "negotiate_codesets=1" to the default.features file and regenerate your makefiles, and add#include "tao/Codeset/Codeset.h"
somewhere in your application source, such as the cpp file containing your main.-ORBSingleReadOptimization
boolean (0|1)This option controls whether TAO's ``single read optimization'' is used when receiving requests. If this option is disabled ( 0
), the ORB will do two reads to read a request: one reads the request header and the other reads the request payload. If this option is enabled (1
), the ORB will do a read of sizeTAO_MAXBUFSIZE
, hoping to read the entire request. If more than one request is read they will be queued up for processing later.This option defaults to
1
because it can provide better performance. In the case of Real-time CORBA, however, this option should be set to0
. Consider the following scenario: (1) two requests are read from one socket, (2) the additional request is queued, and (3) the ORB uses its Reactor's notification mechanism to wake up the follower threads. If at the same time, however, new requests arrive on others sockets of higher priority the lower priority queued message will be processed before the newly arrived higher priority request since Reactor notifications are given preferences over normal I/O, thereby causing priority inversion.-ORBDisableRTCollocation
boolean (0|1)This option controls whether the application wants to use or discard RT collocation decisions made by the RT ORB. A value of 1
(true) disables RT collocation decisions and falls back on the default collocation decisions implemented in the default ORB, which is useful for applications using the RT ORB and doesn't want to use the RT collocation decisions but fallback on the default decisions for better performance. The default value is0
(false).-ORBUseLocalMemoryPool
boolean (0|1)TAO can use a local memory pool to satisfy some of its needs for heap storage, as it is often more efficient than using the platform's default memory allocator. The local pool will always grow as large as necessary to satisfy memory allocations, but it will never shrink. This means that sometimes a process can retain memory that it no longer needs. If the default allocator is used then TAO gives memory back as soon as it is not needed which allows for better resource sharing at the expense of memory deallocation time. If this option is disabled (
0
), the ORB will use the default allocator for the platform.If this option is enabled (
1
), the orb will use the local memory pool.This option defaults to the compile-time option specified by
TAO_USES_LOCAL_MEMORY_POOL
.
Option Description -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 the 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 based on the standardcorbaloc
mechanism in the CORBA Interoperable Naming Service.-ORBDottedDecimalAddresses
boolean (0|1)Use the dotted decimal notation for addresses. This option can be used to workaround broken DNS implementations and may also reduce the time spent resolving IP addresses. This option is enabled ( 1
) by default on Windows since DNS is often misconfigured there. On other platforms this option is disabled (0
) since domain names are more flexible address notations for IORs.-ORBNoServerSideNameLookups
boolean (0|1)Setting this to 1 will prevent the ORB from looking up the peer's hostname when accepting an incoming connection from a client when the above value ( ORBDottedDecimalAddresses
) is0
. This option is disabled (0
) by default.-ORBEndpoint
endpointThis option is same as the -ORBListenEndPoints
option described below. This option will be deprecated in later versions on TAO since the CORBA specification now defines the-ORBListenEndpoints
option instead.-ORBPreferredInterfaces
"targetNetwork:localNetwork,.."This option allows clients running on a multihomed host to pick a local network/interface to communicate with a remote target. When TAO attempts to establish a connection with a host matching targetNetwork, then it will use the local ip address matching localNetwork. Simple wildcards can be used for both parameters, and multiple preferred interfaces can be specified using comma separators. For example, for a machine with two network cards identified by the ip addresses 192.168.1.10 and 192.168.1.20, you can use -ORBPreferredInterfaces *=*10,*=*20. Or to force all communication on the loopback address to try to first use the loopback address, use -ORBPreferredInterfaces 127.0.0.1=127* . targetNetwork can use any string, and must typically match with the value read from an IOR. localNetwork must use a dotted decimal address, because it will be matched with the local ip interfaces. -ORBEnforcePreferredInterfaces
boolean (0|1)If this option is set to 1
(true), then TAO will only try to use the interfaces specified by the-ORBPreferredInterfaces
option. The default is0
(false), in which case if a connection cannot be made using a preferred interface, TAO will attempt to use the default interface (INADDR_ANY
). Note: If none of the preferred interfaces apply to an outgoing connection then they will not be enforced. For this option to have any effect, therefore, the connection through a legal preferred interface must fail.-ORBKeepalive
boolean (0|1)This option allows users to specify that the SO_KEEPALIVE option is set on TCP sockets used by IIOP. The default is 0
(false).-ORBDontRoute
boolean (0|1)This option allows users to specify that the SO_DONTROUTE option is set on TCP sockets used by IIOP. The default is 0
(false).-ORBLingerTimeout
timeoutThis option allows users to set the linger timeout on a TCP socket before closing it. Hence, this option is only useful when using IIOP. The timeout
value can be in the range of zero to the maximum signed integer value for the particular platform on which TAO is running.-ORBListenEndpoints
endpointThis option was introduced with the CORBA Object Reference Template (ORT) specification. It instructs a server ORB to listen for requests on the interface specified by endpoint
. When used with Real-time CORBA, the option specifies the endpoints that the default thread pool listens to. TAO 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 protocol versions for each address. An example of an IIOP endpoint is:Sets of endpoints may be specified using multipleiiop://hostname:port
-ORBListenEndpoints
options or by delimiting endpoints with a semi-colon (;). For example,is equivalent to:-ORBListenEndpoints iiop://localhost:9999 -ORBListenEndpoints uiop:///tmp/mylocalsock -ORBListenEndpoints 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.-ORBListenEndpoints '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.-ORBListenEndpoints uiop:// -ORBListenEndpoints shmiop://
Click here for much more on how to specify endpoints.
-ORBLaneEndpoint
endpointThis option is same as the -ORBLaneListenEndPoints
option described below. This option will be deprecated in later versions on TAO.-ORBLaneListenEndpoints
thread-pool-id:thread-lane-id endpointThis option allows the user to specify endpoints for thread pools and lanes. This option is only meaningful when used with Real-time CORBA and only makes sense when the thread pools and lanes are created in the same order across server incarnations. See -ORBListenEndPoints
option on how to specify endpoints. An example is:where2:3 iiop://localhost:2345
2
specifies the second thread pool created by the process and3
specifies the third lane of that thread pool. Note that0
should be used for the lane when specifying endpoints for thread pools without lanes.Sets of endpoints may be specified using multiple
-ORBLaneListenEndpoints
options or by delimiting endpoints with a semi-colon (;). For example,is equivalent to:-ORBLaneListenEndpoints 1:4 iiop://localhost:9999 -ORBLaneListenEndpoints 1:4 uiop:///tmp/mylocalsock -ORBLaneListenEndpoints 1:4 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.-ORBLaneListenEndpoints 1:4 '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.-ORBLaneListenEndpoints 2:3 uiop:// -ORBLaneListenEndpoints 2:3 shmiop://
-ORBImplRepoServicePort
portspecSpecifies which port the Implementation Repository is listening on for multicast requests. By default, the TAO_DEFAULT_IMPLREPO_SERVER_REQUEST_PORT
(10018) is used.-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
(includinguioploc
) orfile
.corbaloc
is a multiple end-point IOR understood byORB::string_to_object()
and used as a boot-strapping mechanism by theORB::resolve_initial_references()
. The mappings specified through this argument override the ORB install-time defaults. Thefile://pathname
interprets the contents of thepathname
file as an object reference in any of the above formats.-ORBMulticastDiscoveryEndpoint
endpointSpecifies the endpoint
that should be used for locating the Naming Service through multicast. endpoint is of the formip-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 beingINADDR_ANY
.-ORBNameServicePort
portspecSpecifies which port the Naming Service is listening on for multicast requests. By default, the TAO_DEFAULT_NAME_SERVICE_REQUEST_PORT
(10013) value is used.-ORBTradingServicePort
portspecSpecifies to which port the Trading Service is listening on for multicast requests. By default, the TAO_DEFAULT_TRADING_SERVICE_REQUEST_PORT
(10016) value is used.-ORBUseIMR
boolean (0|1)This argument specifies that for POAs with the PERSISTENT
policy, that the TAO Implementation Repository should be used for notification of startup and shutdown and object references should be changed to use the Implementation Repository also (N.B. although see-ORBIMREndpointsInIOR
below).-ORBIMREndpointsInIOR
boolean (0|1)This argument specifies whether, for POAs with the PERSISTENT
policy, the TAO Implementation Repository listen endpoints should be encoded into IORs when-ORBUseIMR
is set. The default is true.-ORBUseParallelConnects
boolean (0|1)This option allows users to specify the ORB attempt to connect simultaniously to all endpoints listed in profiles, rather than stepping through individual endpoints, trying and possibly failing, before moving on to the next. For this feature to work, the server must be using shared profiles. The default is 0
(false).-ORBUseSharedProfile
boolean (0|1)This option allows multiple implicit or explicit endpoints to be combined into a single profile for a given protocol rather than using multiple profiles. For IIOP in non RTCORBA environments, the CORBA specified tagged component TAG_ALTERNATE_IIOP_ADDRESS
is used to encode the combined endpoints. Processses using RTCORBA and priority banded connections will continue to generate Profiles withTAO_TAG_IIOP_ENDPOINT
components. This options is disabled by default.-ORBParallelConnectDelay
unsigned long msecWhen using parallel connection attempts, this option defines the number of milliseconds to delay when polling previously started connection attempts. If a server is likely to be busy, this client side option will help avoid creating redundant connections that must be accepted, only to be closed a moment later. However, if the first reachable endpoint is far down the list, this option will increase the delay before that endpoint is reached. The default is 0
.-ORBPreferIPV6Interfaces
boolean (0|1)If option is 1
(true) it directs the default endpoint selector for client connections to first attempt to connect any IIOP endpoints from a provided IOR specifying IPv6 interfaces. Only when none of these can be found or sucessfully connected IPv4 interfaces will be tried. The default is0
(false).This option is only available for IPv6 enabled builds of TAO (
ACE_HAS_IPV6
).-ORBConnectIPV6Only
boolean (0|1)If this option is 1
(true) it directs a server ORB to:
allow only IPv6 interfaces as listening endpoints encode only IPv6 interfaces in the IOR profile prevent (depending on availability of IPV6_V6ONLY socket option) or block IPv6 to IPv4 connections This option directs the default endpoint selector for client connections to only attempt to connect any IIOP endpoints from a provided IOR specifying IPv6 interfaces. Any available IPv4 interfaces will be ignored. The default setting is
0
(false).This option is only available for IPv6 enabled builds of TAO (ACE_HAS_IPV6).
-ORBUseIPV6LinkLocal
boolean (0|1)If this option is 1
(true) it directs a server ORB to allow connections on IPv6 link local addresses. The default setting is0
(false).This option is only available for IPv6 enabled builds of TAO (ACE_HAS_IPV6).
Option Description -ORBId
orb_nameThis option allows the name of an ORB to be set to orb_name
. TheORBId
will be passed to theCORBA::ORB_init()
method to differentiate coexisting ORBs (when there is more than one ORB).-ORBServerId
server_idThis option allows setting a name/id to a server to uniquely identify a server to TAO's Implementation Repository. -ORBDaemon
Specifies that the ORB should daemonize itself, i.e., run as a background process. This option is only meaningful on OS platforms that support daemonization.
svc.conf
with options that configure appropriate strategies in to the ORB. The
options enable developers to control the behavior of the factories,
strategies, and resources that the ORB uses. By default, TAO provides
the following set of factories:
svc.conf
file can represent
either the components provided by TAO (including the
Resource_Factory
, and the
Server_Strategy_Factory
and
Client_Strategy_Factory
) or customized components
developed by the users. The service configurator file
(svc.conf
) provided by the user identifies the components
to be loaded with the required strategies for each component.
A svc.conf
file is not required to
run
TAO applications since TAO provides a set of default values for
strategies useful for the most common use cases, i.e., the
default values are set for all options. When a TAO application calls
CORBA::ORB_init()
it will try to find the
svc.conf
file. If found, TAO will parse and process the
directives in the file; if not found, the default value for the
default components will be used.
Resource_Factory
and
Advanced_Resource_Factory
. TAO provides defaults of these
factories, as well as the specialized resource factories described
below:
Resource Factory Description Resource Factory
Unless configured otherwise, this is the default resource factory used by the ORB.The resource factory is responsible for creating and providing access to various resources used by the server and client ORBs. The resources managed by this factory include creation of acceptor and connector registries, choice of data flushing strategy, limits for connection resource management, types of CDR buffers used for marshalling and demarshalling data, and different IOR parsers. Advanced Resource Factory
This factory provides more advanced configuration options in the addition to all the features of the default resource factory.
The advanced resource factory gives more control than the default resource factory over the type of resources used and how those resources are accessed. In addition to the options provided by the default resource factory, the advanced resource factory provides options that allow selecting different reactors, choosing different transport mechanisms and selecting the right connection purging strategy to maintain limits on resources used. The advanced resource factory was created to allow more advanced options while keeping the footprint of the default resource factory small.
The advanced resource factory inherits from the default resource factory and accepts all of its options in addition to its own.Qt Resource Factory
This is a specialized resource factory providing the means for integrating with the Qt GUI toolkit from Trolltech. Xt Resource Factory
This is a specialized resource factory providing the means for integrating with the X Window System's Xt Intrinsics toolkit.
svc.conf
file (all in one line)
static
Resource_Factory "[list of options]"
will load the default resource factory with the options listed within the double quotes. The following table shows the list of possible options that can be specified within the double quotes in the above directive. There is an example of how this is used in TAO.
Option Description -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 special 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.-ORBConnectionPurgingStrategy
typeOpened connections are added to the transport cache so they can be reused. If a process continues to run and these connections are not reused, however, the cache will continue to grow. Before each new connection, therefore, 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 arelru
,lfu
,fifo
, andnull
. The default islru
(least recently used). The other options arelfu
(least frequently used),fifo
(first in first out), andnull
(no connections are purged) and 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 option is more useful for transports using a muxed connection strategy and want control over 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. -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.-ORBCorbaObjectLock
locktypeSpecify the type of lock to be used by CORBA::Object. The lock is needed within the CORBA object to synchronize the state when the same object is shared by multiple threads. 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. Thenull
lock option is useful when there is only one thread in the system. This option can be used to minimize the amount of memory consumed by the locks in applications where locks are not needed. The memory growth problem gets particularly exacerbated for applications dealing with hundreds and thousands of objects.-ORBObjectKeyTableLock
locktypeSpecify the type of lock to be used by the ObjectKey table. ObjectKey table keeps track of the ObjectKeys that are generated and made available through IORs. The table manages the life time of the object keys within the ORB through a reference counting mechanism. 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.-ORBDropRepliesDuringShutdown
boolean (0|1)Strategy to make the ORB wait for replies to show up even if the ORB is shutdown. The default is to drop replies. For example, clients comunicating with misbehaved servers will continue to hang if replies don't show up and even if the client ORB is shutdown from another thread. This strategy helps the ORB decide to wait for the replies or drop replies. Some clients may not want to drop replies, and may want all their requests to be processed until ORB::destroy () is called. Setting the value of this option to 0 would help with that. -ORBOutputCDRAllocator
mmap|local_memory_poolWhen the define TAO_USE_OUTPUT_CDR_MMAP_MEMORY_POOL
is set to 1 then always the mmap pool will be used.-ORBZeroCopyWrite
Use a zero copy write protocol, which at this moment the only option is sendfile. If your platform does support sendfile but you don't want that TAO uses it you can disable sendfile in TAO by add the define TAO_HAS_SENDFILE 0
to your config.h file.
TAO_Strategies
library. It
accepts the options below as well as those described above in the
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"
#include
if you always use dynamic libraries.
Loading the Advanced_Resource_Factory
disables the
Resource_Factory
. Any directives for the
Resource_Factory
will have no effect (and generate
warnings telling you so). The following table lists the options that
can be provided in double quotes. An example
is available that shows how to specify this option in the svc.conf file.
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)
static Server_Strategy_Factory "[list of
options]"
would load all the options listed within "". An
example
is available
that shows how to specify this option in the svc.conf
file.
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 using 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 using 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 been 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 if -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 using 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 using 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 be0
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
.
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)
static
Client_Strategy_Factory "[list of options]"
would load all
the options listed within "". An example
is available that shows how to specify this option in the svc.conf
file.
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 is null, 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 | RW / MT_NOUPCALL
-ORBWaitStrategy
MT / ST / RW / MT_NOUPCALLPlease note that these two options are synonymous and can be used interchangeably. ST 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 using the Leader/Followers pattern. 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 Asynchronous Method Invocation (AMI) calls and when using BiDIR GIOP. Therefore, this strategy is appropriate only for "pure" synchronous clients. Note that applications that require nested upcalls are not "pure" synchronous clients. Also note that this strategy will only affect 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.
MT_NOUPCALL
(EXPERIMENTAL!) means use a client connection handler that participates in the leader-follower model like MT, but, like RW, does not allow handling of nested upcalls within the waiting thread. Note that with this strategy it is possible to "run out of threads" in a thread pool, and that TAO doesn't grow thread pools. Unlike RW, this does not require -ORBTransportMuxStrategy EXCLUSIVE.Default for this option is MT.
-ORBConnectionHandlerCleanup
0 | 1
Setting this option to 1 lets the ORB know that connection handlers setup for sending messages need to be cleaned up when errors occur. This option has an effect only for -ORBClientConnectionHandler RW . Rest of the options for -ORBCleintConnectionHandler have been automatically set up for cleaning the connection handlers. Setting the option to 1 has a side effect of registering and unregistering the connection handlers with the Reactor for every invocation, which has a negative impact on performance. Setting the option to 0 prevents this performance impact but leads to problems outlined here and here Default for this option is 0.
-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 AMI, 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. The reactive 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, the blocked strategy as the name implies, blocks the thread until connection is complete. Some of the protocols in TAO (such as SHMIOP and SSLIOP) can only use the blocked strategy.
Back to the TAO component options and tuning documentation.