5

我使用 ACE TAO 作为 CORBA 实现。我想知道是否有人知道设置最大消息大小和最大连接数的任何选项。

omniORB有两个选项,giopMaxMsgSizemaxGIOPConnectionPerServer

即使 TAO 有ORBMaxMessageSize并且ORBLingerTimeout它会导致我的服务器崩溃。我什至不知道这些是否是正确的选择。

这就是 TAO 调试输出所说的。

TAO (30232|3086943952) ORB_Core: Unable to initialize Codeset Manager
TAO (30232|3086943952) - Completed initializing the process-wide service context
TAO (30232|3086943952) - Default ORB services initialization begins
TAO (30232|3086943952) - Default ORB services initialization completed
TAO (30232|3086943952) - We are the default ORB ...
TAO (30232|3086943952) - Initializing the orb-specific services
TAO (30232|3086943952) - Setting primary connection timeout hook
TAO (30232|3086943952) - Default_Resource_Factory - unable to find codeset manager factory.
TAO (30232|3086943952) - ORB_Core: Codeset Manager not available
TAO (30232|3086943952) - Loaded default protocol <IIOP_Factory>
TAO (30232|3086943952) - Loaded default protocol <UIOP_Factory>
TAO (30232|3086943952) - Loaded default protocol <SHMIOP_Factory>
TAO (30232|3086943952) - Loaded default protocol <DIOP_Factory>
TAO (30232|3086943952) - Created new ORB <>
TAO (30232|3086943952) - Transport_Cache_Manager_T::purge, Cache size after purging is [0]
TAO (30232|3086943952) - IIOP_Connector::begin_connection, to <wnpcls.econz.co.nz:4000> which should block
TAO (30232|3086943952) - Transport_Connector::wait_for_connection_completion, transport [171625212], Connection not complete.
TAO (30232|3086943952) - Transport_Cache_Manager_T::bind_i, Transport[171625212] @ hash:index{-1408233282:0}
TAO (30232|3086943952) - Transport_Cache_Manager_T::bind_i: Success Transport[171625212] @ hash:index{-1408233282:0}. Cache size is [1]
TAO (30232|3086943952) - Transport_Connector::wait_for_connection_completion, going to wait for connection completion on transport[171625212]
TAO (30232|3086943952) - Leader_Follower[171625212]::wait_for_event, (leader) enter reactor event loop
TAO (30232|3086943952) - IIOP_Connection_Handler::open, The local addr is <172.16.1.30:46404>
TAO (30232|3086943952) - IIOP_Connection_Handler::open, IIOP connection to peer <172.16.1.30:4000> on 6
TAO (30232|3086943952) - Leader_Follower[171625212]::wait_for_event, (leader) exit reactor event loop
TAO (30232|3086943952) - Transport_Connector::wait_for_connection_completion, transport [6], wait done result = 1
TAO (30232|3086943952) - IIOP_Connector::make_connection, new connected connection to <wnpcls.econz.co.nz:4000> on Transport[6]
TAO (30232|3086943952) - Transport[6]::register_handler
TAO (30232|3086943952) - Transport_Connector::connect, opening Transport[6] in TAO_CLIENT_ROLE
TAO (30232|3086943952) - Transport_Connector::connect, got an existing connected Transport[6] in role TAO_CLIENT_ROLE
TAO (30232|3086943952) - Muxed_TMS[6]::request_id, <1>
(30232|3086943952) Error in writing request header
TAO (30232|3086943952) - Transport[6]::generate_request_header, error while marshalling the Request header
TAO (30232|3086943952) - Transport[6]::make_idle
TAO (30232|3086943952) - IIOP_Acceptor::open, address==:4011, options=(null)
TAO (30232|3086943952) - Transport_Connector::connect, got an existing connected Transport[6] in role TAO_CLIENT_ROLE
TAO (30232|3086943952) - Muxed_TMS[6]::request_id, <2>
(30232|3086943952) Error in writing request header
TAO (30232|3086943952) - Transport[6]::generate_request_header, error while marshalling the Request header
TAO (30232|3086943952) - Transport[6]::make_idle
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh, purging entry from cache
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, cleaning up complete queue
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, discarded 0 messages, 0 bytes.
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh, removing from the reactor
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh, cancel all timers
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, cleaning up complete queue
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, discarded 0 messages, 0 bytes.
TAO (30232|3086943952) - Connection_Handler[6]::close_connection_eh
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, cleaning up complete queue
TAO (30232|3086943952) - Transport[6]::cleanup_queue_i, discarded 0 messages, 0 bytes.
TAO (30232|3086943952) - Destroying ORB <>

我正在使用的代码如下:

#define SC_MAX_SIZE  (1024*1024*4)
char *corbaARGV[12] = { argv[0] };
int args = 1;

char msize[16];
snprintf(msize, sizeof(msize), "%d", SC_MAX_SIZE);
corbaARGV[args + 0] = "-ORBMaxMessageSize";
corbaARGV[args + 1] = strdup(msize);
args += 2;

int timeout = config().GetInteger("Corba_TimeOuts");
mainlog << notice << "CORBA timeout = " << timeout << " seconds." << endl;
char stimeout[16];
snprintf(stimeout, sizeof(stimeout), "%d", timeout);
corbaARGV[args + 0] = "-ORBLingerTimeout";
corbaARGV[args + 1] = strdup(stimeout);
args += 2;

以上两项均无效。

现在我还在 TAO/tests/Oneway_Timeouts 中遇到了一个使用策略的测试样本。有人可以解释一下 RELATIVE_RT_TIMEOUT_POLICY_TYPE、CONNECTION_TIMEOUT_POLICY_TYPE、BUFFERING_CONSTRAINT_POLICY_TYPE。

我似乎找不到任何关于这些的文档。

4

0 回答 0