そこにいるCORBAの専門家全員が、これについて私を助けてくれませんか。
サーバーにメッセージを送信し、応答を待機するコードを含むマルチスレッド アプリケーションがあります。サーバーが応答を送り返していることがわかりますが、アプリケーションはそれを受信していないようです。
私のコードの一部です。
// Create a request object for the given message
msg.request = serverRef->_request("receiveCoreMessageVia");
msg.request->set_return_type (CORBA::_tc_short);
msg.request->add_in_arg() <<= msg.sourceGateway;
msg.request->add_in_arg() <<= msg.octetSeq;
msg.request->send_deferred();
...
// The following code is in a while loop in a different function. It uses the request reference to check the response.
// Check if the request has completed
if (!msg->request->poll_response())
{
clssendlog << debug << "Polling..." << endl;
return false; // No response yet
}
// Get the returned result
clssendlog << debug << "Get response..." << endl;
msg->request->get_response();
clssendlog << debug << "Reading the returned response value" << endl;
CORBA::Short tmp = 0;
msg->request->return_value () >>= tmp;
その結果、サーバーが応答しても Polling と言い続けます。これは基本的な DII 呼び出しであり、私は実際に ACE/TAO 5.7.9 でコードをテストしています。この正確なコードは、omniORB 4.1.4 で完全に機能します。ただし、これを ACE/TAO で動作させたいと思っています。