#include <Root_POA.h>
Inheritance diagram for TAO_Root_POA:
Public Types | |
typedef ACE_CString | String |
enum | { TAO_OBJECTKEY_PREFIX_SIZE = 4 } |
Public Member Functions | |
PortableServer::POA_ptr | create_POA (const char *adapter_name, PortableServer::POAManager_ptr poa_manager, const CORBA::PolicyList &policies) throw (CORBA::SystemException, PortableServer::POA::AdapterAlreadyExists, PortableServer::POA::InvalidPolicy) |
PortableServer::POA_ptr | find_POA (const char *adapter_name, CORBA::Boolean activate_it) throw (CORBA::SystemException, PortableServer::POA::AdapterNonExistent) |
void | destroy (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion) throw (CORBA::SystemException) |
PortableServer::ThreadPolicy_ptr | create_thread_policy (PortableServer::ThreadPolicyValue value) throw (CORBA::SystemException) |
PortableServer::LifespanPolicy_ptr | create_lifespan_policy (PortableServer::LifespanPolicyValue value) throw (CORBA::SystemException) |
PortableServer::IdUniquenessPolicy_ptr | create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value) throw (CORBA::SystemException) |
PortableServer::IdAssignmentPolicy_ptr | create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value) throw (CORBA::SystemException) |
PortableServer::ImplicitActivationPolicy_ptr | create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value) throw (CORBA::SystemException) |
PortableServer::ServantRetentionPolicy_ptr | create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value) throw (CORBA::SystemException) |
PortableServer::RequestProcessingPolicy_ptr | create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value) throw (CORBA::SystemException) |
char * | the_name () throw (CORBA::SystemException) |
PortableServer::POA_ptr | the_parent () throw (CORBA::SystemException) |
PortableServer::POAList * | the_children () throw (CORBA::SystemException) |
PortableServer::POAManager_ptr | the_POAManager () throw (CORBA::SystemException) |
PortableServer::POAManagerFactory_ptr | the_POAManagerFactory () throw (CORBA::SystemException) |
PortableInterceptor::AdapterName * | adapter_name () throw (CORBA::SystemException) |
void | save_ior_component (const IOP::TaggedComponent &component) |
void | save_ior_component_and_profile_id (const IOP::TaggedComponent &component, IOP::ProfileId profile_id) |
PortableServer::AdapterActivator_ptr | the_activator () throw (CORBA::SystemException) |
void | the_activator (PortableServer::AdapterActivator_ptr adapter_activator) throw (CORBA::SystemException) |
PortableServer::ServantManager_ptr | get_servant_manager () throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
void | set_servant_manager (PortableServer::ServantManager_ptr imgr) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
PortableServer::Servant | get_servant () throw (CORBA::SystemException, PortableServer::POA::NoServant, PortableServer::POA::WrongPolicy) |
void | set_servant (PortableServer::Servant servant) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
PortableServer::ObjectId * | activate_object (PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantAlreadyActive, PortableServer::POA::WrongPolicy) |
void | activate_object_with_id (const PortableServer::ObjectId &id, PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantAlreadyActive, PortableServer::POA::ObjectAlreadyActive, PortableServer::POA::WrongPolicy) |
void | deactivate_object (const PortableServer::ObjectId &oid) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | create_reference (const char *intf) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | create_reference_with_id (const PortableServer::ObjectId &oid, const char *intf) throw (CORBA::SystemException) |
PortableServer::ObjectId * | servant_to_id (PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy) |
PortableServer::ObjectId * | servant_to_user_id (PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | servant_to_reference (PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy) |
PortableServer::Servant | reference_to_servant (CORBA::Object_ptr reference) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongAdapter, PortableServer::POA::WrongPolicy) |
PortableServer::ObjectId * | reference_to_id (CORBA::Object_ptr reference) throw (CORBA::SystemException, PortableServer::POA::WrongAdapter, PortableServer::POA::WrongPolicy) |
PortableServer::Servant | id_to_servant (const PortableServer::ObjectId &oid) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | id_to_reference (const PortableServer::ObjectId &oid) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
CORBA::OctetSeq * | id () throw (CORBA::SystemException) |
TAO_POA_Policy_Set & | policies (void) |
Accessor for POA policies. | |
CORBA::Policy_ptr | get_policy (CORBA::PolicyType policy) |
Get the set policy of the given type. | |
virtual CORBA::PolicyList * | client_exposed_policies (CORBA::Short object_priority) |
TAO_Root_POA (const String &name, PortableServer::POAManager_ptr poa_manager, const TAO_POA_Policy_Set &policies, TAO_Root_POA *parent, ACE_Lock &lock, TAO_SYNCH_MUTEX &thread_lock, TAO_ORB_Core &orb_core, TAO_Object_Adapter *object_adapter) | |
virtual | ~TAO_Root_POA (void) |
const TAO_Object_Adapter::poa_name & | folded_name (void) const |
const TAO_Object_Adapter::poa_name & | system_name (void) const |
TAO_ORB_Core & | orb_core (void) const |
ORB Core for POA. | |
TAO::Portable_Server::Cached_Policies::PriorityModel | priority_model (void) const |
CORBA::Boolean | cleanup_in_progress (void) |
TAO_Object_Adapter & | object_adapter (void) |
ACE_Lock & | lock (void) |
TAO_Stub * | key_to_stub (const TAO::ObjectKey &key, const char *type_id, CORBA::Short priority) |
PortableInterceptor::AdapterState | get_adapter_state () |
Accessor methods to POA state. | |
virtual void * | thread_pool (void) const |
virtual CORBA::Policy * | server_protocol (void) |
CORBA::ULong | outstanding_requests (void) const |
const ACE_CString & | name (void) const |
CORBA::Boolean | waiting_destruction (void) const |
CORBA::Object_ptr | invoke_key_to_object () |
CORBA::Boolean | system_id (void) |
CORBA::ULong | waiting_servant_deactivation (void) const |
TAO_POA_Manager & | tao_poa_manager () |
Return the POA Manager related to this POA. | |
bool | is_poa_generated (CORBA::Object_ptr reference, PortableServer::ObjectId &system_id) |
bool | is_servant_activation_allowed (PortableServer::Servant servant, int &wait_occurred_restart_call) |
int | rebind_using_user_id_and_system_id (PortableServer::Servant servant, const PortableServer::ObjectId &user_id, const PortableServer::ObjectId &system_id, TAO::Portable_Server::Servant_Upcall &servant_upcall) |
CORBA::Boolean | servant_has_remaining_activations (PortableServer::Servant servant) |
bool | allow_implicit_activation (void) const |
bool | allow_multiple_activations (void) const |
int | is_servant_active (PortableServer::Servant servant, int &wait_occurred_restart_call) |
void | deactivate_object_i (const PortableServer::ObjectId &oid) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
CORBA::Boolean | is_persistent (void) const |
CORBA::Short | server_priority (void) const |
bool | has_system_id (void) const |
PortableServer::Servant | find_servant (const PortableServer::ObjectId &system_id) |
TAO_SERVANT_LOCATION | servant_present (const PortableServer::ObjectId &system_id, PortableServer::Servant &servant) |
PortableServer::Servant | find_servant (const PortableServer::ObjectId &system_id, TAO::Portable_Server::Servant_Upcall &servant_upcall, TAO::Portable_Server::POA_Current_Impl &poa_current_impl) |
int | find_servant_priority (const PortableServer::ObjectId &system_id, CORBA::Short &priority) |
int | unbind_using_user_id (const PortableServer::ObjectId &user_id) |
void | cleanup_servant (PortableServer::Servant servant, const PortableServer::ObjectId &user_id) |
void | post_invoke_servant_cleanup (const PortableServer::ObjectId &system_id, const TAO::Portable_Server::Servant_Upcall &servant_upcall) |
bool | validate_lifespan (CORBA::Boolean is_persistent, const TAO::Portable_Server::Temporary_Creation_Time &creation_time) const |
PortableServer::ObjectId * | activate_object_i (PortableServer::Servant p_servant, CORBA::Short priority, int &wait_occurred_restart_call) throw (CORBA::SystemException, PortableServer::POA::ServantAlreadyActive, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | id_to_reference_i (const PortableServer::ObjectId &oid, bool indirect) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
PortableServer::ObjectId * | servant_to_id_i (PortableServer::Servant servant) throw (CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy) |
TAO_SYNCH_CONDITION & | servant_deactivation_condition (void) |
int | is_poa_generated_id (const PortableServer::ObjectId &id) |
void | check_state () |
Check the state of this POA. | |
int | delete_child (const String &child) |
PortableServer::Servant | user_id_to_servant_i (const PortableServer::ObjectId &oid) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
virtual CORBA::ORB_ptr | _get_orb () |
virtual void | poa_activated_hook () |
Hook - The POA has been (or is being) activated. | |
virtual void | poa_deactivated_hook () |
Hook - The POA has been deactivated. | |
virtual void | servant_activated_hook (PortableServer::Servant servant, const PortableServer::ObjectId &oid) |
Hook - A servant has been activated. | |
virtual void | servant_deactivated_hook (PortableServer::Servant servant, const PortableServer::ObjectId &oid) |
Hook - A servant has been deactivated. | |
CORBA::Object_ptr | invoke_key_to_object_helper_i (const char *repository_id, const PortableServer::ObjectId &id) throw (CORBA::SystemException) |
Static Public Member Functions | |
char | name_separator (void) |
CORBA::ULong | name_separator_length (void) |
void | check_for_valid_wait_for_completions (const TAO_ORB_Core &orb_core, CORBA::Boolean wait_for_completion) |
int | parse_ir_object_key (const TAO::ObjectKey &object_key, PortableServer::ObjectId &user_id) |
Calls protected static method used when POACurrent is not appropriate. | |
void | ort_adapter_factory_name (const char *name) |
const char * | ort_adapter_factory_name (void) |
void | imr_client_adapter_name (const char *name) |
Sets the value of TAO_POA_Static_Resources::imr_client_adapter_name_. | |
const char * | imr_client_adapter_name (void) |
Gets the value of TAO_POA_Static_Resources::imr_client_adapter_name_. | |
Public Attributes | |
CORBA::ULong | caller_key_to_object_ |
PortableServer::Servant | servant_for_key_to_object_ |
Key_To_Object_Params | key_to_object_params_ |
Static Public Attributes | |
CORBA::Octet const | objectkey_prefix [TAO_OBJECTKEY_PREFIX_SIZE] |
Protected Types | |
typedef ACE_Hash_Map_Manager_Ex< ACE_CString, TAO_Root_POA *, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_Mutex > | CHILDREN |
Protected Member Functions | |
int | enter (void) |
int | exit (void) |
virtual TAO_Root_POA * | new_POA (const String &name, PortableServer::POAManager_ptr poa_manager, const TAO_POA_Policy_Set &policies, TAO_Root_POA *parent, ACE_Lock &lock, TAO_SYNCH_MUTEX &thread_lock, TAO_ORB_Core &orb_core, TAO_Object_Adapter *object_adapter) |
Template method for creating new POA's of this type. | |
PortableServer::POA_ptr | create_POA_i (const char *adapter_name, PortableServer::POAManager_ptr poa_manager, const CORBA::PolicyList &policies) throw (CORBA::SystemException, PortableServer::POA::AdapterAlreadyExists, PortableServer::POA::InvalidPolicy) |
PortableServer::POA_ptr | create_POA_i (const String &adapter_name, PortableServer::POAManager_ptr poa_manager, const TAO_POA_Policy_Set &policies) throw (CORBA::SystemException, PortableServer::POA::AdapterAlreadyExists, PortableServer::POA::InvalidPolicy) |
TAO_Root_POA * | find_POA_i (const ACE_CString &child_name, CORBA::Boolean activate_it) throw (CORBA::SystemException, PortableServer::POA::AdapterNonExistent) |
void | destroy_i (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion) throw (CORBA::SystemException) |
void | complete_destruction_i () |
PortableServer::POAList * | the_children_i () throw (CORBA::SystemException) |
PortableInterceptor::AdapterName * | adapter_name_i () throw (CORBA::SystemException) |
void | adapter_state_changed (const TAO::ORT_Array &array_obj_ref_template, PortableInterceptor::AdapterState state) throw (CORBA::SystemException) |
void | add_ior_component (TAO_MProfile &mprofile, const IOP::TaggedComponent &component) throw (CORBA::SystemException) |
Add the given tagged component to all profiles. | |
void | add_ior_component_to_profile (TAO_MProfile &mprofile, const IOP::TaggedComponent &component, IOP::ProfileId profile_id) throw (CORBA::SystemException) |
CORBA::Object_ptr | key_to_object (const TAO::ObjectKey &key, const char *type_id, TAO_ServantBase *servant, CORBA::Boolean collocated, CORBA::Short priority, bool indirect) |
virtual TAO_Stub * | key_to_stub_i (const TAO::ObjectKey &key, const char *type_id, CORBA::Short priority) |
Like key_to_stub() but assume that the ORB is not shutting down. | |
TAO_Stub * | create_stub_object (const TAO::ObjectKey &object_key, const char *type_id, CORBA::PolicyList *policy_list, TAO_Acceptor_Filter *filter, TAO_Acceptor_Registry &acceptor_registry) |
PortableServer::Servant | get_servant_i () throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
void | activate_object_with_id_i (const PortableServer::ObjectId &id, PortableServer::Servant p_servant, CORBA::Short priority, int &wait_occurred_restart_call) throw (CORBA::SystemException, PortableServer::POA::ServantAlreadyActive, PortableServer::POA::ObjectAlreadyActive, PortableServer::POA::WrongPolicy) |
virtual void | remove_from_parent_i () |
void | deactivate_all_objects_i (CORBA::Boolean etherealize_objects) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
void | deactivate_all_objects_i (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
void | wait_for_completions (CORBA::Boolean wait_for_completion) |
CORBA::Object_ptr | create_reference_i (const char *intf, CORBA::Short priority) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | create_reference_with_id_i (const PortableServer::ObjectId &oid, const char *intf, CORBA::Short priority) throw (CORBA::SystemException) |
PortableServer::Servant | reference_to_servant_i (CORBA::Object_ptr reference) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongAdapter, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | servant_to_reference_i (PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy) |
PortableServer::Servant | id_to_servant_i (const PortableServer::ObjectId &oid) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
void | establish_components () |
void | components_established (PortableInterceptor::IORInfo_ptr info) |
void | set_folded_name (TAO_Root_POA *parent) |
void | set_id (TAO_Root_POA *parent) |
TAO::ObjectKey * | create_object_key (const PortableServer::ObjectId &id) |
PortableInterceptor::ObjectReferenceTemplate * | get_adapter_template () throw (CORBA::SystemException) |
Accessor methods to ObjectReferenceTemplate. | |
PortableInterceptor::ObjectReferenceTemplate * | get_adapter_template_i (void) |
Accessor methods to ObjectReferenceTemplate, non locked version. | |
PortableInterceptor::ObjectReferenceFactory * | get_obj_ref_factory () throw (CORBA::SystemException) |
Accessor methods to PortableInterceptor::ObjectReferenceFactory. | |
void | set_obj_ref_factory (PortableInterceptor::ObjectReferenceFactory *current_factory) |
Set the object reference factory. | |
TAO_SERVANT_LOCATION | locate_servant_i (const PortableServer::ObjectId &id, PortableServer::Servant &servant) |
PortableServer::Servant | locate_servant_i (const char *operation, const PortableServer::ObjectId &id, TAO::Portable_Server::Servant_Upcall &servant_upcall, TAO::Portable_Server::POA_Current_Impl &poa_current_impl, int &wait_occurred_restart_call) |
TAO::ORT_Adapter * | ORT_adapter () throw (CORBA::SystemException) |
TAO::ORT_Adapter * | ORT_adapter_i (void) |
TAO::ORT_Adapter_Factory * | ORT_adapter_factory (void) |
CORBA::Boolean | persistent (void) |
virtual CORBA::Boolean | root (void) const |
virtual char | root_key_type (void) |
void | outstanding_requests (CORBA::ULong new_outstanding_requests) |
CORBA::ULong | increment_outstanding_requests (void) |
CORBA::ULong | decrement_outstanding_requests (void) |
Static Protected Member Functions | |
int | parse_key (const TAO::ObjectKey &key, TAO_Object_Adapter::poa_name &poa_system_name, PortableServer::ObjectId &system_id, CORBA::Boolean &is_root, CORBA::Boolean &is_persistent, CORBA::Boolean &is_system_id, TAO::Portable_Server::Temporary_Creation_Time &poa_creation_time) |
char | persistent_key_char (void) |
char | transient_key_char (void) |
CORBA::ULong | persistent_key_type_length (void) |
char | system_id_key_char (void) |
char | user_id_key_char (void) |
CORBA::ULong | system_id_key_type_length (void) |
char | root_key_char (void) |
char | non_root_key_char (void) |
CORBA::ULong | root_key_type_length (void) |
Protected Attributes | |
String | name_ |
TAO_POA_Manager & | poa_manager_ |
Reference to the POAManager that this poa assicuates with. | |
TAO_POAManager_Factory & | poa_manager_factory_ |
Reference to the POAManagerFactory that generate the POAManager. | |
IOP::TaggedComponentList | tagged_component_ |
IOP::TaggedComponentList | tagged_component_id_ |
ACE_Array_Base< IOP::ProfileId > | profile_id_array_ |
TAO_POA_Policy_Set | policies_ |
TAO_Object_Adapter::poa_name | folded_name_ |
TAO_Object_Adapter::poa_name_var | system_name_ |
CORBA::OctetSeq | id_ |
TAO::ORT_Adapter * | ort_adapter_ |
Pointer to the object reference template adapter. | |
PortableInterceptor::AdapterState | adapter_state_ |
Adapter can be accepting, rejecting etc. | |
TAO::Portable_Server::Cached_Policies | cached_policies_ |
TAO::Portable_Server::Active_Policy_Strategies | active_policy_strategies_ |
PortableServer::AdapterActivator_var | adapter_activator_ |
CHILDREN | children_ |
ACE_Lock & | lock_ |
TAO_ORB_Core & | orb_core_ |
TAO_Object_Adapter * | object_adapter_ |
The object adapter we belong to. | |
CORBA::Boolean | cleanup_in_progress_ |
CORBA::ULong | outstanding_requests_ |
TAO_SYNCH_CONDITION | outstanding_requests_condition_ |
CORBA::Boolean | wait_for_completion_pending_ |
CORBA::Boolean | waiting_destruction_ |
TAO_SYNCH_CONDITION | servant_deactivation_condition_ |
TAO_Acceptor_Filter_Factory * | filter_factory_ |
Friends | |
class | TAO_Object_Adapter |
class | TAO::Portable_Server::Servant_Upcall |
class | TAO::Portable_Server::Non_Servant_Upcall |
class | TAO_POA_Manager |
class | TAO_RT_Collocation_Resolver |
class | TAO_IORInfo |
Implementation of the PortableServer::POA interface.
Definition at line 109 of file Root_POA.h.
|
Definition at line 933 of file Root_POA.h. |
|
Definition at line 122 of file Root_POA.h. Referenced by create_POA_i(), delete_child(), new_POA(), TAO_Object_Adapter::open(), TAO_Regular_POA::TAO_Regular_POA(), and TAO_Root_POA(). |
|
Definition at line 384 of file Root_POA.h.
00385 { 00386 TAO_OBJECTKEY_PREFIX_SIZE = 4 00387 }; |
|
Definition at line 211 of file Root_POA.cpp. References ACE_CATCHANY, ACE_CHECK, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_THROW, ACE_TRY, ACE_TRY_CHECK, active_policy_strategies_, TAO_Object_Adapter::bind_poa(), TAO::Portable_Server::Cached_Policies::implicit_activation(), TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(), object_adapter(), PortableServer::POAManager_ptr, TAO_POA_Manager::register_poa(), TAO_POA_Manager::remove_poa(), set_folded_name(), set_id(), ACE_OS::strcmp(), String, TAO_DEFAULT_ROOTPOA_NAME, TAO_HAS_MINIMUM_POA, TAO_Object_Adapter::unbind_poa(), TAO::Portable_Server::Active_Policy_Strategies::update(), and TAO::Portable_Server::Cached_Policies::update().
00220 : name_ (name), 00221 poa_manager_ (* (dynamic_cast <TAO_POA_Manager*> (poa_manager))), 00222 poa_manager_factory_ (* (object_adapter->poa_manager_factory_)), 00223 tagged_component_ (), 00224 tagged_component_id_ (), 00225 profile_id_array_ (0), 00226 policies_ (policies), 00227 ort_adapter_ (0), 00228 adapter_state_ (PortableInterceptor::HOLDING), 00229 00230 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) 00231 00232 adapter_activator_ (), 00233 00234 #endif /* TAO_HAS_MINIMUM_POA == 0 */ 00235 00236 children_ (), 00237 lock_ (lock), 00238 orb_core_ (orb_core), 00239 object_adapter_ (object_adapter), 00240 cleanup_in_progress_ (0), 00241 outstanding_requests_ (0), 00242 outstanding_requests_condition_ (thread_lock), 00243 wait_for_completion_pending_ (0), 00244 waiting_destruction_ (0), 00245 servant_deactivation_condition_ (thread_lock), 00246 filter_factory_ (0), 00247 caller_key_to_object_ (0), 00248 servant_for_key_to_object_ (0) 00249 { 00250 // Parse the policies that are used in the critical path in 00251 // a cache. 00252 this->cached_policies_.update (this->policies_ 00253 ACE_ENV_ARG_PARAMETER); 00254 ACE_CHECK; 00255 00256 #if (TAO_HAS_MINIMUM_POA == 1) 00257 // If this is the RootPOA, set the value of the ImplicitActivationPolicy 00258 // to IMPLICIT_ACTIVATION since it is impossible to pass the policy 00259 // as it is not compiled into the library. 00260 // 00261 // If the ImplicitActivationPolicy policy is ever compiled in the 00262 // minimum POA builds, remove this code and remove the guards 00263 // in Object_Adapter.cpp when changing the default policy for the 00264 // RootPOA. 00265 if (ACE_OS::strcmp (this->name_.c_str (), 00266 TAO_DEFAULT_ROOTPOA_NAME) == 0) 00267 { 00268 this->cached_policies_.implicit_activation 00269 (PortableServer::IMPLICIT_ACTIVATION); 00270 } 00271 #endif /* TAO_HAS_MINIMUM_POA == 1 */ 00272 00273 // Set the active strategies to be used by this POA 00274 this->active_policy_strategies_.update (this->cached_policies_, 00275 this 00276 ACE_ENV_ARG_PARAMETER); 00277 ACE_CHECK; 00278 00279 // Set the folded name of this POA. 00280 this->set_folded_name (parent); 00281 00282 // Register self with manager. 00283 int result = this->poa_manager_.register_poa (this); 00284 if (result != 0) 00285 { 00286 ACE_THROW (CORBA::OBJ_ADAPTER ()); 00287 } 00288 00289 // Add self to Object Adapter class. 00290 result = 00291 this->object_adapter ().bind_poa (this->folded_name_, 00292 this, 00293 this->system_name_.out ()); 00294 if (result != 0) 00295 { 00296 // Remove from POA Manager in case of errors. No checks of 00297 // further errors... 00298 this->poa_manager_.remove_poa (this); 00299 00300 ACE_THROW (CORBA::OBJ_ADAPTER ()); 00301 } 00302 00303 // Set the id for this POA. 00304 this->set_id (parent); 00305 00306 // Notify the Lifespan strategy of our startup 00307 ACE_TRY 00308 { 00309 this->active_policy_strategies_.lifespan_strategy()->notify_startup (ACE_ENV_SINGLE_ARG_PARAMETER); 00310 ACE_TRY_CHECK; 00311 } 00312 ACE_CATCHANY 00313 { 00314 this->poa_manager_.remove_poa (this); 00315 this->object_adapter ().unbind_poa (this, 00316 this->folded_name_, 00317 this->system_name_.in ()); 00318 ACE_RE_THROW; 00319 } 00320 ACE_ENDTRY; 00321 ACE_CHECK; 00322 } |
|
Definition at line 324 of file Root_POA.cpp.
00325 { 00326 } |
|
Reimplemented from CORBA::LocalObject. Definition at line 2923 of file Root_POA.cpp. References CORBA::ORB::_duplicate().
02924 { 02925 return CORBA::ORB::_duplicate (this->orb_core_.orb ()); 02926 } |
|
Definition at line 1216 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
01221 { 01222 while (1) 01223 { 01224 int wait_occurred_restart_call = 0; 01225 01226 // Lock access for the duration of this transaction. 01227 TAO_POA_GUARD_RETURN (0); 01228 01229 PortableServer::ObjectId *result = 01230 this->activate_object_i (servant, 01231 this->server_priority (), 01232 wait_occurred_restart_call 01233 ACE_ENV_ARG_PARAMETER); 01234 ACE_CHECK_RETURN (0); 01235 01236 // If we ended up waiting on a condition variable, the POA state 01237 // may have changed while we are waiting. Therefore, we need to 01238 // restart this call. 01239 if (wait_occurred_restart_call) 01240 continue; 01241 else 01242 return result; 01243 } 01244 } |
|
Definition at line 1200 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER.
01207 { 01208 return this->active_policy_strategies_.servant_retention_strategy()-> 01209 activate_object (servant, 01210 priority, 01211 wait_occurred_restart_call 01212 ACE_ENV_ARG_PARAMETER); 01213 } |
|
Definition at line 1248 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD.
01255 { 01256 while (1) 01257 { 01258 int wait_occurred_restart_call = 0; 01259 01260 // Lock access for the duration of this transaction. 01261 TAO_POA_GUARD; 01262 01263 this->activate_object_with_id_i (id, 01264 servant, 01265 this->server_priority (), 01266 wait_occurred_restart_call 01267 ACE_ENV_ARG_PARAMETER); 01268 ACE_CHECK; 01269 01270 // If we ended up waiting on a condition variable, the POA state 01271 // may have changed while we are waiting. Therefore, we need to 01272 // restart this call. 01273 if (wait_occurred_restart_call) 01274 continue; 01275 else 01276 return; 01277 } 01278 } |
|
Definition at line 1283 of file Root_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
01292 { 01293 this->active_policy_strategies_.servant_retention_strategy()-> 01294 activate_object_with_id (id, 01295 servant, 01296 priority, 01297 wait_occurred_restart_call 01298 ACE_ENV_ARG_PARAMETER); 01299 ACE_CHECK; 01300 } |
|
This method returns the adapter_name as a sequence of strings of length one or more or just a fixed name depending on the Object Adapter. Added wrt to ORT Spec. Referenced by ORT_adapter_i(). |
|
This method returns the adapter_name as a sequence of strings of length one or more or just a fixed name depending on the Object Adapter. Added wrt to ORT Spec. Definition at line 1065 of file Root_POA.cpp. References ACE_ASSERT, ACE_CHECK_RETURN, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_NEW_THROW_EX, TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), names, PortableServer::POA_var, and CORBA::string_dup(). Referenced by ORT_adapter_i().
01067 { 01068 // The adapter name is the sequence of names starting from the 01069 // RootPOA to the one whose name is requested. The name of the 01070 // RootPOA is "RootPOA". 01071 01072 PortableServer::POA_var poa = PortableServer::POA::_duplicate (this); 01073 01074 CORBA::ULong len = 0; 01075 01076 // Find the length of the adapter name sequence by traversing the 01077 // POA hierarchy until the RootPOA is reached. The RootPOA has no 01078 // parent. 01079 while (!CORBA::is_nil (poa.in ())) 01080 { 01081 poa = poa->the_parent (ACE_ENV_SINGLE_ARG_PARAMETER); 01082 ACE_CHECK_RETURN (0); 01083 01084 ++len; 01085 } 01086 01087 // Empty adapter name sequence. 01088 PortableInterceptor::AdapterName *names = 0; 01089 ACE_NEW_THROW_EX (names, 01090 PortableInterceptor::AdapterName (len), 01091 CORBA::NO_MEMORY ( 01092 CORBA::SystemException::_tao_minor_code ( 01093 TAO::VMCID, 01094 ENOMEM), 01095 CORBA::COMPLETED_NO)); 01096 ACE_CHECK_RETURN (0); 01097 01098 PortableInterceptor::AdapterName_var safe_names (names); 01099 01100 names->length (len); 01101 01102 poa = PortableServer::POA::_duplicate (this); 01103 01104 (*names)[0] = CORBA::string_dup ("RootPOA"); 01105 01106 // Fill in the AdapterName sequence as the POA hierarchy is 01107 // traversed. 01108 CORBA::ULong ilen = len; 01109 for (CORBA::ULong i = 1; i < len; ++i) 01110 { 01111 (*names)[--ilen] = poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); 01112 ACE_CHECK_RETURN (0); 01113 01114 poa = poa->the_parent (ACE_ENV_SINGLE_ARG_PARAMETER); 01115 ACE_CHECK_RETURN (0); 01116 01117 // If this condition asserts, the POA hierarchy was modified 01118 // (i.e. reduced in size) by another thread! 01119 ACE_ASSERT ((ilen > 0 ? !CORBA::is_nil (poa.in ()) : 1)); 01120 } 01121 01122 return safe_names._retn (); 01123 } |
|
Method to notify the IOR Interceptors when there is a state changed not related to POAManager. Definition at line 1181 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, and TAO_IORInterceptor_Adapter::adapter_state_changed().
01186 { 01187 TAO_IORInterceptor_Adapter *ior_adapter = 01188 this->orb_core_.ior_interceptor_adapter (); 01189 01190 if (ior_adapter) 01191 { 01192 ior_adapter->adapter_state_changed (array_obj_ref_template, 01193 state 01194 ACE_ENV_ARG_PARAMETER); 01195 ACE_CHECK; 01196 } 01197 } |
|
Add the given tagged component to all profiles.
Definition at line 1126 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, and TAO_Profile::add_tagged_component(). Referenced by create_stub_object().
01130 { 01131 // Add the given tagged component to all profiles. 01132 const CORBA::ULong profile_count = mprofile.profile_count (); 01133 01134 for (CORBA::ULong i = 0; i < profile_count; ++i) 01135 { 01136 TAO_Profile *profile = mprofile.get_profile (i); 01137 01138 profile->add_tagged_component (component 01139 ACE_ENV_ARG_PARAMETER); 01140 ACE_CHECK; 01141 } 01142 } |
|
Add the given tagged component to all profiles matching the given ProfileId. Definition at line 1145 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_THROW, TAO_Profile::add_tagged_component(), and TAO_Profile::tag(). Referenced by create_stub_object().
01151 { 01152 // Add the given tagged component to all profiles matching the given 01153 // ProfileId. 01154 bool found_profile = false; 01155 01156 CORBA::ULong const profile_count = mprofile.profile_count (); 01157 01158 for (CORBA::ULong i = 0; i < profile_count; ++i) 01159 { 01160 TAO_Profile *profile = mprofile.get_profile (i); 01161 01162 if (profile->tag () == profile_id) 01163 { 01164 profile->add_tagged_component (component 01165 ACE_ENV_ARG_PARAMETER); 01166 ACE_CHECK; 01167 01168 found_profile = true; 01169 } 01170 } 01171 01172 // According to the Portable Interceptor specification, we're 01173 // supposed to throw a CORBA::BAD_PARAM exception if no profile 01174 // matched the given ProfileId. 01175 if (found_profile == false) 01176 ACE_THROW (CORBA::BAD_PARAM (CORBA::OMGVMCID | 29, 01177 CORBA::COMPLETED_NO)); 01178 } |
|
Definition at line 2747 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::implicit_activation_strategy().
02748 { 02749 return this->active_policy_strategies_.implicit_activation_strategy ()-> 02750 allow_implicit_activation (); 02751 } |
|
Definition at line 2754 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::id_uniqueness_strategy().
02755 { 02756 return this->active_policy_strategies_.id_uniqueness_strategy ()-> 02757 allow_multiple_activations (); 02758 } |
|
Definition at line 1339 of file Root_POA.cpp. References ACE_THROW, TAO_TSS_Resources::instance(), TAO::Portable_Server::POA_Current_Impl::orb_core(), TAO_TSS_Resources::poa_current_impl_, and TAO::Portable_Server::POA_Current_Impl::previous_current_impl_. Referenced by TAO_Object_Adapter::check_close(), TAO_POA_Manager::deactivate_i(), destroy_i(), TAO_POA_Manager::discard_requests_i(), and TAO_POA_Manager::hold_requests_i().
01342 { 01343 if (wait_for_completion) 01344 { 01345 TAO::Portable_Server::POA_Current_Impl *poa_current_impl = 01346 static_cast <TAO::Portable_Server::POA_Current_Impl *> 01347 (TAO_TSS_Resources::instance ()->poa_current_impl_); 01348 01349 while (1) 01350 { 01351 // If wait_for_completion is TRUE and the current thread is 01352 // in an invocation context dispatched from some POA 01353 // belonging to the same ORB as this POA, the BAD_INV_ORDER 01354 // system exception with standard minor code 3 is raised and 01355 // POA destruction does not occur. 01356 if (poa_current_impl != 0) 01357 { 01358 if (&orb_core == &poa_current_impl->orb_core ()) 01359 { 01360 // CORBA 2.3 specifies which minor code corresponds 01361 // to this particular problem. 01362 ACE_THROW (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 3, 01363 CORBA::COMPLETED_NO)); 01364 } 01365 } 01366 else 01367 break; 01368 01369 poa_current_impl = 01370 poa_current_impl->previous_current_impl_; 01371 } 01372 } 01373 } |
|
Check the state of this POA.
Definition at line 2882 of file Root_POA.cpp. References ACE_ENV_SINGLE_ARG_PARAMETER, active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(). Referenced by TAO::Portable_Server::Servant_Upcall::prepare_for_upcall_i().
02883 { 02884 this->active_policy_strategies_.lifespan_strategy ()-> 02885 check_state (ACE_ENV_SINGLE_ARG_PARAMETER); 02886 } |
|
Definition at line 11 of file Root_POA.inl. References cleanup_in_progress_.
00012 { 00013 return this->cleanup_in_progress_; 00014 } |
|
Definition at line 1673 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(). Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::deactivate_map_entry(), and TAO::Portable_Server::Servant_Upcall::servant_cleanup().
01677 { 01678 this->active_policy_strategies_.request_processing_strategy()-> 01679 cleanup_servant (servant, user_id ACE_ENV_ARG_PARAMETER); 01680 } |
|
This method gives the policies that are exposed to the client. These policies are shipped within the IOR. Definition at line 2469 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_NEW_THROW_EX, TAO_POA_Policy_Set::add_client_exposed_fixed_policies(), and client_exposed_policies(). Referenced by client_exposed_policies(), and key_to_stub_i().
02471 { 02472 CORBA::PolicyList *client_exposed_policies = 0; 02473 ACE_NEW_THROW_EX (client_exposed_policies, 02474 CORBA::PolicyList (), 02475 CORBA::NO_MEMORY (TAO::VMCID, 02476 CORBA::COMPLETED_NO)); 02477 ACE_CHECK_RETURN (0); 02478 02479 CORBA::PolicyList_var policies = client_exposed_policies; 02480 02481 // Add in all of the client exposed policies. 02482 this->policies_.add_client_exposed_fixed_policies (client_exposed_policies 02483 ACE_ENV_ARG_PARAMETER); 02484 ACE_CHECK_RETURN (0); 02485 02486 return policies._retn (); 02487 } |
|
Definition at line 329 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW, active_policy_strategies_, adapter_activator_, TAO::Portable_Server::Active_Policy_Strategies::cleanup(), object_adapter(), TAO_POA_Manager::remove_poa(), TAO_Object_Adapter::unbind_poa(), and waiting_destruction_. Referenced by TAO::Portable_Server::Servant_Upcall::poa_cleanup(), and TAO::Portable_Server::Non_Servant_Upcall::~Non_Servant_Upcall().
00330 { 00331 // No longer awaiting destruction. 00332 this->waiting_destruction_ = 0; 00333 00334 // Remove POA from the POAManager. 00335 int result = this->poa_manager_.remove_poa (this); 00336 00337 if (result != 0) 00338 ACE_THROW (CORBA::OBJ_ADAPTER ()); 00339 00340 // Remove POA from the Object Adapter. 00341 result = this->object_adapter ().unbind_poa (this, 00342 this->folded_name_, 00343 this->system_name_.in ()); 00344 if (result != 0) 00345 ACE_THROW (CORBA::OBJ_ADAPTER ()); 00346 00347 // Cleanup all strategies 00348 this->active_policy_strategies_.cleanup (ACE_ENV_SINGLE_ARG_PARAMETER); 00349 ACE_CHECK; 00350 00351 // Forced cleanup. The new memory management scheme is evil and can 00352 // lead to reference deadlock, i.e., POA holds object A, but POA 00353 // cannot die because object A hold POA. 00354 { 00355 // 00356 // If new things are added to this cleanup code, make sure to move 00357 // the minimum CORBA #define after the declaration of 00358 // <non_servant_upcall>. 00359 // 00360 00361 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) 00362 00363 // ATTENTION: Trick locking here, see class header for details 00364 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (*this); 00365 ACE_UNUSED_ARG (non_servant_upcall); 00366 00367 this->adapter_activator_ = PortableServer::AdapterActivator::_nil (); 00368 00369 #endif /* TAO_HAS_MINIMUM_POA == 0 */ 00370 00371 } 00372 00373 ::CORBA::release (this); 00374 } |
|
Call the IORInterceptor::components_established() method on all registered IORInterceptors. Definition at line 2330 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, TAO_IORInterceptor_Adapter::components_established(), and TAO_ORB_Core::ior_interceptor_adapter().
02332 { 02333 TAO_IORInterceptor_Adapter *ior_adapter = 02334 this->orb_core_.ior_interceptor_adapter (); 02335 02336 if (ior_adapter) 02337 { 02338 ior_adapter->components_established (info ACE_ENV_ARG_PARAMETER); 02339 ACE_CHECK; 02340 } 02341 } |
|
Definition at line 134 of file Root_POA.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00137 { 00138 TAO::Portable_Server::IdAssignmentPolicy *policy = 0; 00139 ACE_NEW_THROW_EX (policy, 00140 TAO::Portable_Server::IdAssignmentPolicy (value), 00141 CORBA::NO_MEMORY ()); 00142 ACE_CHECK_RETURN (PortableServer::IdAssignmentPolicy::_nil ()); 00143 00144 return policy; 00145 } |
|
Definition at line 118 of file Root_POA.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00121 { 00122 TAO::Portable_Server::IdUniquenessPolicy *policy = 0; 00123 ACE_NEW_THROW_EX (policy, 00124 TAO::Portable_Server::IdUniquenessPolicy (value), 00125 CORBA::NO_MEMORY ()); 00126 ACE_CHECK_RETURN (PortableServer::IdUniquenessPolicy::_nil ()); 00127 00128 return policy; 00129 } |
|
Definition at line 151 of file Root_POA.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00154 { 00155 TAO::Portable_Server::ImplicitActivationPolicy *policy = 0; 00156 ACE_NEW_THROW_EX (policy, 00157 TAO::Portable_Server::ImplicitActivationPolicy (value), 00158 CORBA::NO_MEMORY ()); 00159 ACE_CHECK_RETURN (PortableServer::ImplicitActivationPolicy::_nil ()); 00160 00161 return policy; 00162 } |
|
Definition at line 101 of file Root_POA.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00104 { 00105 TAO::Portable_Server::LifespanPolicy *policy = 0; 00106 ACE_NEW_THROW_EX (policy, 00107 TAO::Portable_Server::LifespanPolicy (value), 00108 CORBA::NO_MEMORY ()); 00109 ACE_CHECK_RETURN (PortableServer::LifespanPolicy::_nil ()); 00110 00111 return policy; 00112 } |
|
Definition at line 1907 of file Root_POA.cpp. References ACE_NEW_RETURN, TAO::unbounded_value_sequence< T >::allocbuf(), TAO::unbounded_value_sequence< T >::length(), and ACE_OS::memcpy(). Referenced by invoke_key_to_object().
01908 { 01909 // Calculate the space required for the key. 01910 CORBA::ULong buffer_size = 01911 this->id_.length () + 01912 id.length (); 01913 01914 // Create the buffer for the key. 01915 CORBA::Octet *buffer = TAO::ObjectKey::allocbuf (buffer_size); 01916 01917 // First copy the POA id into the key. 01918 ACE_OS::memcpy (&buffer[0], 01919 this->id_.get_buffer (), 01920 this->id_.length ()); 01921 01922 // Then copy the object id into the key. 01923 ACE_OS::memcpy (&buffer[this->id_.length ()], 01924 id.get_buffer (), 01925 id.length ()); 01926 01927 // Create the key, giving the ownership of the buffer to the 01928 // sequence. 01929 TAO::ObjectKey *key = 0; 01930 ACE_NEW_RETURN (key, 01931 TAO::ObjectKey (buffer_size, 01932 buffer_size, 01933 buffer, 01934 1), 01935 0); 01936 01937 return key; 01938 } |
|
Definition at line 694 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, PortableServer::POAManager_ptr, and TAO_POA_GUARD_RETURN.
00701 { 00702 // Lock access for the duration of this transaction. 00703 TAO_POA_GUARD_RETURN (0); 00704 00705 return this->create_POA_i (adapter_name, 00706 poa_manager, 00707 policies 00708 ACE_ENV_ARG_PARAMETER); 00709 } |
|
Definition at line 491 of file Root_POA.cpp. References TAO_Objref_Var_T< T >::_retn(), ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW_RETURN, PortableServer::POA_var, PortableServer::POAManager_ptr, and String.
00498 { 00499 // This operaton creates a new POA as a child of the target POA. The 00500 // specified name identifies the new POA with respect to other POAs 00501 // with the same parent POA. If the target POA already has a child 00502 // POA with the specified name, the AdapterAlreadyExists exception 00503 // is raised. 00504 int result = this->children_.find (adapter_name); 00505 00506 // Child was found 00507 if (result != -1) 00508 { 00509 ACE_THROW_RETURN (PortableServer::POA::AdapterAlreadyExists (), 00510 PortableServer::POA::_nil ()); 00511 } 00512 00513 // 00514 // Child was not found. Create one. 00515 // 00516 00517 // The specified policy objects are associated with the POA and used 00518 // to control its behavior. The policy objects are effectively 00519 // copied before this operation returns, so the application is free 00520 // to destroy them while the POA is in use. Policies are not 00521 // inherited from the parent POA. 00522 TAO_Root_POA * poa = this->new_POA (adapter_name, 00523 poa_manager, 00524 policies, 00525 this, 00526 this->object_adapter ().lock (), 00527 this->object_adapter ().thread_lock (), 00528 this->orb_core_, 00529 this->object_adapter_ 00530 ACE_ENV_ARG_PARAMETER); 00531 00532 // Give ownership of the new map to the POA_var. Note, that it 00533 // is important for the POA_var to take ownership before 00534 // checking for exception since we may need to delete the new map. 00535 PortableServer::POA_var new_poa = poa; 00536 00537 // Check for exception in construction of the POA. 00538 ACE_CHECK_RETURN (PortableServer::POA::_nil ()); 00539 00540 // Add to children map 00541 result = this->children_.bind (adapter_name, 00542 poa); 00543 if (result != 0) 00544 { 00545 ACE_THROW_RETURN (CORBA::OBJ_ADAPTER (), 00546 PortableServer::POA::_nil ()); 00547 } 00548 00549 // Increment the reference count on the child POA since the children 00550 // map must retain ownership. Do so immediately before any other 00551 // operations to prevent memory cleanup problems induced from 00552 // errors below. 00553 poa->_add_ref (); 00554 00555 // Iterate over the registered IOR interceptors so that they may be 00556 // given the opportunity to add tagged components to the profiles 00557 // for this servant. 00558 poa->establish_components (ACE_ENV_SINGLE_ARG_PARAMETER); 00559 ACE_CHECK_RETURN (PortableServer::POA::_nil ()); 00560 00561 // Note: Creating a POA using a POA manager that is in the active 00562 // state can lead to race conditions if the POA supports preexisting 00563 // objects, because the new POA may receive a request before its 00564 // adapter activator, servant manager, or default servant have been 00565 // initialized. These problems do not occur if the POA is created by 00566 // an adapter activator registered with a parent of the new POA, 00567 // because requests are queued until the adapter activator 00568 // returns. To avoid these problems when a POA must be explicitly 00569 // initialized, the application can initialize the POA by invoking 00570 // find_POA with a TRUE activate parameter. 00571 00572 // Everything is fine. Don't let the POA_var release the 00573 // implementation. 00574 return new_poa._retn (); 00575 } |
|
Definition at line 378 of file Root_POA.cpp. References TAO_Objref_Var_T< T >::_retn(), ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), TAO_POA_Policy_Set::merge_policies(), PortableServer::POA_var, PortableServer::POAManager_ptr, PortableServer::POAManager_var, TAO_POA_Policy_Set::policies(), and TAO_POA_Policy_Set::validate_policies().
00385 { 00386 // Initialize a TAO_POA_Policy_Set instance so that it contains the 00387 // default POA policies. 00388 TAO_POA_Policy_Set tao_policies (this->object_adapter ().default_poa_policies ()); 00389 00390 // Merge policies from the ORB level. 00391 this->object_adapter ().validator ().merge_policies (tao_policies.policies () 00392 ACE_ENV_ARG_PARAMETER); 00393 ACE_CHECK_RETURN (PortableServer::POA::_nil ()); 00394 00395 // Merge in any policies that the user may have specified. 00396 tao_policies.merge_policies (policies 00397 ACE_ENV_ARG_PARAMETER); 00398 ACE_CHECK_RETURN (PortableServer::POA::_nil ()); 00399 00400 // If any of the policy objects specified are not valid for the ORB 00401 // implementation, if conflicting policy objects are specified, or 00402 // if any of the specified policy objects require prior 00403 // administrative action that has not been performed, an 00404 // InvalidPolicy exception is raised containing the index in the 00405 // policies parameter value of the first offending policy object. 00406 tao_policies.validate_policies (this->object_adapter ().validator (), 00407 this->orb_core_ 00408 ACE_ENV_ARG_PARAMETER); 00409 ACE_CHECK_RETURN (PortableServer::POA::_nil ()); 00410 00411 // If the poa_manager parameter is null, a new POAManager object is 00412 // created and associated with the new POA. Otherwise, the specified 00413 // POAManager object is associated with the new POA. The POAManager 00414 // object can be obtained using the attribute name the_POAManager. 00415 00416 PortableServer::POAManager_var the_poa_manager; 00417 00418 if (CORBA::is_nil (poa_manager)) 00419 { 00420 PortableServer::POA_var poa = PortableServer::POA::_duplicate (this); 00421 PortableServer::POA_var root_poa; 00422 00423 // Find the RootPOA by traversing the POA hierarchy until the 00424 // RootPOA is reached. The RootPOA has no parent. 00425 while (!CORBA::is_nil (poa.in ())) 00426 { 00427 root_poa = poa; 00428 poa = poa->the_parent (ACE_ENV_SINGLE_ARG_PARAMETER); 00429 ACE_CHECK_RETURN (PortableServer::POA::_nil ()); 00430 } 00431 00432 // Get the POAManagerFactory instance owned by RootPOA. 00433 PortableServer::POAManagerFactory_var tao_poa_manager_factory 00434 = root_poa->the_POAManagerFactory (); 00435 00436 CORBA::PolicyList empty_policies; 00437 // The POAManager name will be generated when the POAManager instance 00438 // is created. 00439 the_poa_manager 00440 = tao_poa_manager_factory->create_POAManager (0, 00441 empty_policies 00442 ACE_ENV_ARG_PARAMETER); 00443 ACE_CHECK_RETURN (PortableServer::POA::_nil ()); 00444 } 00445 else 00446 { 00447 the_poa_manager = PortableServer::POAManager::_duplicate (poa_manager); 00448 } 00449 00450 PortableServer::POA_var poa = this->create_POA_i (adapter_name, 00451 the_poa_manager.in (), 00452 tao_policies 00453 ACE_ENV_ARG_PARAMETER); 00454 ACE_CHECK_RETURN (PortableServer::POA::_nil ()); 00455 00456 return poa._retn (); 00457 } |
|
Definition at line 1424 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
01428 { 01429 // Lock access for the duration of this transaction. 01430 TAO_POA_GUARD_RETURN (CORBA::Object::_nil ()); 01431 01432 return this->create_reference_i (intf, 01433 this->server_priority () 01434 ACE_ENV_ARG_PARAMETER); 01435 } |
|
Definition at line 1438 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and ACE_THROW_RETURN.
01443 { 01444 if (!this->has_system_id ()) 01445 { 01446 ACE_THROW_RETURN (PortableServer::POA::WrongPolicy (), 01447 CORBA::Object::_nil ()); 01448 } 01449 01450 return this->active_policy_strategies_.servant_retention_strategy()-> 01451 create_reference (intf, priority ACE_ENV_ARG_PARAMETER); 01452 } |
|
Definition at line 807 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
00811 { 00812 // Lock access for the duration of this transaction. 00813 TAO_POA_GUARD_RETURN (CORBA::Object::_nil ()); 00814 00815 return this->create_reference_with_id_i (id, 00816 intf, 00817 this->server_priority () 00818 ACE_ENV_ARG_PARAMETER); 00819 } |
|
Definition at line 1478 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and ACE_THROW_RETURN.
01483 { 01484 // If the POA has the SYSTEM_ID policy and it detects that the 01485 // Object Id value was not generated by the system or for this POA, 01486 // the create_reference_with_id operation may raise the BAD_PARAM 01487 // system exception. An ORB is not required to detect all such 01488 // invalid Object Id values, but a portable application must not 01489 // invoke this operation on a POA that has the SYSTEM_ID policy with 01490 // an Object Id value that was not previously generated by the 01491 // system for that POA, or, if the POA also has the PERSISTENT 01492 // policy, for a previous instantiation of the same POA. 01493 if (this->has_system_id () && 01494 !this->is_poa_generated_id (user_id)) 01495 { 01496 ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 14, 01497 CORBA::COMPLETED_NO), 01498 CORBA::Object::_nil ()); 01499 } 01500 01501 return this->active_policy_strategies_.servant_retention_strategy()-> 01502 create_reference_with_id (user_id, intf, priority ACE_ENV_ARG_PARAMETER); 01503 } |
|
Definition at line 179 of file Root_POA.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00182 { 00183 TAO::Portable_Server::RequestProcessingPolicy *policy = 0; 00184 ACE_NEW_THROW_EX (policy, 00185 TAO::Portable_Server::RequestProcessingPolicy (value), 00186 CORBA::NO_MEMORY ()); 00187 ACE_CHECK_RETURN (PortableServer::RequestProcessingPolicy::_nil ()); 00188 00189 return policy; 00190 } |
|
Definition at line 165 of file Root_POA.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00168 { 00169 TAO::Portable_Server::ServantRetentionPolicy *policy = 0; 00170 ACE_NEW_THROW_EX (policy, 00171 TAO::Portable_Server::ServantRetentionPolicy (value), 00172 CORBA::NO_MEMORY ()); 00173 ACE_CHECK_RETURN (PortableServer::ServantRetentionPolicy::_nil ()); 00174 00175 return policy; 00176 } |
|
Definition at line 2377 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, add_ior_component(), add_ior_component_to_profile(), TAO_ORB_Core::create_stub_object(), TAO_Acceptor_Filter::encode_endpoints(), TAO_Acceptor_Filter::fill_profile(), TAO::unbounded_value_sequence< TaggedComponent >::length(), TAO_MProfile::profile_count(), TAO_MProfile::set(), tagged_component_, tagged_component_id_, and TAO_MPROFILE_CREATION_ERROR. Referenced by key_to_stub_i().
02383 { 02384 int error = 0; 02385 02386 // Count the number of endpoints. 02387 size_t const profile_count = 02388 acceptor_registry.endpoint_count (); 02389 02390 // Create a profile container and have acceptor registries populate 02391 // it with profiles as appropriate. 02392 TAO_MProfile mprofile (0); 02393 02394 // Allocate space for storing the profiles. There can never be more 02395 // profiles than there are endpoints. In some cases, there can be 02396 // less profiles than endpoints. 02397 int result = 02398 mprofile.set (static_cast <CORBA::ULong> (profile_count)); 02399 if (result == -1) 02400 error = 1; 02401 02402 if (!error) 02403 { 02404 result = 02405 filter->fill_profile (object_key, 02406 mprofile, 02407 acceptor_registry.begin (), 02408 acceptor_registry.end ()); 02409 if (result == -1) 02410 error = 1; 02411 } 02412 02413 if (!error) 02414 result = filter->encode_endpoints (mprofile); 02415 if (result == -1) 02416 error = 1; 02417 02418 if (error) 02419 ACE_THROW_RETURN (CORBA::INTERNAL ( 02420 CORBA::SystemException::_tao_minor_code ( 02421 TAO_MPROFILE_CREATION_ERROR, 02422 0), 02423 CORBA::COMPLETED_NO), 02424 0); 02425 02426 // Make sure we have at least one profile. <mp> may end up being 02427 // empty if none of the acceptor endpoints have the right priority 02428 // for this object, for example. 02429 if (mprofile.profile_count () == 0) 02430 ACE_THROW_RETURN (CORBA::BAD_PARAM ( 02431 CORBA::SystemException::_tao_minor_code ( 02432 TAO_MPROFILE_CREATION_ERROR, 02433 0), 02434 CORBA::COMPLETED_NO), 02435 0); 02436 02437 TAO_Stub *stub = 02438 this->orb_core_.create_stub_object (mprofile, 02439 type_id, 02440 policy_list 02441 ACE_ENV_ARG_PARAMETER); 02442 ACE_CHECK_RETURN (0); 02443 02444 // Add the saved tagged components methods to the profiles. 02445 CORBA::ULong len = this->tagged_component_.length (); 02446 for (CORBA::ULong i = 0; i != len; ++i) 02447 { 02448 this->add_ior_component (mprofile, 02449 this->tagged_component_[i] 02450 ACE_ENV_ARG_PARAMETER); 02451 ACE_CHECK_RETURN (0); 02452 } 02453 02454 len = this->tagged_component_id_.length (); 02455 02456 for (CORBA::ULong k = 0; k != len; ++k) 02457 { 02458 this->add_ior_component_to_profile (mprofile, 02459 this->tagged_component_id_[k], 02460 this->profile_id_array_[k] 02461 ACE_ENV_ARG_PARAMETER); 02462 ACE_CHECK_RETURN (0); 02463 } 02464 02465 return stub; 02466 } |
|
Definition at line 83 of file Root_POA.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00086 { 00087 TAO::Portable_Server::ThreadPolicy *policy = 0; 00088 ACE_NEW_THROW_EX (policy, 00089 TAO::Portable_Server::ThreadPolicy (value), 00090 CORBA::NO_MEMORY ()); 00091 ACE_CHECK_RETURN (PortableServer::ThreadPolicy::_nil ()); 00092 00093 return policy; 00094 } |
|
Definition at line 1304 of file Root_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
01309 { 01310 this->deactivate_all_objects_i (etherealize_objects 01311 ACE_ENV_ARG_PARAMETER); 01312 ACE_CHECK; 01313 01314 this->wait_for_completions (wait_for_completion 01315 ACE_ENV_ARG_PARAMETER); 01316 ACE_CHECK; 01317 } |
|
Definition at line 1376 of file Root_POA.cpp. References ACE_ENV_SINGLE_ARG_PARAMETER. Referenced by TAO_POA_Manager::deactivate_i().
01380 { 01381 this->active_policy_strategies_.request_processing_strategy ()-> 01382 etherealize_objects (etherealize_objects); 01383 01384 this->active_policy_strategies_.servant_retention_strategy ()-> 01385 deactivate_all_objects (ACE_ENV_SINGLE_ARG_PARAMETER); 01386 } |
|
Definition at line 1389 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD.
01394 { 01395 // Lock access for the duration of this transaction. 01396 TAO_POA_GUARD; 01397 01398 this->deactivate_object_i (oid 01399 ACE_ENV_ARG_PARAMETER); 01400 ACE_CHECK; 01401 } |
|
Definition at line 1405 of file Root_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
01410 { 01411 this->active_policy_strategies_.servant_retention_strategy()-> 01412 deactivate_object (id 01413 ACE_ENV_ARG_PARAMETER); 01414 ACE_CHECK; 01415 } |
|
Definition at line 211 of file Root_POA.inl. References outstanding_requests_. Referenced by TAO::Portable_Server::Servant_Upcall::poa_cleanup().
00212 { 00213 return --this->outstanding_requests_; 00214 } |
|
Definition at line 1022 of file Root_POA.cpp. References children_, cleanup_in_progress_, String, and ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind(). Referenced by TAO_Regular_POA::remove_from_parent_i().
01023 { 01024 int result = 0; 01025 01026 // If we are not closing down, we must remove this child from our 01027 // collection. 01028 if (!this->cleanup_in_progress_) 01029 result = this->children_.unbind (child); 01030 01031 // Otherwise, if we are closing down, we are currently iterating 01032 // over our children and there is not need to remove this child from 01033 // our collection. 01034 01035 return result; 01036 } |
|
Definition at line 823 of file Root_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER. Referenced by TAO_Object_Adapter::close().
00827 { 00828 // Lock access for the duration of this transaction. 00829 TAO::Portable_Server::POA_Guard poa_guard (*this ACE_ENV_ARG_PARAMETER, 0); 00830 ACE_CHECK; 00831 ACE_UNUSED_ARG (poa_guard); 00832 00833 this->destroy_i (etherealize_objects, 00834 wait_for_completion 00835 ACE_ENV_ARG_PARAMETER); 00836 ACE_CHECK; 00837 } |
|
Definition at line 846 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, adapter_state_, check_for_valid_wait_for_completions(), TAO::ORT_Adapter_Factory::destroy(), TAO::ORT_Adapter::get_adapter_template(), ORT_adapter_i(), TAO::Portable_Server::Non_Servant_Upcall::poa(), PortableServer::POA_var, TAO::ORT_Adapter::release(), and ACE_Array_Base< T >::size().
00850 { 00851 if (this->cleanup_in_progress_) 00852 return; 00853 00854 // Is the <wait_for_completion> semantics for this thread correct? 00855 TAO_Root_POA::check_for_valid_wait_for_completions (this->orb_core (), 00856 wait_for_completion 00857 ACE_ENV_ARG_PARAMETER); 00858 ACE_CHECK; 00859 00860 this->cleanup_in_progress_ = 1; 00861 00862 // Inform the custom servant dispatching strategy to stop the working 00863 // threads when the poa is destroyed. 00864 this->poa_deactivated_hook (); 00865 00866 // This operation destroys the POA and all descendant POAs. The POA 00867 // so destroyed (that is, the POA with its name) may be re-created 00868 // later in the same process. (This differs from the 00869 // POAManager::deactivate operation that does not allow a 00870 // re-creation of its associated POA in the same process.) 00871 00872 // Remove POA from the parent 00873 this->remove_from_parent_i (ACE_ENV_SINGLE_ARG_PARAMETER); 00874 ACE_CHECK; 00875 00876 TAO::ORT_Array array_obj_ref_template (1); 00877 00878 CORBA::ULong i = 0; 00879 00880 // Gather all ObjectReferenceTemplates and change all adapter states 00881 // to INACTIVE. 00882 for (CHILDREN::iterator iterator = this->children_.begin (); 00883 iterator != this->children_.end (); 00884 ++iterator) 00885 { 00886 TAO_Root_POA * const child_poa = (*iterator).int_id_; 00887 00888 TAO::ORT_Adapter * const adapter = child_poa->ORT_adapter_i (); 00889 00890 // In case no ORT library is linked we get zero. 00891 if (adapter != 0) 00892 { 00893 // Get the ObjectReferenceTemplate for the child POA. 00894 PortableInterceptor::ObjectReferenceTemplate * const ort = 00895 adapter->get_adapter_template (); 00896 00897 // Add it to the sequence of object reference templates that 00898 // will be destroyed. 00899 array_obj_ref_template.size (1); 00900 00901 array_obj_ref_template[0] = ort; 00902 } 00903 00904 child_poa->adapter_state_ = 00905 PortableInterceptor::INACTIVE; 00906 00907 // Notify the state changes to the IORInterceptors 00908 this->adapter_state_changed (array_obj_ref_template, 00909 PortableInterceptor::INACTIVE 00910 ACE_ENV_ARG_PARAMETER); 00911 ACE_CHECK; 00912 00913 if (adapter != 0) 00914 adapter->release (array_obj_ref_template[0]); 00915 00916 ++i; 00917 } 00918 00919 // Destroy all child POA's now. 00920 for (CHILDREN::iterator destroy_iterator = this->children_.begin (); 00921 destroy_iterator != this->children_.end (); 00922 ++destroy_iterator) 00923 { 00924 TAO_Root_POA *destroy_child_poa = (*destroy_iterator).int_id_; 00925 00926 destroy_child_poa->destroy_i (etherealize_objects, 00927 wait_for_completion 00928 ACE_ENV_ARG_PARAMETER); 00929 ACE_CHECK; 00930 } 00931 00932 // Notify the lifespan strategy of our shutdown 00933 this->active_policy_strategies_.lifespan_strategy()->notify_shutdown ( 00934 ACE_ENV_SINGLE_ARG_PARAMETER); 00935 ACE_CHECK; 00936 00937 // @todo, is the exception handling above correct, should we just fail when 00938 // the notify above fails 00939 00940 // When a POA is destroyed, any requests that have started execution 00941 // continue to completion. Any requests that have not started 00942 // execution are processed as if they were newly arrived, that is, 00943 // the POA will attempt to cause recreation of the POA by invoking 00944 // one or more adapter activators as described in Section 3.3.3. 00945 // If the wait_for_completion parameter is TRUE, the destroy 00946 // operation will return only after all requests in process have 00947 // completed and all invocations of etherealize have 00948 // completed. Otherwise, the destroy operation returns after 00949 // destroying the POAs. 00950 00951 this->deactivate_all_objects_i (etherealize_objects, 00952 wait_for_completion 00953 ACE_ENV_ARG_PARAMETER); 00954 ACE_CHECK; 00955 00956 // If there are no outstanding requests and that we are not in a 00957 // non-servant upcall or if we are in a non-servant upcall, make 00958 // sure we are the POA related to the non-servant upcall. 00959 TAO::Portable_Server::Non_Servant_Upcall *non_servant_upcall_in_progress = 00960 this->object_adapter ().non_servant_upcall_in_progress (); 00961 if (this->outstanding_requests_ == 0 && 00962 (non_servant_upcall_in_progress == 0 || 00963 &non_servant_upcall_in_progress->poa () != this)) 00964 { 00965 TAO::ORT_Array my_array_obj_ref_template; 00966 00967 TAO::ORT_Adapter * const ort_adapter = 00968 this->ORT_adapter_i (); 00969 00970 // In case no ORT library is linked we get zero. 00971 if (ort_adapter != 0) 00972 { 00973 // Get the ObjectReferenceTemplate. 00974 PortableInterceptor::ObjectReferenceTemplate * const ort = 00975 ort_adapter->get_adapter_template (); 00976 00977 // Add it to the sequence of object reference templates, we 00978 // just notify for ourselves that we are now non_existent, 00979 // our childs will do it for themselves. 00980 my_array_obj_ref_template.size (1); 00981 my_array_obj_ref_template[0] = ort; 00982 } 00983 00984 // According to the ORT spec, after a POA is destroyed, its state 00985 // has to be changed to NON_EXISTENT and all the registered 00986 // interceptors are to be informed. Since, the POA is destroyed 00987 // and is released in the complete_destruction_i method, we are 00988 // trying to keep the poa still around by doing a duplicate of 00989 // it. (a hack). 00990 PortableServer::POA_var poa = PortableServer::POA::_duplicate (this); 00991 00992 this->complete_destruction_i (ACE_ENV_SINGLE_ARG_PARAMETER); 00993 ACE_CHECK; 00994 00995 this->adapter_state_ = PortableInterceptor::NON_EXISTENT; 00996 00997 this->adapter_state_changed (my_array_obj_ref_template, 00998 this->adapter_state_ 00999 ACE_ENV_ARG_PARAMETER); 01000 ACE_CHECK; 01001 01002 if (ort_adapter != 0) 01003 { 01004 ort_adapter->release (my_array_obj_ref_template[0]); 01005 01006 TAO::ORT_Adapter_Factory *ort_factory = 01007 this->ORT_adapter_factory (); 01008 01009 ort_factory->destroy (ort_adapter); 01010 01011 this->ort_adapter_ = 0; 01012 } 01013 } 01014 else 01015 { 01016 // Mark that we are ready for destruction. 01017 this->waiting_destruction_ = 1; 01018 } 01019 } |
|
Definition at line 2792 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::thread_strategy(). Referenced by TAO::Portable_Server::Servant_Upcall::single_threaded_poa_setup().
02793 { 02794 return this->active_policy_strategies_.thread_strategy ()->enter(); 02795 } |
|
This method calls IORInterceptor::establish_components() method on all registered IORInterceptors, and IORInterceptor::components_established() once the former is completed. Definition at line 2317 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, TAO_IORInterceptor_Adapter::establish_components(), and TAO_ORB_Core::ior_interceptor_adapter(). Referenced by TAO_Object_Adapter::open().
02318 { 02319 TAO_IORInterceptor_Adapter *ior_adapter = 02320 this->orb_core_.ior_interceptor_adapter (); 02321 02322 if (ior_adapter) 02323 { 02324 ior_adapter->establish_components (this ACE_ENV_ARG_PARAMETER); 02325 ACE_CHECK; 02326 } 02327 } |
|
Definition at line 2800 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::thread_strategy(). Referenced by TAO::Portable_Server::Servant_Upcall::single_threaded_poa_cleanup().
02801 { 02802 return this->active_policy_strategies_.thread_strategy ()->exit(); 02803 } |
|
Definition at line 580 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
00585 { 00586 // Lock access for the duration of this transaction. 00587 TAO_POA_GUARD_RETURN (0); 00588 00589 TAO_Root_POA *poa = this->find_POA_i (adapter_name, 00590 activate_it 00591 ACE_ENV_ARG_PARAMETER); 00592 ACE_CHECK_RETURN (PortableServer::POA::_nil ()); 00593 00594 return PortableServer::POA::_duplicate (poa); 00595 } |
|
Definition at line 600 of file Root_POA.cpp. References ACE_CATCH, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW_RETURN, ACE_TRY_CHECK_EX, ACE_TRY_EX, ACE_TRY_THROW_EX, and CORBA::is_nil(). Referenced by TAO_Object_Adapter::activate_poa().
00605 { 00606 TAO_Root_POA *child = 0; 00607 int result = this->children_.find (child_name, 00608 child); 00609 00610 #if (TAO_HAS_MINIMUM_POA == 0) 00611 00612 if (result != 0) 00613 { 00614 if (activate_it) 00615 { 00616 if (!CORBA::is_nil (this->adapter_activator_.in ())) 00617 { 00618 // Check our state 00619 this->check_state (ACE_ENV_SINGLE_ARG_PARAMETER); 00620 ACE_CHECK_RETURN (0); 00621 00622 CORBA::Boolean success = false; 00623 ACE_TRY_EX (UnknownAdapter) 00624 { 00625 // ATTENTION: Trick locking here, see class header for details 00626 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall ( 00627 *this); 00628 ACE_UNUSED_ARG (non_servant_upcall); 00629 00630 // When unknown_adapter gives a system exception, the POA 00631 // should raise OBJ_ADAPTER with standard minor code 1. 00632 // See 11.3.9.2 of the Corba spec 00633 success = 00634 this->adapter_activator_->unknown_adapter ( 00635 this, 00636 child_name.c_str () 00637 ACE_ENV_ARG_PARAMETER); 00638 ACE_TRY_CHECK_EX (UnknownAdapter); 00639 } 00640 ACE_CATCH (CORBA::SystemException, ex) 00641 { 00642 ACE_TRY_THROW_EX (CORBA::OBJ_ADAPTER (CORBA::OMGVMCID | 1, 00643 CORBA::COMPLETED_NO), 00644 UnknownAdapter); 00645 } 00646 ACE_ENDTRY; 00647 ACE_CHECK_RETURN (0); 00648 00649 if (success) 00650 { 00651 result = this->children_.find (child_name, 00652 child); 00653 } 00654 else 00655 { 00656 result = -1; 00657 } 00658 } 00659 else 00660 { 00661 result = -1; 00662 } 00663 } 00664 else 00665 { 00666 result = -1; 00667 } 00668 } 00669 #else 00670 ACE_UNUSED_ARG (activate_it); 00671 #endif /* TAO_HAS_MINIMUM_POA == 0 */ 00672 00673 if (result == 0) 00674 { 00675 return child; 00676 } 00677 else 00678 { 00679 // Otherwise, the AdapterNonExistent exception is raised. 00680 ACE_THROW_RETURN (PortableServer::POA::AdapterNonExistent (), 00681 0); 00682 } 00683 } |
|
Definition at line 2508 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, active_policy_strategies_, find_servant(), and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy().
02513 { 02514 return this->active_policy_strategies_.servant_retention_strategy()-> 02515 find_servant (system_id, 02516 servant_upcall, 02517 poa_current_impl 02518 ACE_ENV_ARG_PARAMETER); 02519 } |
|
|
Find the the servant with ObjectId , and retrieve its priority.Usually used in RT CORBA with SERVER_DECLARED priority model.
Definition at line 2522 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy().
02526 { 02527 return this->active_policy_strategies_.servant_retention_strategy()-> 02528 find_servant_priority (system_id, 02529 priority 02530 ACE_ENV_ARG_PARAMETER); 02531 } |
|
Definition at line 109 of file Root_POA.inl. Referenced by set_folded_name().
00110 { 00111 return this->folded_name_; 00112 } |
|
Accessor methods to POA state. The POA can be in one of HOLDING, ACTIVE, DISCARDING, INACTIVE and NON_EXISTENT states. |
|
Accessor methods to ObjectReferenceTemplate.
|
|
Accessor methods to ObjectReferenceTemplate, non locked version.
Definition at line 58 of file Root_POA.inl. References TAO::ORT_Adapter::get_adapter_template(), ort_adapter_, and ORT_adapter_i().
00059 { 00060 if (this->ORT_adapter_i ()) 00061 { 00062 return this->ort_adapter_->get_adapter_template (); 00063 } 00064 00065 return 0; 00066 } |
|
Accessor methods to PortableInterceptor::ObjectReferenceFactory.
|
|
Get the set policy of the given type.
Definition at line 2875 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and TAO_POA_Policy_Set::get_policy().
02877 { 02878 return this->policies_.get_policy (policy ACE_ENV_ARG_PARAMETER); 02879 } |
|
Implements PortableServer::POA. Definition at line 2655 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW_RETURN, and TAO_POA_GUARD_RETURN.
02659 { 02660 // Lock access for the duration of this transaction. 02661 TAO_POA_GUARD_RETURN (0); 02662 02663 PortableServer::Servant servant = 02664 this->get_servant_i (ACE_ENV_SINGLE_ARG_PARAMETER); 02665 ACE_CHECK_RETURN (0); 02666 02667 if (servant != 0) 02668 { 02669 // ATTENTION: Trick locking here, see class header for details 02670 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (*this); 02671 ACE_UNUSED_ARG (non_servant_upcall); 02672 02673 // The POA invokes _add_ref once on the Servant before returning 02674 // it. If the application uses reference counting, the caller of 02675 // get_servant is responsible for invoking _remove_ref once on 02676 // the returned Servant when it is finished with it. A 02677 // conforming caller need not invoke _remove_ref on the returned 02678 // Servant if the type of the Servant uses the default reference 02679 // counting inherited from ServantBase. 02680 servant->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER); 02681 ACE_CHECK_RETURN (0); 02682 02683 return servant; 02684 } 02685 else 02686 { 02687 // If no servant has been associated with the POA, the NoServant 02688 // exception is raised. 02689 ACE_THROW_RETURN (PortableServer::POA::NoServant (), 02690 0); 02691 } 02692 } |
|
Definition at line 2646 of file Root_POA.cpp. References ACE_ENV_SINGLE_ARG_PARAMETER.
02649 { 02650 return this->active_policy_strategies_.request_processing_strategy()-> 02651 get_servant (ACE_ENV_SINGLE_ARG_PARAMETER); 02652 } |
|
Implements PortableServer::POA. Definition at line 2620 of file Root_POA.cpp. References ACE_ENV_SINGLE_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
02623 { 02624 // Lock access for the duration of this transaction. 02625 TAO_POA_GUARD_RETURN (PortableServer::ServantManager::_nil ()); 02626 02627 return this->active_policy_strategies_.request_processing_strategy()-> 02628 get_servant_manager (ACE_ENV_SINGLE_ARG_PARAMETER); 02629 } |
|
Definition at line 2719 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::id_assignment_strategy().
02720 { 02721 return this->active_policy_strategies_.id_assignment_strategy ()-> 02722 has_system_id (); 02723 } |
|
Definition at line 1739 of file Root_POA.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
01741 { 01742 CORBA::OctetSeq *id = 0; 01743 ACE_NEW_THROW_EX (id, 01744 CORBA::OctetSeq (this->id_), 01745 CORBA::NO_MEMORY ()); 01746 ACE_CHECK_RETURN (0); 01747 01748 return id; 01749 } |
|
Definition at line 793 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD_RETURN. Referenced by TAO::Portable_Server::POA_Current_Impl::get_reference().
00798 { 00799 // Lock access for the duration of this transaction. 00800 TAO_POA_GUARD_RETURN (0); 00801 00802 return this->id_to_reference_i (oid, true ACE_ENV_ARG_PARAMETER); 00803 } |
|
Definition at line 1727 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER.
01733 { 01734 return this->active_policy_strategies_.servant_retention_strategy()-> 01735 id_to_reference (id, indirect ACE_ENV_ARG_PARAMETER); 01736 } |
|
Definition at line 779 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
00784 { 00785 // Lock access for the duration of this transaction. 00786 TAO_POA_GUARD_RETURN (0); 00787 00788 return this->id_to_servant_i (oid 00789 ACE_ENV_ARG_PARAMETER); 00790 } |
|
Definition at line 1683 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_PARAMETER.
01688 { 01689 01690 PortableServer::Servant servant = 01691 this->active_policy_strategies_.request_processing_strategy()-> 01692 id_to_servant (id ACE_ENV_ARG_PARAMETER); 01693 ACE_CHECK_RETURN (0); 01694 01695 if (servant != 0) 01696 { 01697 // ATTENTION: Trick locking here, see class header for details 01698 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (*this); 01699 ACE_UNUSED_ARG (non_servant_upcall); 01700 01701 // The POA invokes _add_ref once on the Servant before returning 01702 // it. If the application uses reference counting, the caller of 01703 // id_to_servant is responsible for invoking _remove_ref once on 01704 // the returned Servant when it is finished with it. A 01705 // conforming caller need not invoke _remove_ref on the returned 01706 // Servant if the type of the Servant uses the default reference 01707 // counting inherited from ServantBase. 01708 servant->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER); 01709 ACE_CHECK_RETURN (0); 01710 } 01711 01712 return servant; 01713 } |
|
Gets the value of TAO_POA_Static_Resources::imr_client_adapter_name_.
Definition at line 2901 of file Root_POA.cpp. References TAO_POA_Static_Resources::imr_client_adapter_name_, and TAO_POA_Static_Resources::instance().
02902 { 02903 return TAO_POA_Static_Resources::instance ()->imr_client_adapter_name_.c_str(); 02904 } |
|
Sets the value of TAO_POA_Static_Resources::imr_client_adapter_name_.
Definition at line 2895 of file Root_POA.cpp. References TAO_POA_Static_Resources::imr_client_adapter_name_, and TAO_POA_Static_Resources::instance().
02896 { 02897 TAO_POA_Static_Resources::instance ()->imr_client_adapter_name_ = name; 02898 } |
|
Definition at line 205 of file Root_POA.inl. References outstanding_requests_. Referenced by TAO::Portable_Server::Servant_Upcall::prepare_for_upcall_i().
00206 { 00207 return ++this->outstanding_requests_; 00208 } |
|
Definition at line 2118 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, TAO_Root_POA::Key_To_Object_Params::collocated_, create_object_key(), TAO_Root_POA::Key_To_Object_Params::indirect_, key_to_object(), key_to_object_params_, TAO_Root_POA::Key_To_Object_Params::priority_, TAO_Root_POA::Key_To_Object_Params::servant_, TAO_Root_POA::Key_To_Object_Params::system_id_, and TAO_Root_POA::Key_To_Object_Params::type_id_.
02119 { 02120 PortableServer::ObjectId_var &system_id = 02121 *this->key_to_object_params_.system_id_; 02122 02123 // Create object key. 02124 TAO::ObjectKey_var key = 02125 this->create_object_key (system_id.in ()); 02126 02127 return this->key_to_object (key.in (), 02128 this->key_to_object_params_.type_id_, 02129 this->key_to_object_params_.servant_, 02130 this->key_to_object_params_.collocated_, 02131 this->key_to_object_params_.priority_, 02132 this->key_to_object_params_.indirect_ 02133 ACE_ENV_ARG_PARAMETER); 02134 } |
|
Definition at line 1455 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_PARAMETER.
01459 { 01460 const PortableInterceptor::ObjectId &user_oid = 01461 reinterpret_cast <const PortableInterceptor::ObjectId &>(id); 01462 01463 // Ask the ORT to create the object. 01464 if (this->ORT_adapter_i ()) 01465 { 01466 // Ask the ORT to create the object. 01467 return this->ort_adapter_->make_object (repository_id, 01468 user_oid 01469 ACE_ENV_ARG_PARAMETER); 01470 } 01471 else 01472 { 01473 return this->invoke_key_to_object (ACE_ENV_SINGLE_ARG_PARAMETER); 01474 } 01475 } |
|
Definition at line 1418 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(). Referenced by set_id().
01419 { 01420 return active_policy_strategies_.lifespan_strategy()->is_persistent (); 01421 } |
|
Definition at line 1581 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_SINGLE_ARG_PARAMETER, parse_key(), TAO_Object_Adapter::poa_name, root(), system_id(), system_name(), and validate_lifespan().
01584 { 01585 TAO::ObjectKey_var key = reference->_key (ACE_ENV_SINGLE_ARG_PARAMETER); 01586 ACE_CHECK_RETURN (false); 01587 01588 TAO_Object_Adapter::poa_name poa_system_name; 01589 CORBA::Boolean is_root = false; 01590 CORBA::Boolean is_persistent = false; 01591 CORBA::Boolean is_system_id = false; 01592 TAO::Portable_Server::Temporary_Creation_Time poa_creation_time; 01593 01594 int const result = this->parse_key (key.in (), 01595 poa_system_name, 01596 system_id, 01597 is_root, 01598 is_persistent, 01599 is_system_id, 01600 poa_creation_time); 01601 if (result != 0 || 01602 !this->root () && 01603 poa_system_name != this->system_name () || 01604 is_root != this->root () || 01605 is_system_id != this->system_id () || 01606 !this->validate_lifespan (is_persistent, poa_creation_time)) 01607 { 01608 // The passed reference is NOT generated by this POA 01609 return false; 01610 } 01611 else 01612 { 01613 // The passed reference is generated by this POA 01614 return true; 01615 } 01616 } |
|
Definition at line 2039 of file Root_POA.cpp. References ACE_OS::strncmp().
02040 { 02041 #if defined (POA_NAME_IN_POA_GENERATED_ID) 02042 02043 // Grab the buffer 02044 const char *id_buffer = (const char *) id.get_buffer (); 02045 02046 // Check to see if the POA name is the first part of the id 02047 return 02048 this->name_.length () < id.length () && 02049 ACE_OS::strncmp (id_buffer, 02050 this->name_.c_str (), 02051 this->name_.length ()) == 0; 02052 #else /* POA_NAME_IN_POA_GENERATED_ID */ 02053 02054 ACE_UNUSED_ARG (id); 02055 return 1; 02056 02057 #endif /* POA_NAME_IN_POA_GENERATED_ID */ 02058 } |
|
Definition at line 2711 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::id_uniqueness_strategy(). Referenced by TAO::Portable_Server::RequestProcessingStrategyServantActivator::locate_servant().
02713 { 02714 return this->active_policy_strategies_.id_uniqueness_strategy ()-> 02715 is_servant_activation_allowed (servant, wait_occurred_restart_call); 02716 } |
|
Definition at line 2776 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by TAO::Portable_Server::IdUniquenessStrategyUnique::is_servant_activation_allowed().
02779 { 02780 return this->active_policy_strategies_.servant_retention_strategy ()-> 02781 is_servant_in_map (servant, wait_occurred_restart_call); 02782 } |
|
Wrapper for the ORB's key_to_object that will alter the object pointer if the ImplRepo is used. Definition at line 2137 of file Root_POA.cpp. References CORBA::Object::_nil(), ACE_CHECK_RETURN, ACE_CString, ACE_DEBUG, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_ERROR, ACE_NEW_THROW_EX, ACE_TEXT_CHAR_TO_TCHAR, active_policy_strategies_, TAO_ORB_Core::check_shutdown(), TAO::ObjectKey::encode_sequence_to_string(), TAO_ORB_Core::implrepo_service(), TAO_ORB_Core::imr_endpoints_in_ior(), CORBA::Object::ior(), CORBA::is_nil(), key_to_stub_i(), TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(), LM_DEBUG, LM_ERROR, TAO_ORB_Core::optimize_collocation_objects(), TAO_ORB_Core::orb(), orb_core(), TAO_Stub_Auto_Ptr::release(), TAO_Stub::servant_orb(), ACE_OS::strchr(), ACE_OS::strstr(), and TAO_debug_level. Referenced by invoke_key_to_object().
02144 { 02145 // Check if the ORB is still running, otherwise throw an exception. 02146 // @@ What if the ORB was destroyed? In that case we shouldn't even 02147 // get here! 02148 this->orb_core_.check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); 02149 ACE_CHECK_RETURN (0); 02150 02151 // 02152 // ImplRepo related. 02153 // 02154 #if (TAO_HAS_MINIMUM_CORBA == 0) 02155 02156 CORBA::Object_ptr obj = CORBA::Object::_nil (); 02157 02158 if (indirect && this->active_policy_strategies_.lifespan_strategy()->use_imr () 02159 && this->orb_core ().imr_endpoints_in_ior ()) 02160 { 02161 // Check to see if we alter the IOR. 02162 CORBA::Object_var imr = 02163 this->orb_core ().implrepo_service (); 02164 02165 if (CORBA::is_nil (imr.in ()) 02166 || !imr->_stubobj () 02167 || !imr->_stubobj ()->profile_in_use ()) 02168 { 02169 if (TAO_debug_level > 1) 02170 { 02171 ACE_DEBUG ((LM_DEBUG, 02172 "Missing ImR IOR, will not use the ImR\n")); 02173 } 02174 goto orbkey; 02175 } 02176 02177 CORBA::String_var imr_str = 02178 imr->_stubobj ()->profile_in_use ()->to_string (ACE_ENV_SINGLE_ARG_PARAMETER); 02179 ACE_CHECK_RETURN (obj); 02180 02181 if (TAO_debug_level > 0) 02182 ACE_DEBUG ((LM_DEBUG, 02183 "IMR IOR = \n%s\n", 02184 ACE_TEXT_CHAR_TO_TCHAR (imr_str.in ()))); 02185 02186 // Search for "corbaloc:" alone, without the protocol. This code 02187 // should be protocol neutral. 02188 const char corbaloc[] = "corbaloc:"; 02189 char *pos = ACE_OS::strstr (imr_str.inout (), corbaloc); 02190 pos = ACE_OS::strchr (pos + sizeof (corbaloc), ':'); 02191 02192 pos = ACE_OS::strchr (pos + 1, 02193 imr->_stubobj ()->profile_in_use ()->object_key_delimiter ()); 02194 02195 if (pos) 02196 pos[1] = 0; // Crop the string. 02197 else 02198 { 02199 if (TAO_debug_level > 0) 02200 ACE_ERROR ((LM_ERROR, 02201 "Could not parse ImR IOR, skipping ImRification\n")); 02202 goto orbkey; 02203 } 02204 02205 ACE_CString ior (imr_str.in ()); 02206 02207 // Add the key. 02208 02209 CORBA::String_var key_str; 02210 TAO::ObjectKey::encode_sequence_to_string (key_str.inout (), key); 02211 02212 ior += key_str.in (); 02213 02214 if (TAO_debug_level > 0) 02215 ACE_DEBUG ((LM_DEBUG, 02216 "ImR-ified IOR = \n%s\n", 02217 ACE_TEXT_CHAR_TO_TCHAR (ior.c_str ()))); 02218 02219 obj = 02220 this->orb_core_.orb ()->string_to_object (ior.c_str () 02221 ACE_ENV_ARG_PARAMETER); 02222 ACE_CHECK_RETURN (obj); 02223 02224 return obj; 02225 } 02226 02227 orbkey: 02228 02229 #else 02230 ACE_UNUSED_ARG (indirect); 02231 #endif /* TAO_HAS_MINIMUM_CORBA */ 02232 02233 TAO_Stub *data = 02234 this->key_to_stub_i (key, type_id, priority ACE_ENV_ARG_PARAMETER); 02235 ACE_CHECK_RETURN (CORBA::Object::_nil ()); 02236 02237 TAO_Stub_Auto_Ptr safe_data (data); 02238 02239 CORBA::Object_ptr tmp; 02240 02241 if (this->orb_core_.optimize_collocation_objects ()) 02242 { 02243 ACE_NEW_THROW_EX (tmp, CORBA::Object (data, 02244 collocated, 02245 servant), 02246 CORBA::INTERNAL ()); 02247 02248 ACE_CHECK_RETURN (CORBA::Object::_nil ()); 02249 } 02250 else 02251 { 02252 ACE_NEW_THROW_EX (tmp, 02253 CORBA::Object (data, 02254 collocated), 02255 CORBA::INTERNAL ()); 02256 ACE_CHECK_RETURN (CORBA::Object::_nil ()); 02257 } 02258 02259 data->servant_orb (this->orb_core_.orb ()); 02260 02261 // Transfer ownership to the Object. 02262 (void) safe_data.release (); 02263 02264 return tmp; 02265 } |
|
Create the correct stub, properly initialized with the attributes and policies attached to the current POA. Definition at line 2268 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, TAO_ORB_Core::check_shutdown(), and key_to_stub_i().
02272 { 02273 // Check if the ORB is still running, otherwise throw an exception. 02274 // @@ What if the ORB was destroyed? In that case we shouldn't even 02275 // get here! 02276 this->orb_core_.check_shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); 02277 ACE_CHECK_RETURN (0); 02278 02279 return this->key_to_stub_i (key, type_id, priority ACE_ENV_ARG_PARAMETER); 02280 } |
|
Like key_to_stub() but assume that the ORB is not shutting down.
Definition at line 2283 of file Root_POA.cpp. References TAO_Thread_Lane_Resources::acceptor_registry(), ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, client_exposed_policies(), TAO_Acceptor_Filter_Factory::create_object(), create_stub_object(), filter_factory_, ACE_Dynamic_Service< TYPE >::instance(), and TAO_ORB_Core::lane_resources(). Referenced by key_to_object(), and key_to_stub().
02287 { 02288 CORBA::PolicyList_var client_exposed_policies = 02289 this->client_exposed_policies (priority 02290 ACE_ENV_ARG_PARAMETER); 02291 ACE_CHECK_RETURN (0); 02292 02293 if (this->filter_factory_ == 0) 02294 this->filter_factory_ 02295 = ACE_Dynamic_Service<TAO_Acceptor_Filter_Factory>::instance ("TAO_Acceptor_Filter_Factory"); 02296 02297 TAO_Acceptor_Filter* filter = 02298 this->filter_factory_->create_object (this->poa_manager_); 02299 02300 // Give ownership to the auto pointer. 02301 auto_ptr<TAO_Acceptor_Filter> new_filter (filter); 02302 02303 TAO_Stub *data = 02304 this->create_stub_object ( 02305 key, 02306 type_id, 02307 client_exposed_policies._retn (), 02308 filter, 02309 this->orb_core_.lane_resources ().acceptor_registry () 02310 ACE_ENV_ARG_PARAMETER); 02311 ACE_CHECK_RETURN (0); 02312 02313 return data; 02314 } |
|
Definition at line 1752 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy().
01758 { 01759 return this->active_policy_strategies_.request_processing_strategy()-> 01760 locate_servant (operation, 01761 system_id, 01762 servant_upcall, 01763 poa_current_impl, 01764 wait_occurred_restart_call 01765 ACE_ENV_ARG_PARAMETER); 01766 } |
|
Definition at line 2490 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(). Referenced by TAO_Object_Adapter::find_servant_i(), TAO_Object_Adapter::locate_servant_i(), and TAO::Portable_Server::Servant_Upcall::prepare_for_upcall_i().
02493 { 02494 return this->active_policy_strategies_.request_processing_strategy()-> 02495 locate_servant (system_id, servant ACE_ENV_ARG_PARAMETER); 02496 } |
|
Definition at line 17 of file Root_POA.inl.
00018 { 00019 return this->lock_; 00020 } |
|
Definition at line 96 of file Root_POA.inl. Referenced by TAO_Object_Adapter::activate_poa().
00097 { 00098 return this->name_; 00099 } |
|
Definition at line 121 of file Root_POA.inl. Referenced by TAO_Object_Adapter::poa_name_iterator::operator++(), and set_folded_name().
00122 { 00123 return '\0'; 00124 } |
|
Definition at line 127 of file Root_POA.inl. Referenced by TAO_Object_Adapter::poa_name_iterator::operator *(), and set_folded_name().
00128 { 00129 return sizeof (char); 00130 } |
|
Template method for creating new POA's of this type.
Definition at line 461 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_NEW_THROW_EX, PortableServer::POAManager_ptr, and String.
00470 { 00471 TAO_Regular_POA *poa = 0; 00472 00473 ACE_NEW_THROW_EX (poa, 00474 TAO_Regular_POA (name, 00475 poa_manager, 00476 policies, 00477 parent, 00478 lock, 00479 thread_lock, 00480 orb_core, 00481 object_adapter 00482 ACE_ENV_ARG_PARAMETER), 00483 CORBA::NO_MEMORY ()); 00484 ACE_CHECK_RETURN (0); 00485 00486 return poa; 00487 } |
|
Definition at line 175 of file Root_POA.inl. Referenced by parse_key(), TAO_Regular_POA::root_key_type(), and set_id().
00176 { 00177 return 'N'; 00178 } |
|
Definition at line 2112 of file Root_POA.cpp. Referenced by complete_destruction_i(), TAO::Portable_Server::ServantRetentionStrategyRetain::is_servant_in_map(), TAO::Portable_Server::ServantRetentionStrategyRetain::is_user_id_in_map(), TAO::Portable_Server::RequestProcessingStrategyServantLocator::locate_servant(), TAO_Root_POA(), and wait_for_completions().
02113 { 02114 return *this->object_adapter_; 02115 } |
|
ORB Core for POA.
Reimplemented from CORBA::Object. Definition at line 223 of file Root_POA.inl. Referenced by key_to_object(), TAO::Portable_Server::POA_Current_Impl::orb_core(), and TAO::Portable_Server::LifespanStrategyPersistent::strategy_init().
00224 { 00225 return this->orb_core_; 00226 } |
|
Get the ORT adapter, in case there is no adapter yet, this method will try to create one and hold the POA lock Definition at line 2822 of file Root_POA.cpp. References TAO_POA_GUARD_RETURN. Referenced by set_obj_ref_factory().
02824 { 02825 if (this->ort_adapter_ != 0) 02826 return this->ort_adapter_; 02827 02828 // Lock access for the duration of this transaction. 02829 TAO_POA_GUARD_RETURN (0); 02830 02831 // DCL .. 02832 if (this->ort_adapter_ != 0) 02833 return this->ort_adapter_; 02834 02835 return this->ORT_adapter_i (); 02836 } |
|
Definition at line 2534 of file Root_POA.cpp. References TAO_ORB_Core::configuration(), and ort_adapter_factory_name(). Referenced by ORT_adapter_i().
02535 { 02536 return ACE_Dynamic_Service<TAO::ORT_Adapter_Factory>::instance 02537 (orb_core_.configuration (), 02538 TAO_Root_POA::ort_adapter_factory_name ()); 02539 } |
|
Definition at line 2889 of file Root_POA.cpp. References TAO_POA_Static_Resources::instance(), and TAO_POA_Static_Resources::ort_adapter_factory_name_. Referenced by ORT_adapter_factory().
02890 { 02891 return TAO_POA_Static_Resources::instance ()->ort_adapter_factory_name_.c_str(); 02892 } |
|
Definition at line 2868 of file Root_POA.cpp. References TAO_POA_Static_Resources::instance(), and TAO_POA_Static_Resources::ort_adapter_factory_name_.
02869 { 02870 TAO_POA_Static_Resources::instance ()->ort_adapter_factory_name_ = 02871 name; 02872 } |
|
Get the ORT adapter, in case there is no adapter yet, this method will try to create one but assumes the POA lock is already hold Definition at line 2542 of file Root_POA.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_PRINT_EXCEPTION, ACE_TRY, ACE_TRY_CHECK, TAO::ORT_Adapter::activate(), adapter_name(), adapter_name_i(), TAO::ORT_Adapter_Factory::create(), TAO_ORB_Core::orbid(), ort_adapter_, and ORT_adapter_factory(). Referenced by destroy_i(), and get_adapter_template_i().
02543 { 02544 if (this->ort_adapter_ != 0) 02545 return this->ort_adapter_; 02546 02547 ACE_DECLARE_NEW_CORBA_ENV; 02548 ACE_TRY 02549 { 02550 TAO::ORT_Adapter_Factory * ort_ap_factory = 02551 this->ORT_adapter_factory (); 02552 02553 if (!ort_ap_factory) 02554 return 0; 02555 02556 // Get the full adapter name of this POA, do this before we 02557 // create the adapter so that in case this fails, we just 02558 // return 0 and not a not activated adapter 02559 PortableInterceptor::AdapterName *adapter_name = 02560 this->adapter_name_i (ACE_ENV_SINGLE_ARG_PARAMETER); 02561 ACE_TRY_CHECK; 02562 02563 this->ort_adapter_ = 02564 ort_ap_factory->create (); 02565 02566 if (!this->ort_adapter_) 02567 return 0; 02568 02569 // @todo We have to look at this, we activate it but hold the POA lock, 02570 // in case we are called by ORT_adapter, we shouldn't keep the lock 02571 // here, but then the ort_adapter should be guarded against multiple 02572 // activations. 02573 this->ort_adapter_->activate (this->orb_core_.server_id (), 02574 this->orb_core_.orbid (), 02575 adapter_name, 02576 this 02577 ACE_ENV_ARG_PARAMETER); 02578 ACE_TRY_CHECK; 02579 } 02580 ACE_CATCHANY 02581 { 02582 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, 02583 "(%P|%t) Cannot initialize the " 02584 "object_reference_template_adapter\n"); 02585 } 02586 ACE_ENDTRY; 02587 ACE_CHECK_RETURN (0); 02588 02589 return this->ort_adapter_; 02590 } |
|
Definition at line 199 of file Root_POA.inl. References outstanding_requests_.
00200 { 00201 this->outstanding_requests_ = new_outstanding_requests; 00202 } |
|
Definition at line 193 of file Root_POA.inl. References outstanding_requests_. Referenced by TAO::Portable_Server::Non_Servant_Upcall::~Non_Servant_Upcall().
00194 { 00195 return this->outstanding_requests_; 00196 } |
|
Calls protected static method used when POACurrent is not appropriate.
Definition at line 2093 of file Root_POA.cpp. References parse_key(), and TAO_Object_Adapter::poa_name.
02095 { 02096 TAO_Object_Adapter::poa_name poa_system_name; 02097 CORBA::Boolean is_root = false; 02098 CORBA::Boolean is_persistent = false; 02099 CORBA::Boolean is_system_id = false; 02100 TAO::Portable_Server::Temporary_Creation_Time poa_creation_time; 02101 02102 return TAO_Root_POA::parse_key (object_key, 02103 poa_system_name, 02104 user_id, 02105 is_root, 02106 is_persistent, 02107 is_system_id, 02108 poa_creation_time); 02109 } |
|
Definition at line 1770 of file Root_POA.cpp. References ACE_NTOHL, TAO::Portable_Server::Temporary_Creation_Time::creation_time(), TAO::Portable_Server::Creation_Time::creation_time_length(), TAO::unbounded_value_sequence< T >::get_buffer(), TAO::unbounded_value_sequence< T >::length(), ACE_OS::memcpy(), non_root_key_char(), persistent_key_char(), persistent_key_type_length(), TAO_Object_Adapter::poa_name, root_key_char(), root_key_type_length(), system_id_key_char(), system_id_key_type_length(), TAO_Active_Object_Map::system_id_size(), TAO_OBJECTKEY_PREFIX_SIZE, transient_key_char(), TAO_Object_Adapter::transient_poa_name_size(), and user_id_key_char(). Referenced by is_poa_generated(), TAO_Object_Adapter::locate_poa(), and parse_ir_object_key().
01777 { 01778 // Start at zero. 01779 CORBA::ULong starting_at = 0; 01780 01781 // Get the object key octets. 01782 const CORBA::Octet *key_data = key.get_buffer (); 01783 01784 // Skip the object key prefix since we have already checked for this. 01785 starting_at += TAO_OBJECTKEY_PREFIX_SIZE; 01786 01787 // Check the root indicator. 01788 char root_key_type = key_data[starting_at]; 01789 if (root_key_type == TAO_Root_POA::root_key_char ()) 01790 { 01791 is_root = true; 01792 } 01793 else if (root_key_type == TAO_Root_POA::non_root_key_char ()) 01794 { 01795 is_root = false; 01796 } 01797 else 01798 { 01799 // Incorrect key 01800 return -1; 01801 } 01802 01803 // Skip past the system id indicator 01804 starting_at += TAO_Root_POA::root_key_type_length (); 01805 01806 // Check the system id indicator. 01807 char system_id_key_type = key_data[starting_at]; 01808 if (system_id_key_type == TAO_Root_POA::system_id_key_char ()) 01809 { 01810 is_system_id = true; 01811 } 01812 else if (system_id_key_type == TAO_Root_POA::user_id_key_char ()) 01813 { 01814 is_system_id = false; 01815 } 01816 else 01817 { 01818 // Incorrect key 01819 return -1; 01820 } 01821 01822 // Skip past the system id indicator 01823 starting_at += TAO_Root_POA::system_id_key_type_length (); 01824 01825 // Check the persistence indicator 01826 char persistent_key_type = key_data[starting_at]; 01827 if (persistent_key_type == TAO_Root_POA::persistent_key_char ()) 01828 { 01829 is_persistent = true; 01830 } 01831 else if (persistent_key_type == TAO_Root_POA::transient_key_char ()) 01832 { 01833 is_persistent = false; 01834 } 01835 else 01836 { 01837 // Incorrect key 01838 return -1; 01839 } 01840 01841 // Skip past the persistent indicator 01842 starting_at += TAO_Root_POA::persistent_key_type_length (); 01843 01844 #if (POA_NO_TIMESTAMP == 0) 01845 // Grab the timestamp for transient POAs. 01846 if (!is_persistent) 01847 { 01848 // Take the creation time for the timestamp 01849 poa_creation_time.creation_time (key_data + starting_at); 01850 01851 // Skip past the timestamp 01852 starting_at += TAO::Portable_Server::Creation_Time::creation_time_length (); 01853 } 01854 #else 01855 ACE_UNUSED_ARG (poa_creation_time); 01856 #endif /* POA_NO_TIMESTAMP */ 01857 01858 // Calculate the size of the POA name. 01859 CORBA::ULong poa_name_size = 0; 01860 if (!is_persistent) 01861 { 01862 // Transient POAs have fixed size. 01863 poa_name_size = TAO_Object_Adapter::transient_poa_name_size (); 01864 } 01865 else if (is_system_id) 01866 { 01867 // System ids have fixed size. 01868 poa_name_size = static_cast <CORBA::ULong> 01869 (key.length () - starting_at - 01870 TAO_Active_Object_Map::system_id_size ()); 01871 } 01872 else 01873 { 01874 // Get the size from the object key. 01875 ACE_OS::memcpy (&poa_name_size, 01876 key_data + starting_at, 01877 sizeof (poa_name_size)); 01878 poa_name_size = ACE_NTOHL (poa_name_size); 01879 01880 starting_at += sizeof (poa_name_size); 01881 } 01882 01883 // Grep the name if there is a name 01884 if (!is_root) 01885 { 01886 poa_system_name.replace (poa_name_size, 01887 poa_name_size, 01888 (CORBA::Octet *) key_data + starting_at, 01889 0); 01890 01891 starting_at += poa_name_size; 01892 } 01893 01894 // The rest is the system id. 01895 CORBA::ULong system_id_size = key.length () - starting_at; 01896 01897 // Reset <system_id>. 01898 system_id.length (system_id_size); 01899 CORBA::Octet * buf = system_id.get_buffer (); 01900 ACE_OS::memcpy (buf, key_data + starting_at, system_id_size); 01901 01902 // Success 01903 return 0; 01904 } |
|
Definition at line 90 of file Root_POA.inl. References TAO::Portable_Server::Cached_Policies::lifespan(). Referenced by TAO_Object_Adapter::bind_poa(), and TAO_Object_Adapter::unbind_poa().
00091 { 00092 return (this->cached_policies_.lifespan () == PortableServer::PERSISTENT); 00093 } |
|
Definition at line 133 of file Root_POA.inl. Referenced by parse_key().
00134 { 00135 return 'P'; 00136 } |
|
Definition at line 145 of file Root_POA.inl. Referenced by parse_key().
00146 { 00147 return sizeof (char); 00148 } |
|
Hook - The POA has been (or is being) activated. These hooks are needed by the CSD strategy to override and no-ops by default. Definition at line 2964 of file Root_POA.cpp.
02965 { 02966 } |
|
Hook - The POA has been deactivated.
Definition at line 2969 of file Root_POA.cpp. Referenced by TAO_POA_Manager::deactivate_i().
02970 { 02971 } |
|
Accessor for POA policies.
Definition at line 23 of file Root_POA.inl.
00024 { 00025 return this->policies_; 00026 } |
|
Definition at line 2761 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(). Referenced by TAO::Portable_Server::Servant_Upcall::post_invoke_servant_cleanup().
02764 { 02765 this->active_policy_strategies_.request_processing_strategy ()-> 02766 post_invoke_servant_cleanup (system_id, servant_upcall); 02767 } |
|
Definition at line 2785 of file Root_POA.cpp. References TAO::Portable_Server::Cached_Policies::priority_model().
02786 { 02787 return cached_policies_.priority_model (); 02788 } |
|
Definition at line 2726 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy().
02731 { 02732 return this->active_policy_strategies_.servant_retention_strategy ()-> 02733 rebind_using_user_id_and_system_id (servant, 02734 user_id, 02735 system_id, 02736 servant_upcall); 02737 } |
|
Definition at line 1619 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, CORBA::is_nil(), and TAO_POA_GUARD_RETURN.
01624 { 01625 // Make sure that the reference is valid. 01626 if (CORBA::is_nil (reference)) 01627 { 01628 ACE_THROW_RETURN (CORBA::BAD_PARAM (), 01629 0); 01630 } 01631 01632 // The WrongPolicy exception is declared to allow future extensions. 01633 01634 // This operation is valid only if the reference was created by the 01635 // POA on which the operation is being performed. If the object 01636 // reference was not created by this POA, the WrongAdapter exception 01637 // is raised. 01638 PortableServer::ObjectId system_id; 01639 bool const is_generated = this->is_poa_generated (reference, 01640 system_id 01641 ACE_ENV_ARG_PARAMETER); 01642 ACE_CHECK_RETURN (0); 01643 01644 if (!is_generated) 01645 { 01646 ACE_THROW_RETURN (PortableServer::POA::WrongAdapter (), 01647 0); 01648 } 01649 01650 // Lock access for the duration of this transaction. 01651 TAO_POA_GUARD_RETURN (0); 01652 01653 return this->active_policy_strategies_.servant_retention_strategy()-> 01654 system_id_to_object_id (system_id ACE_ENV_ARG_PARAMETER); 01655 } |
|
Definition at line 740 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
00746 { 00747 // Lock access for the duration of this transaction. 00748 TAO_POA_GUARD_RETURN (0); 00749 00750 return this->reference_to_servant_i (reference 00751 ACE_ENV_ARG_PARAMETER); 00752 } |
|
Definition at line 1528 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_THROW_RETURN, and CORBA::is_nil().
01534 { 01535 // Make sure that the reference is valid. 01536 if (CORBA::is_nil (reference)) 01537 { 01538 ACE_THROW_RETURN (CORBA::BAD_PARAM (), 01539 0); 01540 } 01541 01542 PortableServer::ObjectId system_id; 01543 bool const is_generated = 01544 this->is_poa_generated (reference, system_id ACE_ENV_ARG_PARAMETER); 01545 ACE_CHECK_RETURN (0); 01546 01547 if (!is_generated) 01548 { 01549 // In case this object reference is not generated by this POA throw 01550 // an exception 01551 ACE_THROW_RETURN (PortableServer::POA::WrongAdapter (), 01552 0); 01553 } 01554 01555 PortableServer::Servant servant = 01556 this->active_policy_strategies_.request_processing_strategy()-> 01557 system_id_to_servant (system_id ACE_ENV_ARG_PARAMETER); 01558 ACE_CHECK_RETURN (0); 01559 01560 if (servant != 0) 01561 { 01562 // ATTENTION: Trick locking here, see class header for details 01563 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (*this); 01564 ACE_UNUSED_ARG (non_servant_upcall); 01565 01566 // The POA invokes _add_ref once on the Servant before returning 01567 // it. If the application uses reference counting, the caller of 01568 // id_to_servant is responsible for invoking _remove_ref once on 01569 // the returned Servant when it is finished with it. A 01570 // conforming caller need not invoke _remove_ref on the returned 01571 // Servant if the type of the Servant uses the default reference 01572 // counting inherited from ServantBase. 01573 servant->_add_ref (ACE_ENV_SINGLE_ARG_PARAMETER); 01574 ACE_CHECK_RETURN (0); 01575 } 01576 01577 return servant; 01578 } |
|
Reimplemented in TAO_Regular_POA. Definition at line 840 of file Root_POA.cpp.
00841 {
00842 // The root poa has no parent, so this is a noop
00843 }
|
|
Reimplemented in TAO_Regular_POA. Definition at line 2816 of file Root_POA.cpp. Referenced by is_poa_generated().
02817 { 02818 return true; 02819 } |
|
Definition at line 169 of file Root_POA.inl. Referenced by parse_key(), root_key_type(), and set_id().
00170 { 00171 return 'R'; 00172 } |
|
Reimplemented in TAO_Regular_POA. Definition at line 181 of file Root_POA.inl. References root_key_char(). Referenced by TAO_Regular_POA::root_key_type().
00182 { 00183 return TAO_Root_POA::root_key_char (); 00184 } |
|
Definition at line 187 of file Root_POA.inl. Referenced by parse_key(), and set_id().
00188 { 00189 return sizeof (char); 00190 } |
|
Store the given TaggedComponent for eventual insertion into all object reference profiles. Definition at line 2344 of file Root_POA.cpp. References TAO::unbounded_value_sequence< TaggedComponent >::length(), and tagged_component_.
02346 { 02347 const CORBA::ULong old_len = this->tagged_component_.length (); 02348 02349 this->tagged_component_.length (old_len + 1); 02350 this->tagged_component_[old_len] = component; 02351 } |
|
Store the given TaggedComponent for eventual insertion into all object reference profiles with the given ProfileId. Definition at line 2355 of file Root_POA.cpp. References TAO::unbounded_value_sequence< TaggedComponent >::length(), profile_id_array_, and tagged_component_id_.
02358 { 02359 // The length of this->tagged_component_id_ is the same as the 02360 // length of the profile_id_array_ since we are trying to make a 02361 // one-to-one link between these two arrays. So, whenever 02362 // this->tagged_component_id_ is increased, we need to increase the 02363 // size of this->profile_id_array_ also. 02364 02365 CORBA::ULong const old_len = this->tagged_component_id_.length (); 02366 02367 CORBA::ULong const new_len = old_len + 1; 02368 02369 this->tagged_component_id_.length (new_len); 02370 this->tagged_component_id_[old_len] = component; 02371 02372 this->profile_id_array_.size (new_len); 02373 this->profile_id_array_[old_len] = profile_id; 02374 } |
|
Hook - A servant has been activated.
Definition at line 2974 of file Root_POA.cpp.
02977 { 02978 } |
|
Hook - A servant has been deactivated.
Definition at line 2981 of file Root_POA.cpp. Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::deactivate_map_entry().
02984 { 02985 } |
|
Definition at line 241 of file Root_POA.inl. References servant_deactivation_condition_. Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::is_servant_in_map(), and TAO::Portable_Server::ServantRetentionStrategyRetain::is_user_id_in_map().
00242 { 00243 return servant_deactivation_condition_; 00244 } |
|
Definition at line 2740 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by TAO::Portable_Server::RequestProcessingStrategyServantActivator::etherealize_servant().
02741 { 02742 return this->active_policy_strategies_.servant_retention_strategy ()-> 02743 servant_has_remaining_activations (servant); 02744 } |
|
Definition at line 2499 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by TAO::Portable_Server::RequestProcessingStrategyServantLocator::locate_servant(), TAO::Portable_Server::RequestProcessingStrategyServantActivator::locate_servant(), TAO::Portable_Server::RequestProcessingStrategyDefaultServant::locate_servant(), and TAO::Portable_Server::RequestProcessingStrategyAOMOnly::locate_servant().
02502 { 02503 return this->active_policy_strategies_.servant_retention_strategy()-> 02504 servant_present (system_id, servant ACE_ENV_ARG_PARAMETER); 02505 } |
|
Definition at line 713 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
00718 { 00719 // If we had upgradeable locks, this would initially be a read lock 00720 // 00721 // Lock access for the duration of this transaction. 00722 TAO_POA_GUARD_RETURN (0); 00723 00724 return this->servant_to_id_i (servant 00725 ACE_ENV_ARG_PARAMETER); 00726 } |
|
Definition at line 1506 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER.
01511 { 01512 return this->active_policy_strategies_.request_processing_strategy()-> 01513 servant_to_id (servant ACE_ENV_ARG_PARAMETER); 01514 } |
|
Definition at line 755 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
00760 { 00761 TAO_POA_GUARD_RETURN (CORBA::Object::_nil ()); 00762 00763 return this->servant_to_reference_i (servant 00764 ACE_ENV_ARG_PARAMETER); 00765 } |
|
Definition at line 1517 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER.
01522 { 01523 return this->active_policy_strategies_.servant_retention_strategy()-> 01524 servant_to_reference (servant ACE_ENV_ARG_PARAMETER); 01525 } |
|
Definition at line 729 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER.
00734 { 00735 return this->active_policy_strategies_.servant_retention_strategy()-> 00736 servant_to_user_id (servant ACE_ENV_ARG_PARAMETER); 00737 } |
|
Definition at line 2770 of file Root_POA.cpp. References TAO::Portable_Server::Cached_Policies::server_priority().
02771 { 02772 return this->cached_policies_.server_priority (); 02773 } |
|
Definition at line 2839 of file Root_POA.cpp.
02840 {
02841 return 0;
02842 }
|
|
Definition at line 2061 of file Root_POA.cpp. References folded_name(), ACE_OS::memcpy(), name_separator(), and name_separator_length(). Referenced by TAO_Root_POA().
02062 { 02063 size_t length = 0; 02064 size_t parent_length = 0; 02065 02066 if (parent != 0) 02067 { 02068 parent_length = parent->folded_name ().length (); 02069 length += parent_length; 02070 } 02071 02072 length += this->name_.length (); 02073 length += TAO_Root_POA::name_separator_length (); 02074 02075 this->folded_name_.length (static_cast <CORBA::ULong> (length)); 02076 CORBA::Octet *folded_name_buffer = this->folded_name_.get_buffer (); 02077 02078 if (parent != 0) 02079 { 02080 ACE_OS::memcpy (folded_name_buffer, 02081 parent->folded_name ().get_buffer (), 02082 parent_length); 02083 } 02084 02085 ACE_OS::memcpy (&folded_name_buffer[parent_length], 02086 this->name_.c_str (), 02087 this->name_.length ()); 02088 02089 folded_name_buffer[length - TAO_Root_POA::name_separator_length ()] = TAO_Root_POA::name_separator (); 02090 } |
|
Definition at line 1941 of file Root_POA.cpp. References ACE_HTONL, active_policy_strategies_, TAO::Portable_Server::Active_Policy_Strategies::id_assignment_strategy(), is_persistent(), TAO::unbounded_value_sequence< T >::length(), TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(), ACE_OS::memcpy(), non_root_key_char(), objectkey_prefix, root_key_char(), root_key_type_length(), system_id(), system_name_, and TAO_OBJECTKEY_PREFIX_SIZE. Referenced by TAO_Root_POA().
01942 { 01943 // Calculate the prefix size. 01944 CORBA::ULong prefix_size = 0; 01945 prefix_size += TAO_OBJECTKEY_PREFIX_SIZE; 01946 01947 // If we are dealing with a persistent POA and user ids are being 01948 // used, then we need to add the POA name length field to the object 01949 // key. Otherwise, the POA name length can be calculated by looking 01950 // at the remainder after extracting other parts of the key. 01951 bool const add_poa_name_length = 01952 this->is_persistent () && 01953 !this->system_id (); 01954 01955 // Size required by the POA name. 01956 CORBA::ULong poa_name = 0; 01957 01958 // Calculate the space required for the POA name. 01959 CORBA::ULong poa_name_length = this->system_name_->length (); 01960 if (parent != 0) 01961 { 01962 poa_name += poa_name_length; 01963 } 01964 01965 // Check if we need to added the length of the POA name. 01966 if (add_poa_name_length) 01967 { 01968 poa_name += sizeof (poa_name_length); 01969 } 01970 01971 // Get the space needed for the lifespan length 01972 // byte. 01973 CORBA::ULong const lifespan_key_length = 01974 this->active_policy_strategies_.lifespan_strategy()->key_length (); 01975 01976 CORBA::ULong const id_assignment_key_length = 01977 this->active_policy_strategies_.id_assignment_strategy()->key_type_length (); 01978 01979 // Calculate the space required for the POA id. 01980 CORBA::ULong const buffer_size = 01981 prefix_size + 01982 this->root_key_type_length () + 01983 id_assignment_key_length + 01984 lifespan_key_length + 01985 poa_name; 01986 01987 // Create the buffer for the POA id. 01988 this->id_.length (buffer_size); 01989 CORBA::Octet *buffer = &this->id_[0]; 01990 01991 // Keeps track of where the next infomation goes; start at 0 byte. 01992 CORBA::ULong starting_at = 0; 01993 01994 // Add the object key prefix. 01995 ACE_OS::memcpy (&buffer[starting_at], 01996 &objectkey_prefix[0], 01997 TAO_OBJECTKEY_PREFIX_SIZE); 01998 01999 starting_at += TAO_OBJECTKEY_PREFIX_SIZE; 02000 02001 // Copy the root byte. 02002 if (parent != 0) 02003 { 02004 buffer[starting_at] = (CORBA::Octet) TAO_Root_POA::non_root_key_char (); 02005 } 02006 else 02007 { 02008 buffer[starting_at] = (CORBA::Octet) TAO_Root_POA::root_key_char (); 02009 } 02010 starting_at += this->root_key_type_length (); 02011 02012 // Add the id_assignment part 02013 this->active_policy_strategies_.id_assignment_strategy()->create_key (buffer, starting_at); 02014 02015 // Add the lifespan part 02016 this->active_policy_strategies_.lifespan_strategy()->create_key (buffer, starting_at); 02017 02018 // Check if we need to added the length of the POA name. 02019 if (add_poa_name_length) 02020 { 02021 poa_name_length = ACE_HTONL (poa_name_length); 02022 ACE_OS::memcpy (&buffer[starting_at], 02023 &poa_name_length, 02024 sizeof (poa_name_length)); 02025 starting_at += sizeof (poa_name_length); 02026 } 02027 02028 // Put the POA name into the key (for non-root POAs). 02029 if (parent != 0) 02030 { 02031 ACE_OS::memcpy (&buffer[starting_at], 02032 this->system_name_->get_buffer (), 02033 this->system_name_->length ()); 02034 starting_at += this->system_name_->length (); 02035 } 02036 } |
|
Set the object reference factory.
Definition at line 195 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ORT_adapter(), ort_adapter_, and TAO::ORT_Adapter::set_obj_ref_factory().
00198 { 00199 TAO::ORT_Adapter *adapter = this->ORT_adapter (ACE_ENV_SINGLE_ARG_PARAMETER); 00200 ACE_CHECK; 00201 00202 if (adapter) 00203 { 00204 // Activate a different factory 00205 this->ort_adapter_->set_obj_ref_factory (current_factory 00206 ACE_ENV_ARG_PARAMETER); 00207 ACE_CHECK; 00208 } 00209 } |
|
Definition at line 2695 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, and TAO_POA_GUARD.
02699 { 02700 // Lock access for the duration of this transaction. 02701 TAO_POA_GUARD; 02702 02703 this->active_policy_strategies_.request_processing_strategy()-> 02704 set_servant (servant ACE_ENV_ARG_PARAMETER); 02705 ACE_CHECK; 02706 } |
|
Definition at line 2632 of file Root_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, PortableServer::ServantManager_ptr, and TAO_POA_GUARD.
02636 { 02637 // Lock access for the duration of this transaction. 02638 TAO_POA_GUARD; 02639 02640 this->active_policy_strategies_.request_processing_strategy()-> 02641 set_servant_manager (imgr ACE_ENV_ARG_PARAMETER); 02642 ACE_CHECK; 02643 } |
|
Definition at line 84 of file Root_POA.inl. References TAO::Portable_Server::Cached_Policies::id_assignment(). Referenced by is_poa_generated(), and set_id().
00085 { 00086 return (this->cached_policies_.id_assignment () == PortableServer::SYSTEM_ID); 00087 } |
|
Definition at line 151 of file Root_POA.inl. Referenced by parse_key().
00152 { 00153 return 'S'; 00154 } |
|
Definition at line 163 of file Root_POA.inl. Referenced by parse_key().
00164 { 00165 return sizeof (char); 00166 } |
|
Definition at line 115 of file Root_POA.inl. References system_name_. Referenced by is_poa_generated().
00116 { 00117 return this->system_name_.in (); 00118 } |
|
Return the POA Manager related to this POA.
Definition at line 687 of file Root_POA.cpp. Referenced by TAO::Portable_Server::LifespanStrategyTransient::check_state(), and TAO::Portable_Server::LifespanStrategyPersistent::check_state().
00688 { 00689 return poa_manager_; 00690 } |
|
Definition at line 2605 of file Root_POA.cpp. References TAO_POA_GUARD.
02608 { 02609 // Lock access for the duration of this transaction. 02610 TAO_POA_GUARD; 02611 02612 this->adapter_activator_ = PortableServer::AdapterActivator::_duplicate (adapter_activator); 02613 } |
|
Definition at line 2595 of file Root_POA.cpp. References TAO_POA_GUARD_RETURN.
02597 { 02598 // Lock access for the duration of this transaction. 02599 TAO_POA_GUARD_RETURN (PortableServer::AdapterActivator::_nil ()); 02600 02601 return PortableServer::AdapterActivator::_duplicate (this->adapter_activator_.in ()); 02602 } |
|
Definition at line 768 of file Root_POA.cpp. References ACE_ENV_SINGLE_ARG_PARAMETER, and TAO_POA_GUARD_RETURN.
00770 { 00771 // Lock access for the duration of this transaction. 00772 TAO_POA_GUARD_RETURN (0); 00773 00774 return this->the_children_i (ACE_ENV_SINGLE_ARG_PARAMETER); 00775 } |
|
Definition at line 1039 of file Root_POA.cpp. References ACE_CHECK_RETURN, ACE_NEW_THROW_EX, and PortableServer::POAList.
01041 { 01042 PortableServer::POAList_var children; 01043 CORBA::ULong child_current = static_cast <CORBA::ULong> 01044 (this->children_.current_size ()); 01045 ACE_NEW_THROW_EX (children, 01046 PortableServer::POAList (child_current), 01047 CORBA::NO_MEMORY ()); 01048 ACE_CHECK_RETURN (0); 01049 01050 children->length (child_current); 01051 01052 CORBA::ULong index = 0; 01053 for (CHILDREN::iterator iterator = this->children_.begin (); 01054 iterator != this->children_.end (); 01055 ++iterator, ++index) 01056 { 01057 TAO_Root_POA *child_poa = (*iterator).int_id_; 01058 children[index] = PortableServer::POA::_duplicate (child_poa); 01059 } 01060 01061 return children._retn (); 01062 } |
|
|
|
Reimplemented in TAO_Regular_POA. |
|
Definition at line 2907 of file Root_POA.cpp.
02909 {
02910 return PortableServer::POAManager::_duplicate (&this->poa_manager_);
02911 }
|
|
Definition at line 2915 of file Root_POA.cpp.
02917 {
02918 return PortableServer::POAManagerFactory::_duplicate (&this->poa_manager_factory_);
02919 }
|
|
Definition at line 235 of file Root_POA.inl.
00236 {
00237 return 0;
00238 }
|
|
Definition at line 139 of file Root_POA.inl. Referenced by parse_key().
00140 { 00141 return 'T'; 00142 } |
|
Definition at line 1666 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by TAO::Portable_Server::RequestProcessingStrategyServantLocator::cleanup_servant(), TAO::Portable_Server::RequestProcessingStrategyServantActivator::cleanup_servant(), TAO::Portable_Server::RequestProcessingStrategyDefaultServant::cleanup_servant(), and TAO::Portable_Server::RequestProcessingStrategyAOMOnly::cleanup_servant().
01667 { 01668 return this->active_policy_strategies_.servant_retention_strategy()-> 01669 unbind_using_user_id (user_id); 01670 } |
|
Definition at line 157 of file Root_POA.inl. Referenced by parse_key().
00158 { 00159 return 'U'; 00160 } |
|
Definition at line 1716 of file Root_POA.cpp. References ACE_ENV_ARG_PARAMETER.
01721 { 01722 return this->active_policy_strategies_.servant_retention_strategy()-> 01723 user_id_to_servant (id ACE_ENV_ARG_PARAMETER); 01724 } |
|
Definition at line 2807 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(). Referenced by is_poa_generated().
02810 { 02811 return this->active_policy_strategies_.lifespan_strategy()-> 02812 validate (is_persistent, creation_time); 02813 } |
|
Definition at line 1320 of file Root_POA.cpp. References ACE_THROW, TAO_Object_Adapter::enable_locking_, object_adapter(), outstanding_requests_, outstanding_requests_condition_, and wait_for_completion_pending_. Referenced by TAO_POA_Manager::discard_requests_i(), and TAO_POA_Manager::hold_requests_i().
01322 { 01323 while (this->object_adapter ().enable_locking_ && 01324 wait_for_completion && 01325 this->outstanding_requests_ > 0) 01326 { 01327 this->wait_for_completion_pending_ = 1; 01328 01329 int result = this->outstanding_requests_condition_.wait (); 01330 if (result == -1) 01331 { 01332 ACE_THROW (CORBA::OBJ_ADAPTER ()); 01333 } 01334 } 01335 } |
|
Definition at line 217 of file Root_POA.inl. References waiting_destruction_. Referenced by TAO::Portable_Server::Non_Servant_Upcall::~Non_Servant_Upcall().
00218 { 00219 return this->waiting_destruction_; 00220 } |
|
Definition at line 2861 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by TAO::Portable_Server::Servant_Upcall::servant_cleanup().
02862 { 02863 return this->active_policy_strategies_.servant_retention_strategy ()-> 02864 waiting_servant_deactivation (); 02865 } |
|
Definition at line 117 of file Root_POA.h. |
|
Definition at line 116 of file Root_POA.h. |
|
Definition at line 120 of file Root_POA.h. |
|
Definition at line 115 of file Root_POA.h. |
|
Definition at line 118 of file Root_POA.h. |
|
Definition at line 119 of file Root_POA.h. |
|
|
Definition at line 923 of file Root_POA.h. Referenced by complete_destruction_i(). |
|
Adapter can be accepting, rejecting etc.
Definition at line 916 of file Root_POA.h. Referenced by destroy_i(). |
|
Definition at line 918 of file Root_POA.h. |
|
Definition at line 960 of file Root_POA.h. |
|
Definition at line 935 of file Root_POA.h. Referenced by delete_child(). |
|
Definition at line 944 of file Root_POA.h. Referenced by cleanup_in_progress(), and delete_child(). |
|
Definition at line 956 of file Root_POA.h. Referenced by key_to_stub_i(). |
|
Definition at line 906 of file Root_POA.h. |
|
Definition at line 910 of file Root_POA.h. |
|
Definition at line 981 of file Root_POA.h. Referenced by invoke_key_to_object(). |
|
Definition at line 937 of file Root_POA.h. |
|
Definition at line 891 of file Root_POA.h. |
|
The object adapter we belong to.
Definition at line 942 of file Root_POA.h. |
|
Initial value: { 024, 001, 017, 000 } Definition at line 73 of file Root_POA.cpp. Referenced by set_id(). |
|
Reimplemented from CORBA::Object. Definition at line 939 of file Root_POA.h. |
|
Pointer to the object reference template adapter.
Definition at line 913 of file Root_POA.h. Referenced by get_adapter_template_i(), ORT_adapter_i(), and set_obj_ref_factory(). |
|
Definition at line 946 of file Root_POA.h. Referenced by decrement_outstanding_requests(), increment_outstanding_requests(), outstanding_requests(), and wait_for_completions(). |
|
Definition at line 948 of file Root_POA.h. Referenced by TAO::Portable_Server::Servant_Upcall::poa_cleanup(), and wait_for_completions(). |
|
Reference to the POAManager that this poa assicuates with.
Definition at line 894 of file Root_POA.h. |
|
Reference to the POAManagerFactory that generate the POAManager.
Definition at line 896 of file Root_POA.h. |
|
Definition at line 904 of file Root_POA.h. |
|
Definition at line 902 of file Root_POA.h. Referenced by save_ior_component_and_profile_id(). |
|
Definition at line 954 of file Root_POA.h. Referenced by TAO::Portable_Server::Servant_Upcall::servant_cleanup(), and servant_deactivation_condition(). |
|
Definition at line 962 of file Root_POA.h. |
|
Definition at line 908 of file Root_POA.h. Referenced by set_id(), and system_name(). |
|
Definition at line 898 of file Root_POA.h. Referenced by create_stub_object(), and save_ior_component(). |
|
Definition at line 900 of file Root_POA.h. Referenced by create_stub_object(), and save_ior_component_and_profile_id(). |
|
Definition at line 950 of file Root_POA.h. Referenced by TAO::Portable_Server::Servant_Upcall::poa_cleanup(), and wait_for_completions(). |
|
Definition at line 952 of file Root_POA.h. Referenced by complete_destruction_i(), TAO::Portable_Server::Servant_Upcall::poa_cleanup(), and waiting_destruction(). |