Hi Ricardo, this is indeed interesting question. I would be inclined to reply with 'yes, MICO should retry the request but for this I would rather consult specification and I hope to get to this in a week or so (I'm on holidays now).
Anyway, I do have few comments below with regarding to your patch code. On 07/20/10 03:13, Ricardo Cosme wrote: > Hi, > > When I raise a ForwardRequest exception in a receive_exception point, which > receives > a COMM_FAILURE exception, the orb doesn't retry the request. This > ForwardRequest > exception reaches my main(). But, when I make this test on the server-side, > Mico retry > the request. > > I believe that Mico should retry the request on the client-side. Am I right ? > > However, I wrote a patch for Mico 2.3.13: > > --- static.cc 2010-07-19 16:54:10.000000000 -0300 > +++ static.cc.JUL2010 2010-07-19 16:52:59.000000000 -0300 > @@ -2252,6 +2252,7 @@ > break; > > case CORBA::InvokeSysEx: > + try { > // receive_exception (system exception) > PInterceptor::PI::_receive_exception_ip > (_cri, PortableInterceptor::SYSTEM_EXCEPTION, > @@ -2292,6 +2293,22 @@ > break; > } > } > + } catch(PortableInterceptor::ForwardRequest_catch& exc) { > + _obj->_forward(exc->forward); > + env()->clear(); > + CORBA::release(_cri); > + if (_id != NULL) > + delete _id; > + _id = orb->new_orbid(); > + _cri = PInterceptor::PI::_create_cri(_obj, _opname); > + PInterceptor::PI::_send_request_ip > + (_cri, CORBA::ORB::get_msgid(_id), _args, this->ctx_list(), > + this->ctx(), this->context()); > + _id = orb->invoke_async (_obj, this, Principal::_nil(), > + TRUE, 0, _id); > + done = TRUE; > + break; > + } > done = TRUE; > break; > > @@ -2489,6 +2506,7 @@ > break; > > case CORBA::InvokeSysEx: > + try{ > PInterceptor::PI::_receive_exception_ip > (_cri, PortableInterceptor::SYSTEM_EXCEPTION, > this->exception(), this->ctx_list(), > @@ -2532,6 +2550,20 @@ > break; > } > } > + } catch(PortableInterceptor::ForwardRequest_catch& exc) { > + _obj->_forward(exc->forward); > + env()->clear(); > + CORBA::release(_cri); > + if (_id != NULL) > + delete _id; > + _id = orb->new_orbid(); > + _cri = PInterceptor::PI::_create_cri(_obj, _opname); > + PInterceptor::PI::_send_request_ip > + (_cri, CORBA::ORB::get_msgid(_id), _args, this->ctx_list(), > + this->ctx(), this->context()); > + _id = orb->invoke_async (_obj, this, Principal::_nil(), > + TRUE, 0, _id); > + } > done = TRUE; > break; > > Here you have fixed that for SII. Are you also going to fix this for DII? i.e. dii.cc file? This would be really good (and appreciated) to keep consistent behavior between SII and DII. > > > > > > --- pi_impl.cc 2010-07-19 16:54:58.000000000 -0300 > +++ pi_impl.cc.JUL2010 2010-07-19 16:52:49.000000000 -0300 > @@ -2137,15 +2137,15 @@ > PInterceptor::PI::_exec_receive_exception(ri); > throw; > } catch (PortableInterceptor::ForwardRequest_catch& ex) { > - ClientRequestInfo_impl* ri_impl > - = dynamic_cast<ClientRequestInfo_impl*>(ri); > - assert(!CORBA::is_nil(ri_impl)); > - ri_impl->exception(ex->_clone()); > - ri_impl->effective_target(ex->forward); > - ri_impl->reply_status(PortableInterceptor::LOCATION_FORWARD); > - ri_impl->icept_oper(PInterceptor::RECEIVE_OTHER); > - PInterceptor::PI::_exec_receive_other(ri); > - throw; > + ClientRequestInfo_impl* ri_impl > + = dynamic_cast<ClientRequestInfo_impl*>(ri); > + assert(!CORBA::is_nil(ri_impl)); > + ri_impl->exception(ex->_clone()); > + ri_impl->effective_target(ex->forward); > + ri_impl->reply_status(PortableInterceptor::LOCATION_FORWARD); > + ri_impl->icept_oper(PInterceptor::RECEIVE_OTHER); > + PInterceptor::PI::_exec_receive_other(ri); > + throw; This looks like a whitespace change since the code removed and added looks like the same. Is that right? > } catch (CORBA::UserException& ex) { > PInterceptor::ClientRequestInfo_impl* ri_impl > = dynamic_cast<PInterceptor::ClientRequestInfo_impl*>(ri); > @@ -2255,7 +2255,12 @@ > cri->icept_oper(PInterceptor::RECEIVE_EXCEPTION); > cri->exception(exception->_clone()); > cri->set_reply_service_context_list(reply_scl); > + try { > PInterceptor::PI::_exec_receive_exception(cri); // end point > + } catch (PortableInterceptor::ForwardRequest_catch& ex) { > + std::cout << "receive_exception_ip: catch ForwardException" << endl; > + throw; > + } > } > } Is this just your debugging code or do you really intend to have this committed? If so perhaps MICO's debugging facility should be used for a message print? > > @@ -2276,7 +2281,11 @@ > cri->contexts(contexts); > cri->operation_context(operation_context); > cri->set_reply_service_context_list(reply_scl); > + try { > PInterceptor::PI::_exec_receive_exception(cri); // end point > + } catch (PortableInterceptor::ForwardRequest_catch& ex) { > + throw; > + } > } > } Ditto. Anyway, thanks for this issue investigation! Karel -- Karel Gardas kgar...@objectsecurity.com ObjectSecurity Ltd. http://www.objectsecurity.com ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Mico-devel mailing list Mico-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mico-devel