[omniORB] LOCATION_FORWARDs, LocateRequests
baileyk at schneider.com
baileyk at schneider.com
Mon Dec 22 10:53:40 GMT 2003
Two questions:
1) When omniORB4 is acting as a client, should a reference that has been
forwarded revert to the original IOR when the new one generates a TRANSIENT
request? The language I see in the CORBA spec is this (section 15.6):
A client shall not make any assumptions about the longevity of object
addresses
returned by LOCATION_FORWARD (OBJECT_FORWARD) mechanisms. Once a
connection based on location-forwarding information is closed, a client
can attempt to
reuse the forwarding information it has, but, if that fails, it shall
restart the location
process using the original address specified in the initial object
reference.
I have a server that throws a TRANSIENT explicitly to tell the client to
retry the request. There is a Implementation Repository-like service that
all the IORs the client has originate from, but the client just gives up
right away rather than retry on the original reference. The code in
omniObjRef seems to support the conclusion that TRANSIENT never reverts...
catch(CORBA::COMM_FAILURE& ex) {
if( fwd ) {
RECOVER_FORWARD;
continue;
}
if( !_omni_callCommFailureExceptionHandler(this, retries++, ex) )
OMNIORB_THROW(COMM_FAILURE,ex.minor(),ex.completed());
}
catch(CORBA::TRANSIENT& ex) {
// <---------I don't see a check for fwd here !!!!
if( !_omni_callTransientExceptionHandler(this, retries++, ex) )
OMNIORB_THROW(TRANSIENT,ex.minor(),ex.completed());
}
catch(CORBA::OBJECT_NOT_EXIST& ex) {
if( fwd ) {
RECOVER_FORWARD;
continue;
}
if( !_omni_callSystemExceptionHandler(this, retries++, ex) )
OMNIORB_THROW(OBJECT_NOT_EXIST,ex.minor(),ex.completed());
}
So if the connection doesn't fail, is it in-spec to treat a TRANSIENT from
the forwarded reference as definitive and not retry on the original? My
intuition was that TRANSIENT would be the most likely exception to get a
client ORB to retry a forwarded request. In fact, there are several places
in the CORBA spec that indicate a TRANSIENT exception with standard minor
code 1 indicates a client should resubmit the request (for example when a
POA is in a discarding state, it should throw such an exception). Would
COMM_FAILURE be more likely to get the desired behavior from an unknown
client ORB?
on to the second question
2) Is there a way in omniORB to hook into the handling of LocateRequests
and reply with an OBJECT_FORWARD? My repository has a servant manager that
always throws a ForwardRequest from the preinvoke() method. As I
understand it, when omniORB is a client it always does a LocateRequest by
default. I'm seeing the preinvoke called with the operation name of the
first method invocation done by the client, so I assume the LocateRequest
was replied to with OBJECT_HERE and no calls were done on my servant
manager.
Thanks,
Kendall
More information about the omniORB-list
mailing list