[omniORB] DII question: Using send_oneway() for twoway ops.
Alex Tingle
alex.tingle at bronermetals.com
Mon Nov 24 12:04:42 GMT 2003
Hello,
I'm looking for a neat way to send non-blocking 'fire and forget' messages to normal twoway CORBA operations, like this one:
interface Hello{
void say();
};
I can use the Dynamic Invokation Interface's Request::send_oneway() to call a normal (twoway) method as oneway.
CORBA::Request_var req =hello->_request("say");
req->send_oneway();
...instead of...
try{
hello->say();
}
catch(...){}
The send_oneway() works, but obviously the server treats the call as 'twoway' and sends a reply that omniORB isn't expecting. omniORB doesn't respond well to getting the unexpected reply messages. It occasionally complains about them and shuts down the connection, which can cause a message to be lost while the connection is reopened. Here's the message (full trace below):
omniORB: To endpoint: giop:tcp:127.0.0.1:47020. Send GIOP 1.0 MessageError because a protocol error has been detected. Connection is closed.
If I turn on 'Lowest Common Denominator' mode by putting 'lcdMode = 1' in the config file, then everything works perfectly. I don't like to do that though, does anyone know of a neater way to achieve the desired effect?
regards,
-Alex
--
Full trace is:
omniORB: inputMessage: from giop:tcp:127.0.0.1:47020 72 bytes
omniORB:
4749 4f50 0100 0106 0000 0000 4749 4f50 GIOP........GIOP
0100 0106 0000 0000 4749 4f50 0100 0106 ........GIOP....
0000 0000 4749 4f50 0100 0106 0000 0000 ....GIOP........
4749 4f50 0100 0106 0000 0000 4749 4f50 GIOP........GIOP
0100 0106 0000 0000 ........
omniORB: Split input data into 5 messages
omniORB: To endpoint: giop:tcp:127.0.0.1:47020. Send GIOP 1.0 MessageError because a protocol error has been detected. Connection is closed.
omniORB: throw giopStream::CommFailure from giopImpl10.cc:889(0,MAYBE,COMM_FAILURE_WaitingForReply)
omniORB: Client connection refcount = 0
omniORB: Client close connection to giop:tcp:127.0.0.1:47020
More information about the omniORB-list
mailing list