00001 // $Id: CSD_TP_Collocated_Synch_With_Server_Request.cpp 76687 2007-01-29 19:18:13Z johnnyw $ 00002 00003 #include "tao/CSD_ThreadPool/CSD_TP_Collocated_Synch_With_Server_Request.h" 00004 00005 ACE_RCSID (CSD_ThreadPool, 00006 TP_Collocated_Synch_With_Server_Request, 00007 "$Id: CSD_TP_Collocated_Synch_With_Server_Request.cpp 76687 2007-01-29 19:18:13Z johnnyw $") 00008 00009 #include "tao/Exception.h" 00010 00011 #if !defined (__ACE_INLINE__) 00012 # include "tao/CSD_ThreadPool/CSD_TP_Collocated_Synch_With_Server_Request.inl" 00013 #endif /* ! __ACE_INLINE__ */ 00014 00015 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00016 00017 TAO::CSD::TP_Collocated_Synch_With_Server_Request::~TP_Collocated_Synch_With_Server_Request() 00018 { 00019 } 00020 00021 00022 void 00023 TAO::CSD::TP_Collocated_Synch_With_Server_Request::prepare_for_queue_i() 00024 { 00025 // NOTE: We *NEED* clone the TAO_ServerRequest for a collocated, 00026 // one-way SYNC_WITH_SERVER request. This is because the 00027 // calling thread is signalled just *before* the request is 00028 // dispatched. It's (very) possible that the calling thread 00029 // will destroy the underlying TAO_ServerRequest object while 00030 // the request is dispatching to servant. This is why we make 00031 // a clone - so that we have our own copy that won't be destroyed 00032 // while we are using it. 00033 this->do_clone(); 00034 } 00035 00036 00037 void 00038 TAO::CSD::TP_Collocated_Synch_With_Server_Request::dispatch_i() 00039 { 00040 // This is done *before* we do_dispatch(). 00041 this->synch_helper_.dispatched(); 00042 00043 try 00044 { 00045 this->do_dispatch(); 00046 } 00047 catch (const ::CORBA::Exception&) 00048 { 00049 // Eat these. We probably should log these, but since we have already 00050 // unblocked the requesting thread there is no point in saving it or 00051 // doing anything with it. 00052 } 00053 catch (...) 00054 { 00055 // Eat these. We probably should log these, but since we have already 00056 // unblocked the requesting thread there is no point in saving it or 00057 // doing anything with it. 00058 } 00059 } 00060 00061 void 00062 TAO::CSD::TP_Collocated_Synch_With_Server_Request::cancel_i() 00063 { 00064 this->synch_helper_.cancelled(); 00065 } 00066 00067 TAO_END_VERSIONED_NAMESPACE_DECL