All the action for a synchronous oneway invocation happen here. More...
#include <Synch_Invocation.h>


Public Member Functions | |
| Synch_Oneway_Invocation (CORBA::Object_ptr otarget, Profile_Transport_Resolver &resolver, TAO_Operation_Details &detail) | |
| Constructor used by TAO::Invocation_Adapter. | |
| Invocation_Status | remote_oneway (ACE_Time_Value *max_wait_time) |
All the action for a synchronous oneway invocation happen here.
This class inherits from twoway invocation for the following reasons
Definition at line 137 of file Synch_Invocation.h.
| TAO::Synch_Oneway_Invocation::Synch_Oneway_Invocation | ( | CORBA::Object_ptr | otarget, | |
| Profile_Transport_Resolver & | resolver, | |||
| TAO_Operation_Details & | detail | |||
| ) |
Constructor used by TAO::Invocation_Adapter.
| otarget | The original target on which this invocation was started. This is there to be passed up to its parent class. | |
| resolver | The profile and transport holder. | |
| detail | Operation details of the invocation on the target |
Definition at line 643 of file Synch_Invocation.cpp.
: Synch_Twoway_Invocation (otarget, r, d, false) { }
| Invocation_Status TAO::Synch_Oneway_Invocation::remote_oneway | ( | ACE_Time_Value * | max_wait_time | ) |
Method used by the adapter to kickstart an oneway invocation to the remote object.
Definition at line 652 of file Synch_Invocation.cpp.
{
ACE_Countdown_Time countdown (max_wait_time);
CORBA::Octet const response_flags = this->details_.response_flags ();
Invocation_Status s = TAO_INVOKE_FAILURE;
if (response_flags == CORBA::Octet (Messaging::SYNC_WITH_SERVER) ||
response_flags == CORBA::Octet (Messaging::SYNC_WITH_TARGET))
{
s = Synch_Twoway_Invocation::remote_twoway (max_wait_time);
return s;
}
#if TAO_HAS_INTERCEPTORS == 1
s = this->send_request_interception ();
if (s != TAO_INVOKE_SUCCESS)
return s;
try
{
#endif /*TAO_HAS_INTERCEPTORS */
TAO_Transport* const transport = this->resolver_.transport ();
if (!transport)
{
// Way back, we failed to find a profile we could connect to.
// We've come this far only so we reach the interception points
// in case they can fix things. Time to bail....
throw CORBA::TRANSIENT (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO);
}
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, transport->output_cdr_lock (),
TAO_INVOKE_FAILURE);
TAO_OutputCDR &cdr = transport->out_stream ();
cdr.message_attributes (this->details_.request_id (),
this->resolver_.stub (),
TAO_ONEWAY_REQUEST,
max_wait_time);
this->write_header (cdr);
this->marshal_data (cdr);
countdown.update ();
if (transport->is_connected ())
{
// We have a connected transport so we can send the message
s = this->send_message (cdr,
TAO_ONEWAY_REQUEST,
max_wait_time);
}
else
{
if (TAO_debug_level > 4)
ACE_DEBUG ((LM_DEBUG,
"TAO (%P|%t) - Synch_Oneway_Invocation::"
"remote_oneway, queueing message\n"));
if (transport->format_queue_message (cdr,
max_wait_time,
this->resolver_.stub()) != 0)
{
s = TAO_INVOKE_FAILURE;
}
}
}
#if TAO_HAS_INTERCEPTORS == 1
s = this->receive_other_interception ();
}
catch ( ::CORBA::Exception& ex)
{
PortableInterceptor::ReplyStatus const status =
this->handle_any_exception (&ex);
if (status == PortableInterceptor::LOCATION_FORWARD ||
status == PortableInterceptor::TRANSPORT_RETRY)
s = TAO_INVOKE_RESTART;
else if (status == PortableInterceptor::SYSTEM_EXCEPTION
|| status == PortableInterceptor::USER_EXCEPTION)
throw;
}
catch (...)
{
// Notify interceptors of non-CORBA exception, and propagate
// that exception to the caller.
PortableInterceptor::ReplyStatus const st =
this->handle_all_exception ();
if (st == PortableInterceptor::LOCATION_FORWARD ||
st == PortableInterceptor::TRANSPORT_RETRY)
s = TAO_INVOKE_RESTART;
else
throw;
}
#endif /* TAO_HAS_INTERCEPTORS */
return s;
}
1.7.0