diff options
author | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-08-24 02:47:05 +0000 |
---|---|---|
committer | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-08-24 02:47:05 +0000 |
commit | fd5aa3d5e9fecf3893d7601be7727c8ca1f1df14 (patch) | |
tree | 8c81076976204711d7f58f44a73a1be9499f9a1f /TAO/tao | |
parent | 3cda9760abad96561e0e5cc732f898a92b0ad9c4 (diff) | |
download | ATCD-fd5aa3d5e9fecf3893d7601be7727c8ca1f1df14.tar.gz |
ChangeLogTag:Mon Aug 23 21:40:36 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/Messaging/Asynch_Invocation.cpp | 38 | ||||
-rw-r--r-- | TAO/tao/Synch_Invocation.cpp | 53 |
2 files changed, 48 insertions, 43 deletions
diff --git a/TAO/tao/Messaging/Asynch_Invocation.cpp b/TAO/tao/Messaging/Asynch_Invocation.cpp index 4444cb1b7e7..0f986e5b769 100644 --- a/TAO/tao/Messaging/Asynch_Invocation.cpp +++ b/TAO/tao/Messaging/Asynch_Invocation.cpp @@ -41,16 +41,21 @@ namespace TAO this->init_target_spec (tspec ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); + TAO_OutputCDR &cdr = + this->resolver_.transport ()->messaging_object ()->out_stream (); + Invocation_Status s = TAO_INVOKE_FAILURE; -#if TAO_HAS_INTERCEPTORS == 1 - s = - this->send_request_interception (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); - if (s != TAO_INVOKE_SUCCESS) - return s; -#endif /*TAO_HAS_INTERCEPTORS */ + this->write_header (tspec, + cdr + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (s); + + this->marshal_data (cdr + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (s); + // Register a reply dispatcher for this invocation. Use the // preallocated reply dispatcher. TAO_Bind_Dispatcher_Guard dispatch_guard ( @@ -77,23 +82,20 @@ namespace TAO // reply dispatcher. dispatch_guard.status (TAO_Bind_Dispatcher_Guard::NO_UNBIND); - TAO_OutputCDR &cdr = - this->resolver_.transport ()->messaging_object ()->out_stream (); +#if TAO_HAS_INTERCEPTORS == 1 + s = + this->send_request_interception (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); + + if (s != TAO_INVOKE_SUCCESS) + return s; +#endif /*TAO_HAS_INTERCEPTORS */ // We have started the interception flow. We need to call the // ending interception flow if things go wrong. The purpose of the // try block is to take care of the cases when things go wrong. ACE_TRY { - this->write_header (tspec, - cdr - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - this->marshal_data (cdr - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - // Send it as a oneway request. It will make all the required // paraphernalia within the ORB to fire, like buffering if // send blocks etc. diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp index 0b9721af406..a36c0aa427f 100644 --- a/TAO/tao/Synch_Invocation.cpp +++ b/TAO/tao/Synch_Invocation.cpp @@ -52,12 +52,31 @@ namespace TAO TAO_Synch_Reply_Dispatcher rd (this->resolver_.stub ()->orb_core (), this->details_.reply_service_info ()); + TAO_Target_Specification tspec; + this->init_target_spec (tspec ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); + + TAO_OutputCDR &cdr = + this->resolver_.transport ()->out_stream (); + + Invocation_Status s = TAO_INVOKE_FAILURE; + + this->write_header (tspec, + cdr + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (s); + + this->marshal_data (cdr + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (s); + + // Register a reply dispatcher for this invocation. Use the // preallocated reply dispatcher. TAO_Bind_Dispatcher_Guard dispatch_guard ( - this->details_.request_id (), - &rd, - this->resolver_.transport ()->tms ()); + this->details_.request_id (), + &rd, + this->resolver_.transport ()->tms ()); if (dispatch_guard.status () != 0) { @@ -65,16 +84,13 @@ namespace TAO // we close the connection? this->resolver_.transport ()->close_connection (); - ACE_THROW_RETURN (CORBA::INTERNAL (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO), - TAO_INVOKE_FAILURE); + ACE_THROW_RETURN ( + CORBA::INTERNAL ( + TAO_DEFAULT_MINOR_CODE, + CORBA::COMPLETED_NO), + s); } - TAO_Target_Specification tspec; - this->init_target_spec (tspec ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (TAO_INVOKE_FAILURE); - - Invocation_Status s = TAO_INVOKE_FAILURE; #if TAO_HAS_INTERCEPTORS == 1 // Start the interception point here.. @@ -86,26 +102,13 @@ namespace TAO return s; #endif /*TAO_HAS_INTERCEPTORS */ - TAO_OutputCDR &cdr = - this->resolver_.transport ()->out_stream (); + countdown.update (); // We have started the interception flow. We need to call the // ending interception flow if things go wrong. The purpose of the // try block is to do just this. ACE_TRY { - this->write_header (tspec, - cdr - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - this->marshal_data (cdr - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - - countdown.update (); - s = this->send_message (cdr, TAO_Transport::TAO_TWOWAY_REQUEST, max_wait_time |