#include <POA_Guard.h>
Collaboration diagram for TAO::Portable_Server::POA_Guard:
Public Member Functions | |
POA_Guard (::TAO_Root_POA &poa, bool check_for_destruction=true) | |
Private Attributes | |
ACE_Guard< ACE_Lock > | guard_ |
Definition at line 40 of file POA_Guard.h.
TAO::Portable_Server::POA_Guard::POA_Guard | ( | ::TAO_Root_POA & | poa, | |
bool | check_for_destruction = true | |||
) |
Definition at line 18 of file POA_Guard.cpp.
References CORBA::SystemException::_tao_minor_code(), TAO_Root_POA::cleanup_in_progress(), CORBA::COMPLETED_NO, TAO_Root_POA::object_adapter(), TAO_GUARD_FAILURE, TAO_POA_BEING_DESTROYED, and TAO_Object_Adapter::wait_for_non_servant_upcalls_to_complete().
00019 : guard_ (poa.lock ()) 00020 { 00021 if (!this->guard_.locked ()) 00022 throw 00023 CORBA::INTERNAL ( 00024 CORBA::SystemException::_tao_minor_code ( 00025 TAO_GUARD_FAILURE, 00026 0), 00027 CORBA::COMPLETED_NO); 00028 00029 // Check if a non-servant upcall is in progress. If a non-servant 00030 // upcall is in progress, wait for it to complete. Unless of 00031 // course, the thread making the non-servant upcall is this thread. 00032 poa.object_adapter ().wait_for_non_servant_upcalls_to_complete (); 00033 00034 if (check_for_destruction && poa.cleanup_in_progress ()) 00035 throw 00036 CORBA::BAD_INV_ORDER ( 00037 CORBA::SystemException::_tao_minor_code ( 00038 TAO_POA_BEING_DESTROYED, 00039 0), 00040 CORBA::COMPLETED_NO); 00041 }
Definition at line 46 of file POA_Guard.h.