#include <Root_POA.h>
Inheritance diagram for TAO_Root_POA:


Implementation of the PortableServer::POA interface.
Definition at line 114 of file Root_POA.h.
|
|
Definition at line 734 of file Root_POA.h. |
|
|
Definition at line 127 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 275 of file Root_POA.h.
00276 {
00277 TAO_OBJECTKEY_PREFIX_SIZE = 4
00278 };
|
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 186 of file Root_POA.cpp. References TAO_Local_RefCounted_Object::_add_ref(), active_policy_strategies_, TAO_Object_Adapter::bind_poa(), TAO::Portable_Server::Cached_Policies::implicit_activation(), ACE_Dynamic_Service< TYPE >::instance(), TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(), network_priority_hook_, 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(), TAO::Portable_Server::Cached_Policies::update(), and TAO_Network_Priority_Hook::update_network_priority().
00194 : name_ (name), 00195 poa_manager_ (* (dynamic_cast <TAO_POA_Manager*> (poa_manager))), 00196 00197 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) 00198 poa_manager_factory_ (* (object_adapter->poa_manager_factory_)), 00199 #endif 00200 00201 tagged_component_ (), 00202 tagged_component_id_ (), 00203 profile_id_array_ (0), 00204 policies_ (policies), 00205 ort_adapter_ (0), 00206 adapter_state_ (PortableInterceptor::HOLDING), 00207 network_priority_hook_ (0), 00208 00209 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) 00210 00211 adapter_activator_ (), 00212 00213 #endif /* TAO_HAS_MINIMUM_POA == 0 */ 00214 00215 children_ (), 00216 lock_ (lock), 00217 orb_core_ (orb_core), 00218 object_adapter_ (object_adapter), 00219 cleanup_in_progress_ (0), 00220 outstanding_requests_ (0), 00221 outstanding_requests_condition_ (thread_lock), 00222 wait_for_completion_pending_ (0), 00223 waiting_destruction_ (0), 00224 servant_deactivation_condition_ (thread_lock), 00225 00226 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) 00227 filter_factory_ (0), 00228 #endif 00229 00230 caller_key_to_object_ (0), 00231 servant_for_key_to_object_ (0) 00232 { 00233 // Since we are keeping a reference to a POAManager, we need to 00234 // increment the reference count 00235 this->poa_manager_._add_ref(); 00236 00237 // Parse the policies that are used in the critical path in 00238 // a cache. 00239 this->cached_policies_.update (this->policies_); 00240 00241 this->network_priority_hook_ 00242 = ACE_Dynamic_Service<TAO_Network_Priority_Hook>::instance ( 00243 "TAO_Network_Priority_Hook"); 00244 00245 if (this->network_priority_hook_ != 0) 00246 { 00247 this->network_priority_hook_->update_network_priority ( 00248 *this, this->policies_); 00249 } 00250 00251 #if (TAO_HAS_MINIMUM_POA == 1) 00252 // If this is the RootPOA, set the value of the ImplicitActivationPolicy 00253 // to IMPLICIT_ACTIVATION since it is impossible to pass the policy 00254 // as it is not compiled into the library. 00255 // 00256 // If the ImplicitActivationPolicy policy is ever compiled in the 00257 // minimum POA builds, remove this code and remove the guards 00258 // in Object_Adapter.cpp when changing the default policy for the 00259 // RootPOA. 00260 if (ACE_OS::strcmp (this->name_.c_str (), 00261 TAO_DEFAULT_ROOTPOA_NAME) == 0) 00262 { 00263 this->cached_policies_.implicit_activation 00264 (PortableServer::IMPLICIT_ACTIVATION); 00265 } 00266 #endif /* TAO_HAS_MINIMUM_POA == 1 */ 00267 00268 // Set the active strategies to be used by this POA 00269 this->active_policy_strategies_.update (this->cached_policies_, 00270 this); 00271 00272 // Set the folded name of this POA. 00273 this->set_folded_name (parent); 00274 00275 // Register self with manager. 00276 int result = this->poa_manager_.register_poa (this); 00277 if (result != 0) 00278 { 00279 throw ::CORBA::OBJ_ADAPTER (); 00280 } 00281 00282 // Add self to Object Adapter class. 00283 result = 00284 this->object_adapter ().bind_poa (this->folded_name_, 00285 this, 00286 this->system_name_.out ()); 00287 if (result != 0) 00288 { 00289 // Remove from POA Manager in case of errors. No checks of 00290 // further errors... 00291 this->poa_manager_.remove_poa (this); 00292 00293 throw ::CORBA::OBJ_ADAPTER (); 00294 } 00295 00296 // Set the id for this POA. 00297 this->set_id (parent); 00298 00299 // Notify the Lifespan strategy of our startup 00300 try 00301 { 00302 this->active_policy_strategies_.lifespan_strategy()->notify_startup (); 00303 } 00304 catch (const ::CORBA::Exception&) 00305 { 00306 this->poa_manager_.remove_poa (this); 00307 this->object_adapter ().unbind_poa (this, 00308 this->folded_name_, 00309 this->system_name_.in ()); 00310 throw; 00311 } 00312 } |
|
|
Definition at line 314 of file Root_POA.cpp. References TAO_Local_RefCounted_Object::_remove_ref().
00315 {
00316 this->poa_manager_._remove_ref();
00317 }
|
|
|
Reimplemented from CORBA::LocalObject. Definition at line 2628 of file Root_POA.cpp. References CORBA::ORB::_duplicate().
02629 {
02630 return CORBA::ORB::_duplicate (this->orb_core_.orb ());
02631 }
|
|
|
Definition at line 1083 of file Root_POA.cpp. References activate_object_i(), and TAO_POA_GUARD_RETURN. Referenced by activate_object_i().
01084 {
01085 while (1)
01086 {
01087 bool wait_occurred_restart_call = false;
01088
01089 // Lock access for the duration of this transaction.
01090 TAO_POA_GUARD_RETURN (0);
01091
01092 PortableServer::ObjectId *result =
01093 this->activate_object_i (servant,
01094 this->server_priority (),
01095 wait_occurred_restart_call);
01096
01097 // If we ended up waiting on a condition variable, the POA state
01098 // may have changed while we are waiting. Therefore, we need to
01099 // restart this call.
01100 if (wait_occurred_restart_call)
01101 continue;
01102 else
01103 return result;
01104 }
01105 }
|
|
||||||||||||||||
|
Definition at line 1072 of file Root_POA.cpp. References activate_object(), active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by activate_object().
01075 {
01076 return this->active_policy_strategies_.servant_retention_strategy()->
01077 activate_object (servant,
01078 priority,
01079 wait_occurred_restart_call);
01080 }
|
|
||||||||||||
|
Definition at line 1109 of file Root_POA.cpp. References activate_object_with_id_i(), and TAO_POA_GUARD. Referenced by activate_object_with_id_i().
01111 {
01112 while (1)
01113 {
01114 bool wait_occurred_restart_call = false;
01115
01116 // Lock access for the duration of this transaction.
01117 TAO_POA_GUARD;
01118
01119 this->activate_object_with_id_i (id,
01120 servant,
01121 this->server_priority (),
01122 wait_occurred_restart_call);
01123
01124 // If we ended up waiting on a condition variable, the POA state
01125 // may have changed while we are waiting. Therefore, we need to
01126 // restart this call.
01127 if (wait_occurred_restart_call)
01128 continue;
01129 else
01130 return;
01131 }
01132 }
|
|
||||||||||||||||||||
|
Definition at line 1137 of file Root_POA.cpp. References activate_object_with_id(), active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by activate_object_with_id().
01141 {
01142 this->active_policy_strategies_.servant_retention_strategy()->
01143 activate_object_with_id (id,
01144 servant,
01145 priority,
01146 wait_occurred_restart_call);
01147 }
|
|
|
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 32 of file Root_POA.inl. References adapter_name_i(). Referenced by ORT_adapter_i().
00033 {
00034 return this->adapter_name_i ();
00035 }
|
|
|
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 956 of file Root_POA.cpp. References ACE_ASSERT, ACE_NEW_THROW_EX, TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), PortableServer::POA_var, and CORBA::string_dup(). Referenced by adapter_name(), and ORT_adapter_i().
00957 {
00958 // The adapter name is the sequence of names starting from the
00959 // RootPOA to the one whose name is requested. The name of the
00960 // RootPOA is "RootPOA".
00961
00962 PortableServer::POA_var poa = PortableServer::POA::_duplicate (this);
00963
00964 CORBA::ULong len = 0;
00965
00966 // Find the length of the adapter name sequence by traversing the
00967 // POA hierarchy until the RootPOA is reached. The RootPOA has no
00968 // parent.
00969 while (!CORBA::is_nil (poa.in ()))
00970 {
00971 poa = poa->the_parent ();
00972
00973 ++len;
00974 }
00975
00976 // Empty adapter name sequence.
00977 PortableInterceptor::AdapterName *names = 0;
00978 ACE_NEW_THROW_EX (names,
00979 PortableInterceptor::AdapterName (len),
00980 CORBA::NO_MEMORY (
00981 CORBA::SystemException::_tao_minor_code (
00982 TAO::VMCID,
00983 ENOMEM),
00984 CORBA::COMPLETED_NO));
00985
00986 PortableInterceptor::AdapterName_var safe_names (names);
00987
00988 names->length (len);
00989
00990 poa = PortableServer::POA::_duplicate (this);
00991
00992 (*names)[0] = CORBA::string_dup ("RootPOA");
00993
00994 // Fill in the AdapterName sequence as the POA hierarchy is
00995 // traversed.
00996 CORBA::ULong ilen = len;
00997 for (CORBA::ULong i = 1; i < len; ++i)
00998 {
00999 (*names)[--ilen] = poa->the_name ();
01000
01001 poa = poa->the_parent ();
01002
01003 // If this condition asserts, the POA hierarchy was modified
01004 // (i.e. reduced in size) by another thread!
01005 ACE_ASSERT ((ilen > 0 ? !CORBA::is_nil (poa.in ()) : 1));
01006 }
01007
01008 return safe_names._retn ();
01009 }
|
|
||||||||||||
|
Method to notify the IOR Interceptors when there is a state changed not related to POAManager. Definition at line 1058 of file Root_POA.cpp. References TAO_IORInterceptor_Adapter::adapter_state_changed(), and TAO_ORB_Core::ior_interceptor_adapter(). Referenced by destroy_i().
01061 {
01062 TAO_IORInterceptor_Adapter *ior_adapter =
01063 this->orb_core_.ior_interceptor_adapter ();
01064
01065 if (ior_adapter)
01066 {
01067 ior_adapter->adapter_state_changed (array_obj_ref_template, state);
01068 }
01069 }
|
|
||||||||||||
|
Add the given tagged component to all profiles.
Definition at line 1012 of file Root_POA.cpp. References TAO_Profile::add_tagged_component(), TAO_MProfile::get_profile(), and TAO_MProfile::profile_count(). Referenced by create_stub_object().
01014 {
01015 // Add the given tagged component to all profiles.
01016 const CORBA::ULong profile_count = mprofile.profile_count ();
01017
01018 for (CORBA::ULong i = 0; i < profile_count; ++i)
01019 {
01020 TAO_Profile *profile = mprofile.get_profile (i);
01021
01022 profile->add_tagged_component (component);
01023 }
01024 }
|
|
||||||||||||||||
|
Add the given tagged component to all profiles matching the given ProfileId. Definition at line 1027 of file Root_POA.cpp. References TAO_Profile::add_tagged_component(), TAO_MProfile::get_profile(), TAO_MProfile::profile_count(), and TAO_Profile::tag(). Referenced by create_stub_object().
01031 {
01032 // Add the given tagged component to all profiles matching the given
01033 // ProfileId.
01034 bool found_profile = false;
01035
01036 CORBA::ULong const profile_count = mprofile.profile_count ();
01037
01038 for (CORBA::ULong i = 0; i < profile_count; ++i)
01039 {
01040 TAO_Profile *profile = mprofile.get_profile (i);
01041
01042 if (profile->tag () == profile_id)
01043 {
01044 profile->add_tagged_component (component);
01045
01046 found_profile = true;
01047 }
01048 }
01049
01050 // According to the Portable Interceptor specification, we're
01051 // supposed to throw a CORBA::BAD_PARAM exception if no profile
01052 // matched the given ProfileId.
01053 if (found_profile == false)
01054 throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 29, CORBA::COMPLETED_NO);
01055 }
|
|
|
Definition at line 2443 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::implicit_activation_strategy(). Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::servant_to_system_id_i(), and TAO::Portable_Server::ServantRetentionStrategyRetain::servant_to_user_id().
02444 {
02445 return this->active_policy_strategies_.implicit_activation_strategy ()->
02446 allow_implicit_activation ();
02447 }
|
|
|
Definition at line 2450 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::id_uniqueness_strategy(). Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::servant_to_system_id_i(), and TAO::Portable_Server::ServantRetentionStrategyRetain::servant_to_user_id().
02451 {
02452 return this->active_policy_strategies_.id_uniqueness_strategy ()->
02453 allow_multiple_activations ();
02454 }
|
|
|
obtain a reference to the cached_profiles
Definition at line 2481 of file Root_POA.cpp. Referenced by TAO_Network_Priority_Hook::update_network_priority().
02482 {
02483 return this->cached_policies_;
02484 }
|
|
||||||||||||
|
Definition at line 1178 of file Root_POA.cpp. References 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().
01180 {
01181 if (wait_for_completion)
01182 {
01183 TAO::Portable_Server::POA_Current_Impl *poa_current_impl =
01184 static_cast <TAO::Portable_Server::POA_Current_Impl *>
01185 (TAO_TSS_Resources::instance ()->poa_current_impl_);
01186
01187 while (1)
01188 {
01189 // If wait_for_completion is TRUE and the current thread is
01190 // in an invocation context dispatched from some POA
01191 // belonging to the same ORB as this POA, the BAD_INV_ORDER
01192 // system exception with standard minor code 3 is raised and
01193 // POA destruction does not occur.
01194 if (poa_current_impl != 0)
01195 {
01196 if (&orb_core == &poa_current_impl->orb_core ())
01197 {
01198 // CORBA 2.3 specifies which minor code corresponds
01199 // to this particular problem.
01200 throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 3,
01201 CORBA::COMPLETED_NO);
01202 }
01203 }
01204 else
01205 break;
01206
01207 poa_current_impl =
01208 poa_current_impl->previous_current_impl_;
01209 }
01210 }
01211 }
|
|
|
Check the state of this POA.
Definition at line 2590 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(). Referenced by find_POA_i(), and TAO::Portable_Server::Servant_Upcall::prepare_for_upcall_i().
02591 {
02592 this->active_policy_strategies_.lifespan_strategy ()->check_state ();
02593 }
|
|
|
Definition at line 8 of file Root_POA.inl. References cleanup_in_progress_. Referenced by TAO::Portable_Server::POA_Guard::POA_Guard().
00009 {
00010 return this->cleanup_in_progress_;
00011 }
|
|
||||||||||||
|
Definition at line 1455 of file Root_POA.cpp. References 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().
01459 {
01460 this->active_policy_strategies_.request_processing_strategy()->
01461 cleanup_servant (servant, user_id);
01462 }
|
|
|
This method gives the policies that are exposed to the client. These policies are shipped within the IOR. Definition at line 2206 of file Root_POA.cpp. References 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().
02207 {
02208 CORBA::PolicyList *client_exposed_policies = 0;
02209 ACE_NEW_THROW_EX (client_exposed_policies,
02210 CORBA::PolicyList (),
02211 CORBA::NO_MEMORY (TAO::VMCID,
02212 CORBA::COMPLETED_NO));
02213
02214 CORBA::PolicyList_var policies = client_exposed_policies;
02215
02216 // Add in all of the client exposed policies.
02217 this->policies_.add_client_exposed_fixed_policies (client_exposed_policies);
02218
02219 return policies._retn ();
02220 }
|
|
|
Definition at line 320 of file Root_POA.cpp. References 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 destroy_i(), TAO::Portable_Server::Servant_Upcall::poa_cleanup(), and TAO::Portable_Server::Non_Servant_Upcall::~Non_Servant_Upcall().
00321 {
00322 // No longer awaiting destruction.
00323 this->waiting_destruction_ = 0;
00324
00325 // Remove POA from the POAManager.
00326 int result = this->poa_manager_.remove_poa (this);
00327
00328 if (result != 0)
00329 throw ::CORBA::OBJ_ADAPTER ();
00330
00331 // Remove POA from the Object Adapter.
00332 result = this->object_adapter ().unbind_poa (this,
00333 this->folded_name_,
00334 this->system_name_.in ());
00335 if (result != 0)
00336 throw ::CORBA::OBJ_ADAPTER ();
00337
00338 // Cleanup all strategies
00339 this->active_policy_strategies_.cleanup ();
00340
00341 // Forced cleanup. The new memory management scheme is evil and can
00342 // lead to reference deadlock, i.e., POA holds object A, but POA
00343 // cannot die because object A hold POA.
00344 {
00345 //
00346 // If new things are added to this cleanup code, make sure to move
00347 // the minimum CORBA #define after the declaration of
00348 // <non_servant_upcall>.
00349 //
00350
00351 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00352
00353 // ATTENTION: Trick locking here, see class header for details
00354 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (*this);
00355 ACE_UNUSED_ARG (non_servant_upcall);
00356
00357 this->adapter_activator_ = PortableServer::AdapterActivator::_nil ();
00358
00359 #endif /* TAO_HAS_MINIMUM_POA == 0 */
00360
00361 }
00362
00363 ::CORBA::release (this);
00364 }
|
|
|
Call the IORInterceptor::components_established() method on all registered IORInterceptors. Definition at line 2084 of file Root_POA.cpp. References TAO_IORInterceptor_Adapter::components_established(), and TAO_ORB_Core::ior_interceptor_adapter().
02085 {
02086 TAO_IORInterceptor_Adapter *ior_adapter =
02087 this->orb_core_.ior_interceptor_adapter ();
02088
02089 if (ior_adapter)
02090 {
02091 ior_adapter->components_established (info);
02092 }
02093 }
|
|
|
Definition at line 125 of file Root_POA.cpp. References ACE_NEW_THROW_EX.
00126 {
00127 TAO::Portable_Server::IdAssignmentPolicy *policy = 0;
00128 ACE_NEW_THROW_EX (policy,
00129 TAO::Portable_Server::IdAssignmentPolicy (value),
00130 CORBA::NO_MEMORY ());
00131
00132 return policy;
00133 }
|
|
|
Definition at line 112 of file Root_POA.cpp. References ACE_NEW_THROW_EX.
00113 {
00114 TAO::Portable_Server::IdUniquenessPolicy *policy = 0;
00115 ACE_NEW_THROW_EX (policy,
00116 TAO::Portable_Server::IdUniquenessPolicy (value),
00117 CORBA::NO_MEMORY ());
00118
00119 return policy;
00120 }
|
|
|
Definition at line 139 of file Root_POA.cpp. References ACE_NEW_THROW_EX.
00140 {
00141 TAO::Portable_Server::ImplicitActivationPolicy *policy = 0;
00142 ACE_NEW_THROW_EX (policy,
00143 TAO::Portable_Server::ImplicitActivationPolicy (value),
00144 CORBA::NO_MEMORY ());
00145
00146 return policy;
00147 }
|
|
|
Definition at line 98 of file Root_POA.cpp. References ACE_NEW_THROW_EX.
00099 {
00100 TAO::Portable_Server::LifespanPolicy *policy = 0;
00101 ACE_NEW_THROW_EX (policy,
00102 TAO::Portable_Server::LifespanPolicy (value),
00103 CORBA::NO_MEMORY ());
00104
00105 return policy;
00106 }
|
|
|
Definition at line 1673 of file Root_POA.cpp. References ACE_NEW_RETURN, TAO::unbounded_value_sequence< T >::allocbuf(), and ACE_OS::memcpy(). Referenced by invoke_key_to_object().
01674 {
01675 // Calculate the space required for the key.
01676 CORBA::ULong buffer_size =
01677 this->id_.length () +
01678 id.length ();
01679
01680 // Create the buffer for the key.
01681 CORBA::Octet *buffer = TAO::ObjectKey::allocbuf (buffer_size);
01682
01683 // First copy the POA id into the key.
01684 ACE_OS::memcpy (&buffer[0],
01685 this->id_.get_buffer (),
01686 this->id_.length ());
01687
01688 // Then copy the object id into the key.
01689 ACE_OS::memcpy (&buffer[this->id_.length ()],
01690 id.get_buffer (),
01691 id.length ());
01692
01693 // Create the key, giving the ownership of the buffer to the
01694 // sequence.
01695 TAO::ObjectKey *key = 0;
01696 ACE_NEW_RETURN (key,
01697 TAO::ObjectKey (buffer_size,
01698 buffer_size,
01699 buffer,
01700 1),
01701 0);
01702
01703 return key;
01704 }
|
|
||||||||||||||||
|
Definition at line 648 of file Root_POA.cpp. References create_POA_i(), PortableServer::POAManager_ptr, and TAO_POA_GUARD_RETURN.
00651 {
00652 // Lock access for the duration of this transaction.
00653 TAO_POA_GUARD_RETURN (0);
00654
00655 return this->create_POA_i (adapter_name, poa_manager, policies);
00656 }
|
|
||||||||||||||||
|
Definition at line 475 of file Root_POA.cpp. References TAO_Objref_Var_T< T >::_retn(), ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind(), children_, ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find(), new_POA(), object_adapter(), PortableServer::POA_var, PortableServer::POAManager_ptr, String, and TAO_Object_Adapter::thread_lock().
00478 {
00479 // This operaton creates a new POA as a child of the target POA. The
00480 // specified name identifies the new POA with respect to other POAs
00481 // with the same parent POA. If the target POA already has a child
00482 // POA with the specified name, the AdapterAlreadyExists exception
00483 // is raised.
00484 // Child was found
00485 if (this->children_.find (adapter_name) != -1)
00486 {
00487 throw PortableServer::POA::AdapterAlreadyExists ();
00488 }
00489
00490 //
00491 // Child was not found. Create one.
00492 //
00493
00494 // The specified policy objects are associated with the POA and used
00495 // to control its behavior. The policy objects are effectively
00496 // copied before this operation returns, so the application is free
00497 // to destroy them while the POA is in use. Policies are not
00498 // inherited from the parent POA.
00499 TAO_Root_POA * poa = this->new_POA (adapter_name,
00500 poa_manager,
00501 policies,
00502 this,
00503 this->object_adapter ().lock (),
00504 this->object_adapter ().thread_lock (),
00505 this->orb_core_,
00506 this->object_adapter_);
00507
00508 // Give ownership of the new map to the POA_var. Note, that it
00509 // is important for the POA_var to take ownership before
00510 // checking for exception since we may need to delete the new map.
00511 PortableServer::POA_var new_poa = poa;
00512
00513 // Check for exception in construction of the POA.
00514
00515 // Add to children map
00516 if (this->children_.bind (adapter_name, poa) != 0)
00517 {
00518 throw ::CORBA::OBJ_ADAPTER ();
00519 }
00520
00521 // Increment the reference count on the child POA since the children
00522 // map must retain ownership. Do so immediately before any other
00523 // operations to prevent memory cleanup problems induced from
00524 // errors below.
00525 poa->_add_ref ();
00526
00527 // Iterate over the registered IOR interceptors so that they may be
00528 // given the opportunity to add tagged components to the profiles
00529 // for this servant.
00530 poa->establish_components ();
00531
00532 // Note: Creating a POA using a POA manager that is in the active
00533 // state can lead to race conditions if the POA supports preexisting
00534 // objects, because the new POA may receive a request before its
00535 // adapter activator, servant manager, or default servant have been
00536 // initialized. These problems do not occur if the POA is created by
00537 // an adapter activator registered with a parent of the new POA,
00538 // because requests are queued until the adapter activator
00539 // returns. To avoid these problems when a POA must be explicitly
00540 // initialized, the application can initialize the POA by invoking
00541 // find_POA with a TRUE activate parameter.
00542
00543 // Everything is fine. Don't let the POA_var release the
00544 // implementation.
00545 return new_poa._retn ();
00546 }
|
|
||||||||||||||||
|
Definition at line 368 of file Root_POA.cpp. References TAO_Objref_Var_T< T >::_retn(), ACE_NEW_THROW_EX, TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), TAO_POA_Policy_Set::merge_policies(), TAO_Policy_Validator::merge_policies(), object_adapter(), PortableServer::POA_var, PortableServer::POAManager_ptr, PortableServer::POAManager_var, TAO_POA_Policy_Set::policies(), TAO_POA_Policy_Set::validate_policies(), and TAO_Object_Adapter::validator(). Referenced by create_POA().
00371 {
00372 // Initialize a TAO_POA_Policy_Set instance so that it contains the
00373 // default POA policies.
00374 TAO_POA_Policy_Set tao_policies (this->object_adapter ().default_poa_policies ());
00375
00376 // Merge policies from the ORB level.
00377 this->object_adapter ().validator ().merge_policies (tao_policies.policies ());
00378
00379 // Merge in any policies that the user may have specified.
00380 tao_policies.merge_policies (policies);
00381
00382 // If any of the policy objects specified are not valid for the ORB
00383 // implementation, if conflicting policy objects are specified, or
00384 // if any of the specified policy objects require prior
00385 // administrative action that has not been performed, an
00386 // InvalidPolicy exception is raised containing the index in the
00387 // policies parameter value of the first offending policy object.
00388 tao_policies.validate_policies (this->object_adapter ().validator (),
00389 this->orb_core_);
00390
00391 // If the poa_manager parameter is null, a new POAManager object is
00392 // created and associated with the new POA. Otherwise, the specified
00393 // POAManager object is associated with the new POA. The POAManager
00394 // object can be obtained using the attribute name the_POAManager.
00395
00396 PortableServer::POAManager_var the_poa_manager;
00397
00398 if (CORBA::is_nil (poa_manager))
00399 {
00400 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT)
00401
00402 PortableServer::POA_var poa = PortableServer::POA::_duplicate (this);
00403 PortableServer::POA_var root_poa;
00404
00405 // Find the RootPOA by traversing the POA hierarchy until the
00406 // RootPOA is reached. The RootPOA has no parent.
00407 while (!CORBA::is_nil (poa.in ()))
00408 {
00409 root_poa = poa;
00410 poa = poa->the_parent ();
00411 }
00412
00413 // Get the POAManagerFactory instance owned by RootPOA.
00414 PortableServer::POAManagerFactory_var tao_poa_manager_factory
00415 = root_poa->the_POAManagerFactory ();
00416
00417 CORBA::PolicyList empty_policies;
00418
00419 // The POAManager name will be generated when the POAManager instance
00420 // is created.
00421 the_poa_manager
00422 = tao_poa_manager_factory->create_POAManager (0,
00423 empty_policies);
00424 #else
00425
00426 PortableServer::POAManager_ptr the_poa_manager_ptr;
00427 ACE_NEW_THROW_EX (the_poa_manager_ptr,
00428 TAO_POA_Manager (this->object_adapter (), 0),
00429 CORBA::NO_MEMORY ());
00430 the_poa_manager = the_poa_manager_ptr;
00431 #endif /* TAO_HAS_MINIMUM_POA == 0 && ! CORBA_E_COMPACT) */
00432
00433 }
00434 else
00435 {
00436 the_poa_manager = PortableServer::POAManager::_duplicate (poa_manager);
00437 }
00438
00439 PortableServer::POA_var poa = this->create_POA_i (adapter_name,
00440 the_poa_manager.in (),
00441 tao_policies);
00442
00443 return poa._retn ();
00444 }
|
|
|
Definition at line 1247 of file Root_POA.cpp. References create_reference_i(), and TAO_POA_GUARD_RETURN. Referenced by create_reference_i().
01248 {
01249 // Lock access for the duration of this transaction.
01250 TAO_POA_GUARD_RETURN (CORBA::Object::_nil ());
01251
01252 return this->create_reference_i (intf,
01253 this->server_priority ());
01254 }
|
|
||||||||||||
|
Definition at line 1257 of file Root_POA.cpp. References active_policy_strategies_, create_reference(), has_system_id(), and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by create_reference().
01259 {
01260 if (!this->has_system_id ())
01261 {
01262 throw PortableServer::POA::WrongPolicy ();
01263 }
01264
01265 return this->active_policy_strategies_.servant_retention_strategy()->
01266 create_reference (intf, priority);
01267 }
|
|
||||||||||||
|
Definition at line 724 of file Root_POA.cpp. References create_reference_with_id_i(), and TAO_POA_GUARD_RETURN. Referenced by create_reference_with_id_i().
00726 {
00727 // Lock access for the duration of this transaction.
00728 TAO_POA_GUARD_RETURN (CORBA::Object::_nil ());
00729
00730 return this->create_reference_with_id_i (id,
00731 intf,
00732 this->server_priority ());
00733 }
|
|
||||||||||||||||
|
Definition at line 1290 of file Root_POA.cpp. References active_policy_strategies_, create_reference_with_id(), has_system_id(), is_poa_generated_id(), and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by create_reference_with_id().
01293 {
01294 // If the POA has the SYSTEM_ID policy and it detects that the
01295 // Object Id value was not generated by the system or for this POA,
01296 // the create_reference_with_id operation may raise the BAD_PARAM
01297 // system exception. An ORB is not required to detect all such
01298 // invalid Object Id values, but a portable application must not
01299 // invoke this operation on a POA that has the SYSTEM_ID policy with
01300 // an Object Id value that was not previously generated by the
01301 // system for that POA, or, if the POA also has the PERSISTENT
01302 // policy, for a previous instantiation of the same POA.
01303 if (this->has_system_id () &&
01304 !this->is_poa_generated_id (user_id))
01305 {
01306 throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO);
01307 }
01308
01309 return this->active_policy_strategies_.servant_retention_strategy()->
01310 create_reference_with_id (user_id, intf, priority);
01311 }
|
|
|
Definition at line 161 of file Root_POA.cpp. References ACE_NEW_THROW_EX.
00162 {
00163 TAO::Portable_Server::RequestProcessingPolicy *policy = 0;
00164 ACE_NEW_THROW_EX (policy,
00165 TAO::Portable_Server::RequestProcessingPolicy (value),
00166 CORBA::NO_MEMORY ());
00167
00168 return policy;
00169 }
|
|
|
Definition at line 150 of file Root_POA.cpp. References ACE_NEW_THROW_EX.
00151 {
00152 TAO::Portable_Server::ServantRetentionPolicy *policy = 0;
00153 ACE_NEW_THROW_EX (policy,
00154 TAO::Portable_Server::ServantRetentionPolicy (value),
00155 CORBA::NO_MEMORY ());
00156
00157 return policy;
00158 }
|
|
||||||||||||||||||||||||
|
Definition at line 2127 of file Root_POA.cpp. References add_ior_component(), add_ior_component_to_profile(), TAO_Acceptor_Registry::begin(), TAO_ORB_Core::create_stub_object(), TAO_Acceptor_Filter::encode_endpoints(), TAO_Acceptor_Registry::end(), TAO_Acceptor_Registry::endpoint_count(), TAO_Acceptor_Filter::fill_profile(), TAO_MProfile::profile_count(), TAO_MProfile::set(), tagged_component_, tagged_component_id_, and TAO_MPROFILE_CREATION_ERROR. Referenced by key_to_stub_i().
02132 {
02133 bool error = false;
02134
02135 // Count the number of endpoints.
02136 size_t const profile_count = acceptor_registry.endpoint_count ();
02137
02138 // Create a profile container and have acceptor registries populate
02139 // it with profiles as appropriate.
02140 TAO_MProfile mprofile (0);
02141
02142 // Allocate space for storing the profiles. There can never be more
02143 // profiles than there are endpoints. In some cases, there can be
02144 // less profiles than endpoints.
02145 int result = mprofile.set (static_cast <CORBA::ULong> (profile_count));
02146 if (result == -1)
02147 error = true;
02148
02149 if (!error)
02150 {
02151 result =
02152 filter->fill_profile (object_key,
02153 mprofile,
02154 acceptor_registry.begin (),
02155 acceptor_registry.end ());
02156 if (result == -1)
02157 error = true;
02158 }
02159
02160 if (!error)
02161 result = filter->encode_endpoints (mprofile);
02162
02163 if (result == -1)
02164 error = true;
02165
02166 if (error)
02167 throw ::CORBA::INTERNAL (
02168 CORBA::SystemException::_tao_minor_code (
02169 TAO_MPROFILE_CREATION_ERROR,
02170 0),
02171 CORBA::COMPLETED_NO);
02172
02173 // Make sure we have at least one profile. <mp> may end up being
02174 // empty if none of the acceptor endpoints have the right priority
02175 // for this object, for example.
02176 if (mprofile.profile_count () == 0)
02177 throw ::CORBA::BAD_PARAM (
02178 CORBA::SystemException::_tao_minor_code (
02179 TAO_MPROFILE_CREATION_ERROR,
02180 0),
02181 CORBA::COMPLETED_NO);
02182
02183 TAO_Stub *stub =
02184 this->orb_core_.create_stub_object (mprofile, type_id, policy_list);
02185
02186 // Add the saved tagged components methods to the profiles.
02187 CORBA::ULong len = this->tagged_component_.length ();
02188 for (CORBA::ULong i = 0; i != len; ++i)
02189 {
02190 this->add_ior_component (mprofile, this->tagged_component_[i]);
02191 }
02192
02193 len = this->tagged_component_id_.length ();
02194
02195 for (CORBA::ULong k = 0; k != len; ++k)
02196 {
02197 this->add_ior_component_to_profile (mprofile,
02198 this->tagged_component_id_[k],
02199 this->profile_id_array_[k]);
02200 }
02201
02202 return stub;
02203 }
|
|
|
Definition at line 83 of file Root_POA.cpp. References ACE_NEW_THROW_EX.
00084 {
00085 TAO::Portable_Server::ThreadPolicy *policy = 0;
00086 ACE_NEW_THROW_EX (policy,
00087 TAO::Portable_Server::ThreadPolicy (value),
00088 CORBA::NO_MEMORY ());
00089
00090 return policy;
00091 }
|
|
||||||||||||
|
Definition at line 1151 of file Root_POA.cpp. References deactivate_all_objects_i(), and wait_for_completions().
01153 {
01154 this->deactivate_all_objects_i (etherealize_objects);
01155
01156 this->wait_for_completions (wait_for_completion);
01157 }
|
|
|
Definition at line 1214 of file Root_POA.cpp. References active_policy_strategies_, TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(), and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by deactivate_all_objects_i(), TAO_POA_Manager::deactivate_i(), and destroy_i().
01215 {
01216 this->active_policy_strategies_.request_processing_strategy ()->
01217 etherealize_objects (etherealize_objects);
01218
01219 this->active_policy_strategies_.servant_retention_strategy ()->
01220 deactivate_all_objects ();
01221 }
|
|
|
Definition at line 1224 of file Root_POA.cpp. References deactivate_object_i(), and TAO_POA_GUARD. Referenced by deactivate_object_i().
01225 {
01226 // Lock access for the duration of this transaction.
01227 TAO_POA_GUARD;
01228
01229 this->deactivate_object_i (oid);
01230 }
|
|
|
Definition at line 1234 of file Root_POA.cpp. References active_policy_strategies_, deactivate_object(), and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by deactivate_object().
01235 {
01236 this->active_policy_strategies_.servant_retention_strategy()->
01237 deactivate_object (id);
01238 }
|
|
|
Definition at line 201 of file Root_POA.inl. References outstanding_requests_. Referenced by TAO::Portable_Server::Servant_Upcall::poa_cleanup().
00202 {
00203 return --this->outstanding_requests_;
00204 }
|
|
|
Definition at line 915 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().
00916 {
00917 int result = 0;
00918
00919 // If we are not closing down, we must remove this child from our
00920 // collection.
00921 if (!this->cleanup_in_progress_)
00922 result = this->children_.unbind (child);
00923
00924 // Otherwise, if we are closing down, we are currently iterating
00925 // over our children and there is not need to remove this child from
00926 // our collection.
00927
00928 return result;
00929 }
|
|
||||||||||||
|
Definition at line 737 of file Root_POA.cpp. References destroy_i(). Referenced by TAO_Object_Adapter::close().
00739 {
00740 // Lock access for the duration of this transaction.
00741 TAO::Portable_Server::POA_Guard poa_guard (*this , 0);
00742 ACE_UNUSED_ARG (poa_guard);
00743
00744 this->destroy_i (etherealize_objects,
00745 wait_for_completion);
00746 }
|
|
||||||||||||
|
Definition at line 755 of file Root_POA.cpp. References active_policy_strategies_, adapter_state_, adapter_state_changed(), ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::begin(), check_for_valid_wait_for_completions(), children_, cleanup_in_progress_, complete_destruction_i(), deactivate_all_objects_i(), TAO::ORT_Adapter_Factory::destroy(), ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::end(), TAO::ORT_Adapter::get_adapter_template(), TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(), TAO_Object_Adapter::non_servant_upcall_in_progress(), object_adapter(), ort_adapter_, ORT_adapter_factory(), ORT_adapter_i(), outstanding_requests_, TAO::Portable_Server::Non_Servant_Upcall::poa(), poa_deactivated_hook(), PortableServer::POA_var, TAO::ORT_Adapter::release(), remove_from_parent_i(), ACE_Array_Base< T >::size(), and waiting_destruction_. Referenced by destroy().
00757 {
00758 if (this->cleanup_in_progress_)
00759 return;
00760
00761 // Is the <wait_for_completion> semantics for this thread correct?
00762 TAO_Root_POA::check_for_valid_wait_for_completions (this->orb_core (),
00763 wait_for_completion);
00764
00765 this->cleanup_in_progress_ = 1;
00766
00767 // Inform the custom servant dispatching strategy to stop the working
00768 // threads when the poa is destroyed.
00769 this->poa_deactivated_hook ();
00770
00771 // This operation destroys the POA and all descendant POAs. The POA
00772 // so destroyed (that is, the POA with its name) may be re-created
00773 // later in the same process. (This differs from the
00774 // POAManager::deactivate operation that does not allow a
00775 // re-creation of its associated POA in the same process.)
00776
00777 // Remove POA from the parent
00778 this->remove_from_parent_i ();
00779
00780 TAO::ORT_Array array_obj_ref_template (1);
00781
00782 CORBA::ULong i = 0;
00783
00784 // Gather all ObjectReferenceTemplates and change all adapter states
00785 // to INACTIVE.
00786 for (CHILDREN::iterator iterator = this->children_.begin ();
00787 iterator != this->children_.end ();
00788 ++iterator)
00789 {
00790 TAO_Root_POA * const child_poa = (*iterator).int_id_;
00791
00792 TAO::ORT_Adapter * const adapter = child_poa->ORT_adapter_i ();
00793
00794 // In case no ORT library is linked we get zero.
00795 if (adapter != 0)
00796 {
00797 // Get the ObjectReferenceTemplate for the child POA.
00798 PortableInterceptor::ObjectReferenceTemplate * const ort =
00799 adapter->get_adapter_template ();
00800
00801 // Add it to the sequence of object reference templates that
00802 // will be destroyed.
00803 array_obj_ref_template.size (1);
00804
00805 array_obj_ref_template[0] = ort;
00806 }
00807
00808 child_poa->adapter_state_ =
00809 PortableInterceptor::INACTIVE;
00810
00811 // Notify the state changes to the IORInterceptors
00812 this->adapter_state_changed (array_obj_ref_template,
00813 PortableInterceptor::INACTIVE);
00814
00815 if (adapter != 0)
00816 adapter->release (array_obj_ref_template[0]);
00817
00818 ++i;
00819 }
00820
00821 // Destroy all child POA's now.
00822 for (CHILDREN::iterator destroy_iterator = this->children_.begin ();
00823 destroy_iterator != this->children_.end ();
00824 ++destroy_iterator)
00825 {
00826 TAO_Root_POA *destroy_child_poa = (*destroy_iterator).int_id_;
00827
00828 destroy_child_poa->destroy_i (etherealize_objects,
00829 wait_for_completion);
00830 }
00831
00832 // Notify the lifespan strategy of our shutdown
00833 this->active_policy_strategies_.lifespan_strategy()->notify_shutdown ();
00834
00835 // @todo, is the exception handling above correct, should we just fail when
00836 // the notify above fails
00837
00838 // When a POA is destroyed, any requests that have started execution
00839 // continue to completion. Any requests that have not started
00840 // execution are processed as if they were newly arrived, that is,
00841 // the POA will attempt to cause recreation of the POA by invoking
00842 // one or more adapter activators as described in Section 3.3.3.
00843 // If the wait_for_completion parameter is TRUE, the destroy
00844 // operation will return only after all requests in process have
00845 // completed and all invocations of etherealize have
00846 // completed. Otherwise, the destroy operation returns after
00847 // destroying the POAs.
00848
00849 this->deactivate_all_objects_i (etherealize_objects,
00850 wait_for_completion);
00851
00852 // If there are no outstanding requests and that we are not in a
00853 // non-servant upcall or if we are in a non-servant upcall, make
00854 // sure we are the POA related to the non-servant upcall.
00855 TAO::Portable_Server::Non_Servant_Upcall *non_servant_upcall_in_progress =
00856 this->object_adapter ().non_servant_upcall_in_progress ();
00857 if (this->outstanding_requests_ == 0 &&
00858 (non_servant_upcall_in_progress == 0 ||
00859 &non_servant_upcall_in_progress->poa () != this))
00860 {
00861 TAO::ORT_Array my_array_obj_ref_template;
00862
00863 TAO::ORT_Adapter * const ort_adapter =
00864 this->ORT_adapter_i ();
00865
00866 // In case no ORT library is linked we get zero.
00867 if (ort_adapter != 0)
00868 {
00869 // Get the ObjectReferenceTemplate.
00870 PortableInterceptor::ObjectReferenceTemplate * const ort =
00871 ort_adapter->get_adapter_template ();
00872
00873 // Add it to the sequence of object reference templates, we
00874 // just notify for ourselves that we are now non_existent,
00875 // our childs will do it for themselves.
00876 my_array_obj_ref_template.size (1);
00877 my_array_obj_ref_template[0] = ort;
00878 }
00879
00880 // According to the ORT spec, after a POA is destroyed, its state
00881 // has to be changed to NON_EXISTENT and all the registered
00882 // interceptors are to be informed. Since, the POA is destroyed
00883 // and is released in the complete_destruction_i method, we are
00884 // trying to keep the poa still around by doing a duplicate of
00885 // it. (a hack).
00886 PortableServer::POA_var poa = PortableServer::POA::_duplicate (this);
00887
00888 this->complete_destruction_i ();
00889
00890 this->adapter_state_ = PortableInterceptor::NON_EXISTENT;
00891
00892 this->adapter_state_changed (my_array_obj_ref_template,
00893 this->adapter_state_);
00894
00895 if (ort_adapter != 0)
00896 {
00897 ort_adapter->release (my_array_obj_ref_template[0]);
00898
00899 TAO::ORT_Adapter_Factory *ort_factory =
00900 this->ORT_adapter_factory ();
00901
00902 ort_factory->destroy (ort_adapter);
00903
00904 this->ort_adapter_ = 0;
00905 }
00906 }
00907 else
00908 {
00909 // Mark that we are ready for destruction.
00910 this->waiting_destruction_ = 1;
00911 }
00912 }
|
|
|
Definition at line 2500 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().
02501 {
02502 return this->active_policy_strategies_.thread_strategy ()->enter();
02503 }
|
|
|
This method calls IORInterceptor::establish_components() method on all registered IORInterceptors, and IORInterceptor::components_established() once the former is completed. Definition at line 2072 of file Root_POA.cpp. References TAO_IORInterceptor_Adapter::establish_components(), and TAO_ORB_Core::ior_interceptor_adapter(). Referenced by TAO_Object_Adapter::open().
02073 {
02074 TAO_IORInterceptor_Adapter *ior_adapter =
02075 this->orb_core_.ior_interceptor_adapter ();
02076
02077 if (ior_adapter)
02078 {
02079 ior_adapter->establish_components (this);
02080 }
02081 }
|
|
|
Definition at line 2508 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().
02509 {
02510 return this->active_policy_strategies_.thread_strategy ()->exit();
02511 }
|
|
||||||||||||
|
Definition at line 551 of file Root_POA.cpp. References find_POA_i(), and TAO_POA_GUARD_RETURN.
00553 {
00554 // Lock access for the duration of this transaction.
00555 TAO_POA_GUARD_RETURN (0);
00556
00557 TAO_Root_POA *poa = this->find_POA_i (adapter_name, activate_it);
00558
00559 return PortableServer::POA::_duplicate (poa);
00560 }
|
|
||||||||||||
|
Definition at line 565 of file Root_POA.cpp. References adapter_activator_, check_state(), children_, ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find(), and CORBA::is_nil(). Referenced by TAO_Object_Adapter::activate_poa(), and find_POA().
00567 {
00568 TAO_Root_POA *child = 0;
00569 int result = this->children_.find (child_name, child);
00570
00571 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT)
00572
00573 if (result != 0)
00574 {
00575 if (activate_it)
00576 {
00577 if (!CORBA::is_nil (this->adapter_activator_.in ()))
00578 {
00579 // Check our state
00580 this->check_state ();
00581
00582 CORBA::Boolean success = false;
00583 try
00584 {
00585 // ATTENTION: Trick locking here, see class header for details
00586 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (
00587 *this);
00588 ACE_UNUSED_ARG (non_servant_upcall);
00589
00590 // When unknown_adapter gives a system exception, the POA
00591 // should raise OBJ_ADAPTER with standard minor code 1.
00592 // See 11.3.9.2 of the Corba spec
00593 success =
00594 this->adapter_activator_->unknown_adapter (
00595 this,
00596 child_name.c_str ());
00597 }
00598 catch (const ::CORBA::SystemException&)
00599 {
00600 throw ::CORBA::OBJ_ADAPTER (CORBA::OMGVMCID | 1,
00601 CORBA::COMPLETED_NO);
00602 }
00603
00604 if (success)
00605 {
00606 result = this->children_.find (child_name,
00607 child);
00608 }
00609 else
00610 {
00611 result = -1;
00612 }
00613 }
00614 else
00615 {
00616 result = -1;
00617 }
00618 }
00619 else
00620 {
00621 result = -1;
00622 }
00623 }
00624 #else
00625 ACE_UNUSED_ARG (activate_it);
00626 #endif /* TAO_HAS_MINIMUM_POA == 0 */
00627
00628 if (result == 0)
00629 {
00630 return child;
00631 }
00632 else
00633 {
00634 // Otherwise, the AdapterNonExistent exception is raised.
00635 throw PortableServer::POA::AdapterNonExistent ();
00636 }
00637 }
|
|
||||||||||||||||
|
Definition at line 2239 of file Root_POA.cpp. References active_policy_strategies_, find_servant(), and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy().
02243 {
02244 return this->active_policy_strategies_.servant_retention_strategy()->
02245 find_servant (system_id,
02246 servant_upcall,
02247 poa_current_impl);
02248 }
|
|
|
||||||||||||
|
Find the the servant with ObjectId , and retrieve its priority.Usually used in RT CORBA with SERVER_DECLARED priority model.
Definition at line 2251 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy().
02254 {
02255 return this->active_policy_strategies_.servant_retention_strategy()->
02256 find_servant_priority (system_id, priority);
02257 }
|
|
|
Definition at line 99 of file Root_POA.inl. Referenced by TAO_Object_Adapter::Active_Hint_Strategy::find_persistent_poa(), and set_folded_name().
00100 {
00101 return this->folded_name_;
00102 }
|
|
|
Accessor methods to POA state. The POA can be in one of HOLDING, ACTIVE, DISCARDING, INACTIVE and NON_EXISTENT states. Definition at line 219 of file Root_POA.inl. References adapter_state_.
00220 {
00221 return this->adapter_state_;
00222 }
|
|
|
Accessor methods to ObjectReferenceTemplate.
Definition at line 38 of file Root_POA.inl. References TAO::ORT_Adapter::get_adapter_template(), ORT_adapter(), and ort_adapter_.
00039 {
00040 TAO::ORT_Adapter *adapter = this->ORT_adapter ();
00041
00042 if (adapter)
00043 {
00044 return this->ort_adapter_->get_adapter_template();
00045 }
00046
00047 return 0;
00048 }
|
|
|
Accessor methods to ObjectReferenceTemplate, non locked version.
Definition at line 51 of file Root_POA.inl. References TAO::ORT_Adapter::get_adapter_template(), ort_adapter_, and ORT_adapter_i().
00052 {
00053 if (this->ORT_adapter_i ())
00054 {
00055 return this->ort_adapter_->get_adapter_template ();
00056 }
00057
00058 return 0;
00059 }
|
|
|
Accessor methods to PortableInterceptor::ObjectReferenceFactory.
Definition at line 62 of file Root_POA.inl. References TAO::ORT_Adapter::get_obj_ref_factory(), ORT_adapter(), and ort_adapter_.
00063 {
00064 TAO::ORT_Adapter *adapter = this->ORT_adapter ();
00065
00066 if (adapter)
00067 {
00068 return this->ort_adapter_->get_obj_ref_factory();
00069 }
00070
00071 return 0;
00072 }
|
|
|
Get the set policy of the given type.
Definition at line 2584 of file Root_POA.cpp. References TAO_POA_Policy_Set::get_policy().
02585 {
02586 return this->policies_.get_policy (policy);
02587 }
|
|
|
Implements PortableServer::POA. Definition at line 2362 of file Root_POA.cpp. References get_servant_i(), and TAO_POA_GUARD_RETURN. Referenced by get_servant_i().
02363 {
02364 // Lock access for the duration of this transaction.
02365 TAO_POA_GUARD_RETURN (0);
02366
02367 PortableServer::Servant servant = this->get_servant_i ();
02368
02369 if (servant != 0)
02370 {
02371 // ATTENTION: Trick locking here, see class header for details
02372 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (*this);
02373 ACE_UNUSED_ARG (non_servant_upcall);
02374
02375 // The POA invokes _add_ref once on the Servant before returning
02376 // it. If the application uses reference counting, the caller of
02377 // get_servant is responsible for invoking _remove_ref once on
02378 // the returned Servant when it is finished with it. A
02379 // conforming caller need not invoke _remove_ref on the returned
02380 // Servant if the type of the Servant uses the default reference
02381 // counting inherited from ServantBase.
02382 servant->_add_ref ();
02383
02384 return servant;
02385 }
02386 else
02387 {
02388 // If no servant has been associated with the POA, the NoServant
02389 // exception is raised.
02390 throw PortableServer::POA::NoServant ();
02391 }
02392 }
|
|
|
Definition at line 2355 of file Root_POA.cpp. References active_policy_strategies_, get_servant(), and TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(). Referenced by get_servant().
02356 {
02357 return this->active_policy_strategies_.request_processing_strategy()->
02358 get_servant ();
02359 }
|
|
|
Implements PortableServer::POA. Definition at line 2335 of file Root_POA.cpp. References active_policy_strategies_, TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(), and TAO_POA_GUARD_RETURN.
02336 {
02337 // Lock access for the duration of this transaction.
02338 TAO_POA_GUARD_RETURN (PortableServer::ServantManager::_nil ());
02339
02340 return this->active_policy_strategies_.request_processing_strategy()->
02341 get_servant_manager ();
02342 }
|
|
|
Definition at line 2415 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::id_assignment_strategy(). Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::activate_object(), TAO::Portable_Server::ServantRetentionStrategyRetain::activate_object_with_id(), create_reference_i(), and create_reference_with_id_i().
02416 {
02417 return this->active_policy_strategies_.id_assignment_strategy ()->
02418 has_system_id ();
02419 }
|
|
|
Definition at line 1510 of file Root_POA.cpp. References ACE_NEW_THROW_EX.
01511 {
01512 CORBA::OctetSeq *id = 0;
01513 ACE_NEW_THROW_EX (id,
01514 CORBA::OctetSeq (this->id_),
01515 CORBA::NO_MEMORY ());
01516
01517 return id;
01518 }
|
|
|
Definition at line 714 of file Root_POA.cpp. References id_to_reference_i(), and TAO_POA_GUARD_RETURN. Referenced by TAO::Portable_Server::POA_Current_Impl::get_reference(), and id_to_reference_i().
00715 {
00716 // Lock access for the duration of this transaction.
00717 TAO_POA_GUARD_RETURN (0);
00718
00719 return this->id_to_reference_i (oid, true);
00720 }
|
|
||||||||||||
|
Definition at line 1501 of file Root_POA.cpp. References active_policy_strategies_, id_to_reference(), and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by id_to_reference().
01504 {
01505 return this->active_policy_strategies_.servant_retention_strategy()->
01506 id_to_reference (id, indirect);
01507 }
|
|
|
Definition at line 705 of file Root_POA.cpp. References id_to_servant_i(), and TAO_POA_GUARD_RETURN. Referenced by id_to_servant_i().
00706 {
00707 // Lock access for the duration of this transaction.
00708 TAO_POA_GUARD_RETURN (0);
00709
00710 return this->id_to_servant_i (oid);
00711 }
|
|
|
Definition at line 1465 of file Root_POA.cpp. References active_policy_strategies_, id_to_servant(), and TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(). Referenced by id_to_servant().
01467 {
01468
01469 PortableServer::Servant servant =
01470 this->active_policy_strategies_.request_processing_strategy()->
01471 id_to_servant (id);
01472
01473 if (servant != 0)
01474 {
01475 // ATTENTION: Trick locking here, see class header for details
01476 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (*this);
01477 ACE_UNUSED_ARG (non_servant_upcall);
01478
01479 // The POA invokes _add_ref once on the Servant before returning
01480 // it. If the application uses reference counting, the caller of
01481 // id_to_servant is responsible for invoking _remove_ref once on
01482 // the returned Servant when it is finished with it. A
01483 // conforming caller need not invoke _remove_ref on the returned
01484 // Servant if the type of the Servant uses the default reference
01485 // counting inherited from ServantBase.
01486 servant->_add_ref ();
01487 }
01488
01489 return servant;
01490 }
|
|
|
Gets the value of TAO_POA_Static_Resources::imr_client_adapter_name_.
Definition at line 2608 of file Root_POA.cpp. References TAO_POA_Static_Resources::imr_client_adapter_name_, and TAO_POA_Static_Resources::instance().
02609 {
02610 return TAO_POA_Static_Resources::instance ()->imr_client_adapter_name_.c_str();
02611 }
|
|
|
Sets the value of TAO_POA_Static_Resources::imr_client_adapter_name_.
Definition at line 2602 of file Root_POA.cpp. References TAO_POA_Static_Resources::imr_client_adapter_name_, and TAO_POA_Static_Resources::instance().
02603 {
02604 TAO_POA_Static_Resources::instance ()->imr_client_adapter_name_ = name;
02605 }
|
|
|
Definition at line 195 of file Root_POA.inl. References outstanding_requests_. Referenced by TAO::Portable_Server::Servant_Upcall::prepare_for_upcall_i().
00196 {
00197 return ++this->outstanding_requests_;
00198 }
|
|
|
Definition at line 1884 of file Root_POA.cpp. References 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_. Referenced by invoke_key_to_object_helper_i().
01885 {
01886 PortableServer::ObjectId_var &system_id =
01887 *this->key_to_object_params_.system_id_;
01888
01889 // Create object key.
01890 TAO::ObjectKey_var key =
01891 this->create_object_key (system_id.in ());
01892
01893 return this->key_to_object (key.in (),
01894 this->key_to_object_params_.type_id_,
01895 this->key_to_object_params_.servant_,
01896 this->key_to_object_params_.collocated_,
01897 this->key_to_object_params_.priority_,
01898 this->key_to_object_params_.indirect_);
01899 }
|
|
||||||||||||
|
|
Definition at line 1241 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(). Referenced by set_id().
01242 {
01243 return active_policy_strategies_.lifespan_strategy()->is_persistent ();
01244 }
|
|
||||||||||||
|
Definition at line 1371 of file Root_POA.cpp. References parse_key(), TAO_Object_Adapter::poa_name, root(), system_id(), system_name(), and validate_lifespan(). Referenced by reference_to_id(), and reference_to_servant_i().
01373 {
01374 TAO::ObjectKey_var key = reference->_key ();
01375
01376 TAO_Object_Adapter::poa_name poa_system_name;
01377 CORBA::Boolean is_root = false;
01378 CORBA::Boolean is_persistent = false;
01379 CORBA::Boolean is_system_id = false;
01380 TAO::Portable_Server::Temporary_Creation_Time poa_creation_time;
01381
01382 int const result = this->parse_key (key.in (),
01383 poa_system_name,
01384 system_id,
01385 is_root,
01386 is_persistent,
01387 is_system_id,
01388 poa_creation_time);
01389 if (result != 0 ||
01390 !this->root () &&
01391 poa_system_name != this->system_name () ||
01392 is_root != this->root () ||
01393 is_system_id != this->system_id () ||
01394 !this->validate_lifespan (is_persistent, poa_creation_time))
01395 {
01396 // The passed reference is NOT generated by this POA
01397 return false;
01398 }
01399 else
01400 {
01401 // The passed reference is generated by this POA
01402 return true;
01403 }
01404 }
|
|
|
Definition at line 1805 of file Root_POA.cpp. References ACE_OS::strncmp(). Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::activate_object_with_id(), and create_reference_with_id_i().
01806 {
01807 #if defined (POA_NAME_IN_POA_GENERATED_ID)
01808
01809 // Grab the buffer
01810 const char *id_buffer = (const char *) id.get_buffer ();
01811
01812 // Check to see if the POA name is the first part of the id
01813 return
01814 this->name_.length () < id.length () &&
01815 ACE_OS::strncmp (id_buffer,
01816 this->name_.c_str (),
01817 this->name_.length ()) == 0;
01818 #else /* POA_NAME_IN_POA_GENERATED_ID */
01819
01820 ACE_UNUSED_ARG (id);
01821 return 1;
01822
01823 #endif /* POA_NAME_IN_POA_GENERATED_ID */
01824 }
|
|
||||||||||||
|
Definition at line 2407 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::id_uniqueness_strategy(). Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::activate_object(), TAO::Portable_Server::ServantRetentionStrategyRetain::activate_object_with_id(), and TAO::Portable_Server::RequestProcessingStrategyServantActivator::locate_servant().
02409 {
02410 return this->active_policy_strategies_.id_uniqueness_strategy ()->
02411 is_servant_activation_allowed (servant, wait_occurred_restart_call);
02412 }
|
|
||||||||||||
|
Definition at line 2472 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().
02475 {
02476 return this->active_policy_strategies_.servant_retention_strategy ()->
02477 is_servant_in_map (servant, wait_occurred_restart_call);
02478 }
|
|
||||||||||||||||||||||||||||
|
Wrapper for the ORB's key_to_object that will alter the object pointer if the ImplRepo is used. Definition at line 1902 of file Root_POA.cpp. References CORBA::Object::_nil(), ACE_CString, ACE_DEBUG, 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().
01908 {
01909 // Check if the ORB is still running, otherwise throw an exception.
01910 // @@ What if the ORB was destroyed? In that case we shouldn't even
01911 // get here!
01912 this->orb_core_.check_shutdown ();
01913
01914 //
01915 // ImplRepo related.
01916 //
01917 #if (TAO_HAS_MINIMUM_CORBA == 0)
01918
01919 CORBA::Object_ptr obj = CORBA::Object::_nil ();
01920
01921 if (indirect && this->active_policy_strategies_.lifespan_strategy()->use_imr ()
01922 && this->orb_core ().imr_endpoints_in_ior ())
01923 {
01924 // Check to see if we alter the IOR.
01925 CORBA::Object_var imr = this->orb_core ().implrepo_service ();
01926
01927 if (CORBA::is_nil (imr.in ())
01928 || !imr->_stubobj ()
01929 || !imr->_stubobj ()->profile_in_use ())
01930 {
01931 if (TAO_debug_level > 1)
01932 {
01933 ACE_DEBUG ((LM_DEBUG,
01934 "Missing ImR IOR, will not use the ImR\n"));
01935 }
01936 goto orbkey;
01937 }
01938
01939 CORBA::String_var imr_str =
01940 imr->_stubobj ()->profile_in_use ()->to_string ();
01941
01942 if (TAO_debug_level > 0)
01943 ACE_DEBUG ((LM_DEBUG,
01944 "IMR IOR = \n%s\n",
01945 ACE_TEXT_CHAR_TO_TCHAR (imr_str.in ())));
01946
01947 // Search for "corbaloc:" alone, without the protocol. This code
01948 // should be protocol neutral.
01949 const char corbaloc[] = "corbaloc:";
01950 char *pos = ACE_OS::strstr (imr_str.inout (), corbaloc);
01951 pos = ACE_OS::strchr (pos + sizeof (corbaloc), ':');
01952
01953 pos = ACE_OS::strchr (pos + 1,
01954 imr->_stubobj ()->profile_in_use ()->object_key_delimiter ());
01955
01956 if (pos)
01957 pos[1] = 0; // Crop the string.
01958 else
01959 {
01960 if (TAO_debug_level > 0)
01961 ACE_ERROR ((LM_ERROR,
01962 "Could not parse ImR IOR, skipping ImRification\n"));
01963 goto orbkey;
01964 }
01965
01966 ACE_CString ior (imr_str.in ());
01967
01968 // Add the key.
01969
01970 CORBA::String_var key_str;
01971 TAO::ObjectKey::encode_sequence_to_string (key_str.inout (), key);
01972
01973 ior += key_str.in ();
01974
01975 if (TAO_debug_level > 0)
01976 ACE_DEBUG ((LM_DEBUG,
01977 "ImR-ified IOR = \n%s\n",
01978 ACE_TEXT_CHAR_TO_TCHAR (ior.c_str ())));
01979
01980 obj = this->orb_core_.orb ()->string_to_object (ior.c_str ());
01981
01982 return obj;
01983 }
01984
01985 orbkey:
01986
01987 #else
01988 ACE_UNUSED_ARG (indirect);
01989 #endif /* TAO_HAS_MINIMUM_CORBA */
01990
01991 TAO_Stub *data = this->key_to_stub_i (key, type_id, priority);
01992
01993 TAO_Stub_Auto_Ptr safe_data (data);
01994
01995 CORBA::Object_ptr tmp;
01996
01997 if (this->orb_core_.optimize_collocation_objects ())
01998 {
01999 ACE_NEW_THROW_EX (tmp, CORBA::Object (data,
02000 collocated,
02001 servant),
02002 CORBA::INTERNAL ());
02003
02004 }
02005 else
02006 {
02007 ACE_NEW_THROW_EX (tmp,
02008 CORBA::Object (data,
02009 collocated),
02010 CORBA::INTERNAL ());
02011 }
02012
02013 data->servant_orb (this->orb_core_.orb ());
02014
02015 // Transfer ownership to the Object.
02016 (void) safe_data.release ();
02017
02018 return tmp;
02019 }
|
|
||||||||||||||||
|
Create the correct stub, properly initialized with the attributes and policies attached to the current POA. Definition at line 2022 of file Root_POA.cpp. References TAO_ORB_Core::check_shutdown(), and key_to_stub_i().
02025 {
02026 // Check if the ORB is still running, otherwise throw an exception.
02027 // @@ What if the ORB was destroyed? In that case we shouldn't even
02028 // get here!
02029 this->orb_core_.check_shutdown ();
02030
02031 return this->key_to_stub_i (key, type_id, priority);
02032 }
|
|
||||||||||||||||
|
Like key_to_stub() but assume that the ORB is not shutting down.
Definition at line 2035 of file Root_POA.cpp. References TAO_Thread_Lane_Resources::acceptor_registry(), ACE_NEW_RETURN, 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().
02038 {
02039 CORBA::PolicyList_var client_exposed_policies =
02040 this->client_exposed_policies (priority);
02041
02042 TAO_Acceptor_Filter* filter = 0;
02043
02044 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
02045 if (this->filter_factory_ == 0)
02046 this->filter_factory_
02047 = ACE_Dynamic_Service<TAO_Acceptor_Filter_Factory>::instance ("TAO_Acceptor_Filter_Factory");
02048
02049 filter =
02050 this->filter_factory_->create_object (this->poa_manager_);
02051 #else
02052 ACE_NEW_RETURN (filter,
02053 TAO_Default_Acceptor_Filter (),
02054 0);
02055 #endif
02056
02057 // Give ownership to the auto pointer.
02058 auto_ptr<TAO_Acceptor_Filter> new_filter (filter);
02059
02060 TAO_Stub *data =
02061 this->create_stub_object (
02062 key,
02063 type_id,
02064 client_exposed_policies._retn (),
02065 filter,
02066 this->orb_core_.lane_resources ().acceptor_registry ());
02067
02068 return data;
02069 }
|
|
||||||||||||||||||||||||
|
Definition at line 1521 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy().
01527 {
01528 return this->active_policy_strategies_.request_processing_strategy()->
01529 locate_servant (operation,
01530 system_id,
01531 servant_upcall,
01532 poa_current_impl,
01533 wait_occurred_restart_call
01534 );
01535 }
|
|
||||||||||||
|
Definition at line 2223 of file Root_POA.cpp. References 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().
02225 {
02226 return this->active_policy_strategies_.request_processing_strategy()->
02227 locate_servant (system_id, servant);
02228 }
|
|
|
Definition at line 14 of file Root_POA.inl.
00015 {
00016 return this->lock_;
00017 }
|
|
|
Definition at line 87 of file Root_POA.inl. Referenced by TAO_Object_Adapter::activate_poa().
00088 {
00089 return this->name_;
00090 }
|
|
|
Definition at line 111 of file Root_POA.inl. Referenced by TAO_Object_Adapter::poa_name_iterator::operator++(), and set_folded_name().
00112 {
00113 return '\0';
00114 }
|
|
|
Definition at line 117 of file Root_POA.inl. Referenced by TAO_Object_Adapter::poa_name_iterator::operator *(), and set_folded_name().
00118 {
00119 return sizeof (char);
00120 }
|
|
|
obtain a handle to the network priority hooks
Definition at line 2487 of file Root_POA.cpp. References network_priority_hook_. Referenced by TAO_Default_Servant_Dispatcher::pre_invoke_remote_request().
02488 {
02489 return this->network_priority_hook_;
02490 }
|
|
||||||||||||||||||||||||||||||||||||
|
Template method for creating new POA's of this type.
Definition at line 449 of file Root_POA.cpp. References ACE_NEW_THROW_EX, PortableServer::POAManager_ptr, and String. Referenced by create_POA_i().
00457 {
00458 TAO_Regular_POA *poa = 0;
00459
00460 ACE_NEW_THROW_EX (poa,
00461 TAO_Regular_POA (name,
00462 poa_manager,
00463 policies,
00464 parent,
00465 lock,
00466 thread_lock,
00467 orb_core,
00468 object_adapter),
00469 CORBA::NO_MEMORY ());
00470
00471 return poa;
00472 }
|
|
|
Definition at line 165 of file Root_POA.inl. Referenced by parse_key(), TAO_Regular_POA::root_key_type(), and set_id().
00166 {
00167 return 'N';
00168 }
|
|
|
Definition at line 1878 of file Root_POA.cpp. Referenced by complete_destruction_i(), create_POA_i(), destroy_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::Portable_Server::POA_Guard::POA_Guard(), TAO_Root_POA(), and wait_for_completions().
01879 {
01880 return *this->object_adapter_;
01881 }
|
|
|
ORB Core for POA.
Reimplemented from CORBA::Object. Definition at line 213 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().
00214 {
00215 return this->orb_core_;
00216 }
|
|
|
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 2530 of file Root_POA.cpp. References ort_adapter_, ORT_adapter_i(), and TAO_POA_GUARD_RETURN. Referenced by get_adapter_template(), get_obj_ref_factory(), and set_obj_ref_factory().
02531 {
02532 if (this->ort_adapter_ != 0)
02533 return this->ort_adapter_;
02534
02535 // Lock access for the duration of this transaction.
02536 TAO_POA_GUARD_RETURN (0);
02537
02538 // DCL ..
02539 if (this->ort_adapter_ != 0)
02540 {
02541 return this->ort_adapter_;
02542 }
02543
02544 return this->ORT_adapter_i ();
02545 }
|
|
|
Definition at line 2260 of file Root_POA.cpp. References TAO_ORB_Core::configuration(), and ort_adapter_factory_name(). Referenced by destroy_i(), and ORT_adapter_i().
02261 {
02262 return ACE_Dynamic_Service<TAO::ORT_Adapter_Factory>::instance
02263 (orb_core_.configuration (),
02264 TAO_Root_POA::ort_adapter_factory_name ());
02265 }
|
|
|
Definition at line 2596 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().
02597 {
02598 return TAO_POA_Static_Resources::instance ()->ort_adapter_factory_name_.c_str();
02599 }
|
|
|
Definition at line 2577 of file Root_POA.cpp. References TAO_POA_Static_Resources::instance(), and TAO_POA_Static_Resources::ort_adapter_factory_name_.
02578 {
02579 TAO_POA_Static_Resources::instance ()->ort_adapter_factory_name_ =
02580 name;
02581 }
|
|
|
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 2268 of file Root_POA.cpp. References 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(), get_adapter_template_i(), invoke_key_to_object_helper_i(), and ORT_adapter().
02269 {
02270 if (this->ort_adapter_ != 0)
02271 return this->ort_adapter_;
02272
02273 try
02274 {
02275 TAO::ORT_Adapter_Factory * ort_ap_factory = this->ORT_adapter_factory ();
02276
02277 if (!ort_ap_factory)
02278 return 0;
02279
02280 // Get the full adapter name of this POA, do this before we
02281 // create the adapter so that in case this fails, we just
02282 // return 0 and not a not activated adapter
02283 PortableInterceptor::AdapterName *adapter_name = this->adapter_name_i ();
02284
02285 this->ort_adapter_ = ort_ap_factory->create ();
02286
02287 if (!this->ort_adapter_)
02288 return 0;
02289
02290 // @todo We have to look at this, we activate it but hold the POA lock,
02291 // in case we are called by ORT_adapter, we shouldn't keep the lock
02292 // here, but then the ort_adapter should be guarded against multiple
02293 // activations.
02294 this->ort_adapter_->activate (this->orb_core_.server_id (),
02295 this->orb_core_.orbid (),
02296 adapter_name,
02297 this);
02298 }
02299 catch (const ::CORBA::Exception& ex)
02300 {
02301 ex._tao_print_exception (
02302 "(%P|%t) Cannot initialize the "
02303 "object_reference_template_adapter\n");
02304 }
02305
02306 return this->ort_adapter_;
02307 }
|
|
|
Definition at line 189 of file Root_POA.inl. References outstanding_requests_.
00190 {
00191 this->outstanding_requests_ = new_outstanding_requests;
00192 }
|
|
|
Definition at line 183 of file Root_POA.inl. References outstanding_requests_. Referenced by TAO::Portable_Server::Non_Servant_Upcall::~Non_Servant_Upcall().
00184 {
00185 return this->outstanding_requests_;
00186 }
|
|
||||||||||||
|
Calls protected static method used when POACurrent is not appropriate.
Definition at line 1859 of file Root_POA.cpp. References parse_key(), and TAO_Object_Adapter::poa_name.
01861 {
01862 TAO_Object_Adapter::poa_name poa_system_name;
01863 CORBA::Boolean is_root = false;
01864 CORBA::Boolean is_persistent = false;
01865 CORBA::Boolean is_system_id = false;
01866 TAO::Portable_Server::Temporary_Creation_Time poa_creation_time;
01867
01868 return TAO_Root_POA::parse_key (object_key,
01869 poa_system_name,
01870 user_id,
01871 is_root,
01872 is_persistent,
01873 is_system_id,
01874 poa_creation_time);
01875 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 1539 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().
01546 {
01547 // Get the object key octets.
01548 const CORBA::Octet *key_data = key.get_buffer ();
01549
01550 // Skip the object key prefix since we have already checked for this.
01551 CORBA::ULong starting_at = TAO_OBJECTKEY_PREFIX_SIZE;
01552
01553 // Check the root indicator.
01554 char root_key_type = key_data[starting_at];
01555 if (root_key_type == TAO_Root_POA::root_key_char ())
01556 {
01557 is_root = true;
01558 }
01559 else if (root_key_type == TAO_Root_POA::non_root_key_char ())
01560 {
01561 is_root = false;
01562 }
01563 else
01564 {
01565 // Incorrect key
01566 return -1;
01567 }
01568
01569 // Skip past the system id indicator
01570 starting_at += TAO_Root_POA::root_key_type_length ();
01571
01572 // Check the system id indicator.
01573 char system_id_key_type = key_data[starting_at];
01574 if (system_id_key_type == TAO_Root_POA::system_id_key_char ())
01575 {
01576 is_system_id = true;
01577 }
01578 else if (system_id_key_type == TAO_Root_POA::user_id_key_char ())
01579 {
01580 is_system_id = false;
01581 }
01582 else
01583 {
01584 // Incorrect key
01585 return -1;
01586 }
01587
01588 // Skip past the system id indicator
01589 starting_at += TAO_Root_POA::system_id_key_type_length ();
01590
01591 // Check the persistence indicator
01592 char persistent_key_type = key_data[starting_at];
01593 if (persistent_key_type == TAO_Root_POA::persistent_key_char ())
01594 {
01595 is_persistent = true;
01596 }
01597 else if (persistent_key_type == TAO_Root_POA::transient_key_char ())
01598 {
01599 is_persistent = false;
01600 }
01601 else
01602 {
01603 // Incorrect key
01604 return -1;
01605 }
01606
01607 // Skip past the persistent indicator
01608 starting_at += TAO_Root_POA::persistent_key_type_length ();
01609
01610 #if (POA_NO_TIMESTAMP == 0)
01611 // Grab the timestamp for transient POAs.
01612 if (!is_persistent)
01613 {
01614 // Take the creation time for the timestamp
01615 poa_creation_time.creation_time (key_data + starting_at);
01616
01617 // Skip past the timestamp
01618 starting_at += TAO::Portable_Server::Creation_Time::creation_time_length ();
01619 }
01620 #else
01621 ACE_UNUSED_ARG (poa_creation_time);
01622 #endif /* POA_NO_TIMESTAMP */
01623
01624 // Calculate the size of the POA name.
01625 CORBA::ULong poa_name_size = 0;
01626 if (!is_persistent)
01627 {
01628 // Transient POAs have fixed size.
01629 poa_name_size = TAO_Object_Adapter::transient_poa_name_size ();
01630 }
01631 else if (is_system_id)
01632 {
01633 // System ids have fixed size.
01634 poa_name_size = static_cast <CORBA::ULong>
01635 (key.length () - starting_at -
01636 TAO_Active_Object_Map::system_id_size ());
01637 }
01638 else
01639 {
01640 // Get the size from the object key.
01641 ACE_OS::memcpy (&poa_name_size,
01642 key_data + starting_at,
01643 sizeof (poa_name_size));
01644 poa_name_size = ACE_NTOHL (poa_name_size);
01645
01646 starting_at += sizeof (poa_name_size);
01647 }
01648
01649 // Grep the name if there is a name
01650 if (!is_root)
01651 {
01652 poa_system_name.replace (poa_name_size,
01653 poa_name_size,
01654 (CORBA::Octet *) key_data + starting_at,
01655 0);
01656
01657 starting_at += poa_name_size;
01658 }
01659
01660 // The rest is the system id.
01661 CORBA::ULong system_id_size = key.length () - starting_at;
01662
01663 // Reset <system_id>.
01664 system_id.length (system_id_size);
01665 CORBA::Octet * buf = system_id.get_buffer ();
01666 ACE_OS::memcpy (buf, key_data + starting_at, system_id_size);
01667
01668 // Success
01669 return 0;
01670 }
|
|
|
Definition at line 81 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().
00082 {
00083 return (this->cached_policies_.lifespan () == PortableServer::PERSISTENT);
00084 }
|
|
|
Definition at line 123 of file Root_POA.inl. Referenced by parse_key().
00124 {
00125 return 'P';
00126 }
|
|
|
Definition at line 135 of file Root_POA.inl. Referenced by parse_key().
00136 {
00137 return sizeof (char);
00138 }
|
|
|
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 2669 of file Root_POA.cpp.
02670 {
02671 }
|
|
|
Hook - The POA has been deactivated.
Definition at line 2674 of file Root_POA.cpp. Referenced by TAO_POA_Manager::deactivate_i(), and destroy_i().
02675 {
02676 }
|
|
|
Accessor for POA policies.
Definition at line 20 of file Root_POA.inl.
00021 {
00022 return this->policies_;
00023 }
|
|
||||||||||||
|
Definition at line 2457 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().
02460 {
02461 this->active_policy_strategies_.request_processing_strategy ()->
02462 post_invoke_servant_cleanup (system_id, servant_upcall);
02463 }
|
|
|
Definition at line 2493 of file Root_POA.cpp. References TAO::Portable_Server::Cached_Policies::priority_model().
02494 {
02495 return cached_policies_.priority_model ();
02496 }
|
|
||||||||||||||||||||
|
Definition at line 2422 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy().
02427 {
02428 return this->active_policy_strategies_.servant_retention_strategy ()->
02429 rebind_using_user_id_and_system_id (servant,
02430 user_id,
02431 system_id,
02432 servant_upcall);
02433 }
|
|
|
Definition at line 1407 of file Root_POA.cpp. References active_policy_strategies_, CORBA::is_nil(), is_poa_generated(), TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(), and TAO_POA_GUARD_RETURN.
01409 {
01410 // Make sure that the reference is valid.
01411 if (CORBA::is_nil (reference))
01412 {
01413 throw ::CORBA::BAD_PARAM ();
01414 }
01415
01416 // The WrongPolicy exception is declared to allow future extensions.
01417
01418 // This operation is valid only if the reference was created by the
01419 // POA on which the operation is being performed. If the object
01420 // reference was not created by this POA, the WrongAdapter exception
01421 // is raised.
01422 PortableServer::ObjectId system_id;
01423 bool const is_generated = this->is_poa_generated (reference,
01424 system_id
01425 );
01426
01427 if (!is_generated)
01428 {
01429 throw PortableServer::POA::WrongAdapter ();
01430 }
01431
01432 // Lock access for the duration of this transaction.
01433 TAO_POA_GUARD_RETURN (0);
01434
01435 return this->active_policy_strategies_.servant_retention_strategy()->
01436 system_id_to_object_id (system_id);
01437 }
|
|
|
Definition at line 678 of file Root_POA.cpp. References reference_to_servant_i(), and TAO_POA_GUARD_RETURN.
00679 {
00680 // Lock access for the duration of this transaction.
00681 TAO_POA_GUARD_RETURN (0);
00682
00683 return this->reference_to_servant_i (reference);
00684 }
|
|
|
Definition at line 1328 of file Root_POA.cpp. References active_policy_strategies_, CORBA::is_nil(), is_poa_generated(), and TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(). Referenced by reference_to_servant().
01329 {
01330 // Make sure that the reference is valid.
01331 if (CORBA::is_nil (reference))
01332 {
01333 throw ::CORBA::BAD_PARAM ();
01334 }
01335
01336 PortableServer::ObjectId system_id;
01337 bool const is_generated =
01338 this->is_poa_generated (reference, system_id);
01339
01340 if (!is_generated)
01341 {
01342 // In case this object reference is not generated by this POA throw
01343 // an exception
01344 throw PortableServer::POA::WrongAdapter ();
01345 }
01346
01347 PortableServer::Servant servant =
01348 this->active_policy_strategies_.request_processing_strategy()->
01349 system_id_to_servant (system_id);
01350
01351 if (servant != 0)
01352 {
01353 // ATTENTION: Trick locking here, see class header for details
01354 TAO::Portable_Server::Non_Servant_Upcall non_servant_upcall (*this);
01355 ACE_UNUSED_ARG (non_servant_upcall);
01356
01357 // The POA invokes _add_ref once on the Servant before returning
01358 // it. If the application uses reference counting, the caller of
01359 // id_to_servant is responsible for invoking _remove_ref once on
01360 // the returned Servant when it is finished with it. A
01361 // conforming caller need not invoke _remove_ref on the returned
01362 // Servant if the type of the Servant uses the default reference
01363 // counting inherited from ServantBase.
01364 servant->_add_ref ();
01365 }
01366
01367 return servant;
01368 }
|
|
|
Reimplemented in TAO_Regular_POA. Definition at line 749 of file Root_POA.cpp. Referenced by destroy_i().
00750 {
00751 // The root poa has no parent, so this is a noop
00752 }
|
|
|
Reimplemented in TAO_Regular_POA. Definition at line 2524 of file Root_POA.cpp. Referenced by is_poa_generated().
02525 {
02526 return true;
02527 }
|
|
|
Definition at line 159 of file Root_POA.inl. Referenced by parse_key(), root_key_type(), and set_id().
00160 {
00161 return 'R';
00162 }
|
|
|
Reimplemented in TAO_Regular_POA. Definition at line 171 of file Root_POA.inl. References root_key_char(). Referenced by TAO_Regular_POA::root_key_type().
00172 {
00173 return TAO_Root_POA::root_key_char ();
00174 }
|
|
|
Definition at line 177 of file Root_POA.inl. Referenced by parse_key(), and set_id().
00178 {
00179 return sizeof (char);
00180 }
|
|
|
Store the given TaggedComponent for eventual insertion into all object reference profiles. Definition at line 2096 of file Root_POA.cpp. References tagged_component_.
02097 {
02098 CORBA::ULong const old_len = this->tagged_component_.length ();
02099
02100 this->tagged_component_.length (old_len + 1);
02101 this->tagged_component_[old_len] = component;
02102 }
|
|
||||||||||||
|
Store the given TaggedComponent for eventual insertion into all object reference profiles with the given ProfileId. Definition at line 2106 of file Root_POA.cpp. References profile_id_array_, and tagged_component_id_.
02108 {
02109 // The length of this->tagged_component_id_ is the same as the
02110 // length of the profile_id_array_ since we are trying to make a
02111 // one-to-one link between these two arrays. So, whenever
02112 // this->tagged_component_id_ is increased, we need to increase the
02113 // size of this->profile_id_array_ also.
02114
02115 CORBA::ULong const old_len = this->tagged_component_id_.length ();
02116
02117 CORBA::ULong const new_len = old_len + 1;
02118
02119 this->tagged_component_id_.length (new_len);
02120 this->tagged_component_id_[old_len] = component;
02121
02122 this->profile_id_array_.size (new_len);
02123 this->profile_id_array_[old_len] = profile_id;
02124 }
|
|
||||||||||||
|
Hook - A servant has been activated.
Definition at line 2679 of file Root_POA.cpp. Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::activate_object(), TAO::Portable_Server::ServantRetentionStrategyRetain::activate_object_with_id(), TAO::Portable_Server::ServantRetentionStrategyRetain::servant_to_system_id_i(), and TAO::Portable_Server::ServantRetentionStrategyRetain::servant_to_user_id().
02681 {
02682 }
|
|
||||||||||||
|
Hook - A servant has been deactivated.
Definition at line 2685 of file Root_POA.cpp. Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::deactivate_map_entry().
02687 {
02688 }
|
|
|
Definition at line 231 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().
00232 {
00233 return servant_deactivation_condition_;
00234 }
|
|
|
Definition at line 2436 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().
02437 {
02438 return this->active_policy_strategies_.servant_retention_strategy ()->
02439 servant_has_remaining_activations (servant);
02440 }
|
|
||||||||||||
|
Definition at line 2231 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::locate_servant(), TAO::Portable_Server::RequestProcessingStrategyServantActivator::locate_servant(), TAO::Portable_Server::RequestProcessingStrategyDefaultServant::locate_servant(), and TAO::Portable_Server::RequestProcessingStrategyAOMOnly::locate_servant().
02233 {
02234 return this->active_policy_strategies_.servant_retention_strategy()->
02235 servant_present (system_id, servant);
02236 }
|
|
|
Definition at line 660 of file Root_POA.cpp. References servant_to_id_i(), and TAO_POA_GUARD_RETURN. Referenced by servant_to_id_i().
00661 {
00662 // If we had upgradeable locks, this would initially be a read lock
00663 //
00664 // Lock access for the duration of this transaction.
00665 TAO_POA_GUARD_RETURN (0);
00666
00667 return this->servant_to_id_i (servant);
00668 }
|
|
|
Definition at line 1314 of file Root_POA.cpp. References active_policy_strategies_, TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(), and servant_to_id(). Referenced by servant_to_id().
01315 {
01316 return this->active_policy_strategies_.request_processing_strategy()->
01317 servant_to_id (servant);
01318 }
|
|
|
Definition at line 687 of file Root_POA.cpp. References servant_to_reference_i(), and TAO_POA_GUARD_RETURN. Referenced by servant_to_reference_i().
00688 {
00689 TAO_POA_GUARD_RETURN (CORBA::Object::_nil ());
00690
00691 return this->servant_to_reference_i (servant);
00692 }
|
|
|
Definition at line 1321 of file Root_POA.cpp. References active_policy_strategies_, TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(), and servant_to_reference(). Referenced by servant_to_reference().
01322 {
01323 return this->active_policy_strategies_.servant_retention_strategy()->
01324 servant_to_reference (servant);
01325 }
|
|
|
Definition at line 671 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by TAO::Portable_Server::RequestProcessingStrategyServantManager::servant_to_id(), TAO::Portable_Server::RequestProcessingStrategyDefaultServant::servant_to_id(), and TAO::Portable_Server::RequestProcessingStrategyAOMOnly::servant_to_id().
00672 {
00673 return this->active_policy_strategies_.servant_retention_strategy()->
00674 servant_to_user_id (servant);
00675 }
|
|
|
Definition at line 2466 of file Root_POA.cpp. References TAO::Portable_Server::Cached_Policies::server_priority(). Referenced by TAO::Portable_Server::ServantRetentionStrategyRetain::servant_to_reference().
02467 {
02468 return this->cached_policies_.server_priority ();
02469 }
|
|
|
Definition at line 2548 of file Root_POA.cpp.
02549 {
02550 return 0;
02551 }
|
|
|
Definition at line 1827 of file Root_POA.cpp. References folded_name(), ACE_OS::memcpy(), name_separator(), and name_separator_length(). Referenced by TAO_Root_POA().
01828 {
01829 size_t length = 0;
01830 size_t parent_length = 0;
01831
01832 if (parent != 0)
01833 {
01834 parent_length = parent->folded_name ().length ();
01835 length += parent_length;
01836 }
01837
01838 length += this->name_.length ();
01839 length += TAO_Root_POA::name_separator_length ();
01840
01841 this->folded_name_.length (static_cast <CORBA::ULong> (length));
01842 CORBA::Octet *folded_name_buffer = this->folded_name_.get_buffer ();
01843
01844 if (parent != 0)
01845 {
01846 ACE_OS::memcpy (folded_name_buffer,
01847 parent->folded_name ().get_buffer (),
01848 parent_length);
01849 }
01850
01851 ACE_OS::memcpy (&folded_name_buffer[parent_length],
01852 this->name_.c_str (),
01853 this->name_.length ());
01854
01855 folded_name_buffer[length - TAO_Root_POA::name_separator_length ()] = TAO_Root_POA::name_separator ();
01856 }
|
|
|
Definition at line 1707 of file Root_POA.cpp. References ACE_HTONL, active_policy_strategies_, TAO::Portable_Server::Active_Policy_Strategies::id_assignment_strategy(), is_persistent(), 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().
01708 {
01709 // Calculate the prefix size.
01710 CORBA::ULong prefix_size = 0;
01711 prefix_size += TAO_OBJECTKEY_PREFIX_SIZE;
01712
01713 // If we are dealing with a persistent POA and user ids are being
01714 // used, then we need to add the POA name length field to the object
01715 // key. Otherwise, the POA name length can be calculated by looking
01716 // at the remainder after extracting other parts of the key.
01717 bool const add_poa_name_length =
01718 this->is_persistent () &&
01719 !this->system_id ();
01720
01721 // Size required by the POA name.
01722 CORBA::ULong poa_name = 0;
01723
01724 // Calculate the space required for the POA name.
01725 CORBA::ULong poa_name_length = this->system_name_->length ();
01726 if (parent != 0)
01727 {
01728 poa_name += poa_name_length;
01729 }
01730
01731 // Check if we need to added the length of the POA name.
01732 if (add_poa_name_length)
01733 {
01734 poa_name += sizeof (poa_name_length);
01735 }
01736
01737 // Get the space needed for the lifespan length
01738 // byte.
01739 CORBA::ULong const lifespan_key_length =
01740 this->active_policy_strategies_.lifespan_strategy()->key_length ();
01741
01742 CORBA::ULong const id_assignment_key_length =
01743 this->active_policy_strategies_.id_assignment_strategy()->key_type_length ();
01744
01745 // Calculate the space required for the POA id.
01746 CORBA::ULong const buffer_size =
01747 prefix_size +
01748 this->root_key_type_length () +
01749 id_assignment_key_length +
01750 lifespan_key_length +
01751 poa_name;
01752
01753 // Create the buffer for the POA id.
01754 this->id_.length (buffer_size);
01755 CORBA::Octet *buffer = &this->id_[0];
01756
01757 // Keeps track of where the next infomation goes; start at 0 byte.
01758 CORBA::ULong starting_at = 0;
01759
01760 // Add the object key prefix.
01761 ACE_OS::memcpy (&buffer[starting_at],
01762 &objectkey_prefix[0],
01763 TAO_OBJECTKEY_PREFIX_SIZE);
01764
01765 starting_at += TAO_OBJECTKEY_PREFIX_SIZE;
01766
01767 // Copy the root byte.
01768 if (parent != 0)
01769 {
01770 buffer[starting_at] = (CORBA::Octet) TAO_Root_POA::non_root_key_char ();
01771 }
01772 else
01773 {
01774 buffer[starting_at] = (CORBA::Octet) TAO_Root_POA::root_key_char ();
01775 }
01776 starting_at += this->root_key_type_length ();
01777
01778 // Add the id_assignment part
01779 this->active_policy_strategies_.id_assignment_strategy()->create_key (buffer, starting_at);
01780
01781 // Add the lifespan part
01782 this->active_policy_strategies_.lifespan_strategy()->create_key (buffer, starting_at);
01783
01784 // Check if we need to added the length of the POA name.
01785 if (add_poa_name_length)
01786 {
01787 poa_name_length = ACE_HTONL (poa_name_length);
01788 ACE_OS::memcpy (&buffer[starting_at],
01789 &poa_name_length,
01790 sizeof (poa_name_length));
01791 starting_at += sizeof (poa_name_length);
01792 }
01793
01794 // Put the POA name into the key (for non-root POAs).
01795 if (parent != 0)
01796 {
01797 ACE_OS::memcpy (&buffer[starting_at],
01798 this->system_name_->get_buffer (),
01799 this->system_name_->length ());
01800 starting_at += this->system_name_->length ();
01801 }
01802 }
|
|
|
Set the object reference factory.
Definition at line 174 of file Root_POA.cpp. References ORT_adapter(), ort_adapter_, and TAO::ORT_Adapter::set_obj_ref_factory().
00176 {
00177 TAO::ORT_Adapter *adapter = this->ORT_adapter ();
00178
00179 if (adapter)
00180 {
00181 // Activate a different factory
00182 this->ort_adapter_->set_obj_ref_factory (current_factory);
00183 }
00184 }
|
|
|
Definition at line 2395 of file Root_POA.cpp. References active_policy_strategies_, TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(), and TAO_POA_GUARD.
02396 {
02397 // Lock access for the duration of this transaction.
02398 TAO_POA_GUARD;
02399
02400 this->active_policy_strategies_.request_processing_strategy()->
02401 set_servant (servant);
02402 }
|
|
|
Definition at line 2345 of file Root_POA.cpp. References active_policy_strategies_, TAO::Portable_Server::Active_Policy_Strategies::request_processing_strategy(), PortableServer::ServantManager_ptr, and TAO_POA_GUARD.
02346 {
02347 // Lock access for the duration of this transaction.
02348 TAO_POA_GUARD;
02349
02350 this->active_policy_strategies_.request_processing_strategy()->
02351 set_servant_manager (imgr);
02352 }
|
|
|
Definition at line 75 of file Root_POA.inl. References TAO::Portable_Server::Cached_Policies::id_assignment(). Referenced by is_poa_generated(), and set_id().
00076 {
00077 return (this->cached_policies_.id_assignment () == PortableServer::SYSTEM_ID);
00078 }
|
|
|
Definition at line 141 of file Root_POA.inl. Referenced by parse_key().
00142 {
00143 return 'S';
00144 }
|
|
|
Definition at line 153 of file Root_POA.inl. Referenced by parse_key().
00154 {
00155 return sizeof (char);
00156 }
|
|
|
Definition at line 105 of file Root_POA.inl. References system_name_. Referenced by is_poa_generated().
00106 {
00107 return this->system_name_.in ();
00108 }
|
|
|
Return the POA Manager related to this POA.
Definition at line 641 of file Root_POA.cpp. Referenced by TAO::Portable_Server::LifespanStrategyTransient::check_state(), and TAO::Portable_Server::LifespanStrategyPersistent::check_state().
00642 {
00643 return poa_manager_;
00644 }
|
|
|
Definition at line 2321 of file Root_POA.cpp. References adapter_activator_, and TAO_POA_GUARD.
02323 {
02324 // Lock access for the duration of this transaction.
02325 TAO_POA_GUARD;
02326
02327 this->adapter_activator_ = PortableServer::AdapterActivator::_duplicate (adapter_activator);
02328 }
|
|
|
Definition at line 2312 of file Root_POA.cpp. References TAO_POA_GUARD_RETURN.
02313 {
02314 // Lock access for the duration of this transaction.
02315 TAO_POA_GUARD_RETURN (PortableServer::AdapterActivator::_nil ());
02316
02317 return PortableServer::AdapterActivator::_duplicate (this->adapter_activator_.in ());
02318 }
|
|
|
Definition at line 695 of file Root_POA.cpp. References TAO_POA_GUARD_RETURN, and the_children_i().
00696 {
00697 // Lock access for the duration of this transaction.
00698 TAO_POA_GUARD_RETURN (0);
00699
00700 return this->the_children_i ();
00701 }
|
|
|
Definition at line 932 of file Root_POA.cpp. References ACE_NEW_THROW_EX, ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::begin(), children_, ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::current_size(), ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::end(), and PortableServer::POAList. Referenced by the_children().
00933 {
00934 PortableServer::POAList_var children;
00935 CORBA::ULong child_current = static_cast <CORBA::ULong>
00936 (this->children_.current_size ());
00937 ACE_NEW_THROW_EX (children,
00938 PortableServer::POAList (child_current),
00939 CORBA::NO_MEMORY ());
00940
00941 children->length (child_current);
00942
00943 CORBA::ULong index = 0;
00944 for (CHILDREN::iterator iterator = this->children_.begin ();
00945 iterator != this->children_.end ();
00946 ++iterator, ++index)
00947 {
00948 TAO_Root_POA *child_poa = (*iterator).int_id_;
00949 children[index] = PortableServer::POA::_duplicate (child_poa);
00950 }
00951
00952 return children._retn ();
00953 }
|
|
|
Definition at line 93 of file Root_POA.inl. References CORBA::string_dup().
00094 {
00095 return CORBA::string_dup (this->name_.c_str ());
00096 }
|
|
|
Reimplemented in TAO_Regular_POA. Definition at line 26 of file Root_POA.inl.
00027 {
00028 return PortableServer::POA::_nil ();
00029 }
|
|
|
Definition at line 2614 of file Root_POA.cpp.
02615 {
02616 return PortableServer::POAManager::_duplicate (&this->poa_manager_);
02617 }
|
|
|
Definition at line 2621 of file Root_POA.cpp.
02622 {
02623 return PortableServer::POAManagerFactory::_duplicate (&this->poa_manager_factory_);
02624 }
|
|
|
Definition at line 225 of file Root_POA.inl.
00226 {
00227 return 0;
00228 }
|
|
|
Definition at line 129 of file Root_POA.inl. Referenced by parse_key().
00130 {
00131 return 'T';
00132 }
|
|
|
Definition at line 1448 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().
01449 {
01450 return this->active_policy_strategies_.servant_retention_strategy()->
01451 unbind_using_user_id (user_id);
01452 }
|
|
|
Definition at line 147 of file Root_POA.inl. Referenced by parse_key().
00148 {
00149 return 'U';
00150 }
|
|
|
Definition at line 1493 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::servant_retention_strategy(). Referenced by TAO::Portable_Server::RequestProcessingStrategyServantManager::id_to_servant(), and TAO::Portable_Server::RequestProcessingStrategyAOMOnly::id_to_servant().
01495 {
01496 return this->active_policy_strategies_.servant_retention_strategy()->
01497 user_id_to_servant (id);
01498 }
|
|
||||||||||||
|
Definition at line 2515 of file Root_POA.cpp. References active_policy_strategies_, and TAO::Portable_Server::Active_Policy_Strategies::lifespan_strategy(). Referenced by TAO_Object_Adapter::find_transient_poa(), and is_poa_generated().
02518 {
02519 return this->active_policy_strategies_.lifespan_strategy()->
02520 validate (is_persistent, creation_time);
02521 }
|
|
|
Definition at line 1160 of file Root_POA.cpp. References TAO_Object_Adapter::enable_locking_, object_adapter(), outstanding_requests_, outstanding_requests_condition_, and wait_for_completion_pending_. Referenced by deactivate_all_objects_i(), TAO_POA_Manager::discard_requests_i(), and TAO_POA_Manager::hold_requests_i().
01161 {
01162 while (this->object_adapter ().enable_locking_ &&
01163 wait_for_completion &&
01164 this->outstanding_requests_ > 0)
01165 {
01166 this->wait_for_completion_pending_ = 1;
01167
01168 int result = this->outstanding_requests_condition_.wait ();
01169 if (result == -1)
01170 {
01171 throw ::CORBA::OBJ_ADAPTER ();
01172 }
01173 }
01174 }
|
|
|
Definition at line 207 of file Root_POA.inl. References waiting_destruction_. Referenced by TAO::Portable_Server::Non_Servant_Upcall::~Non_Servant_Upcall().
00208 {
00209 return this->waiting_destruction_;
00210 }
|
|
|
Definition at line 2570 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().
02571 {
02572 return this->active_policy_strategies_.servant_retention_strategy ()->
02573 waiting_servant_deactivation ();
02574 }
|
|
|
Definition at line 122 of file Root_POA.h. |
|
|
Definition at line 121 of file Root_POA.h. |
|
|
Definition at line 125 of file Root_POA.h. |
|
|
Definition at line 120 of file Root_POA.h. |
|
|
Definition at line 123 of file Root_POA.h. |
|
|
Definition at line 124 of file Root_POA.h. |
|
|
|
Definition at line 724 of file Root_POA.h. Referenced by complete_destruction_i(), find_POA_i(), and the_activator(). |
|
|
Adapter can be accepting, rejecting etc.
Definition at line 715 of file Root_POA.h. Referenced by destroy_i(), and get_adapter_state(). |
|
|
Definition at line 717 of file Root_POA.h. |
|
|
Definition at line 763 of file Root_POA.h. |
|
|
Definition at line 736 of file Root_POA.h. Referenced by create_POA_i(), delete_child(), destroy_i(), find_POA_i(), and the_children_i(). |
|
|
Definition at line 745 of file Root_POA.h. Referenced by cleanup_in_progress(), delete_child(), and destroy_i(). |
|
|
Definition at line 758 of file Root_POA.h. Referenced by key_to_stub_i(). |
|
|
Definition at line 705 of file Root_POA.h. |
|
|
Definition at line 709 of file Root_POA.h. |
|
|
|
Definition at line 738 of file Root_POA.h. |
|
|
Definition at line 687 of file Root_POA.h. |
|
|
Definition at line 719 of file Root_POA.h. Referenced by network_priority_hook(), and TAO_Root_POA(). |
|
|
The object adapter we belong to.
Definition at line 743 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 740 of file Root_POA.h. |
|
|
Pointer to the object reference template adapter.
Definition at line 712 of file Root_POA.h. Referenced by destroy_i(), get_adapter_template(), get_adapter_template_i(), get_obj_ref_factory(), invoke_key_to_object_helper_i(), ORT_adapter(), ORT_adapter_i(), and set_obj_ref_factory(). |
|
|
Definition at line 747 of file Root_POA.h. Referenced by decrement_outstanding_requests(), destroy_i(), increment_outstanding_requests(), outstanding_requests(), and wait_for_completions(). |
|
|
Definition at line 749 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 690 of file Root_POA.h. |
|
|
Reference to the POAManagerFactory that generate the POAManager.
Definition at line 694 of file Root_POA.h. |
|
|
Definition at line 703 of file Root_POA.h. |
|
|
Definition at line 701 of file Root_POA.h. Referenced by save_ior_component_and_profile_id(). |
|
|
Definition at line 755 of file Root_POA.h. Referenced by TAO::Portable_Server::Servant_Upcall::servant_cleanup(), and servant_deactivation_condition(). |
|
|
Definition at line 765 of file Root_POA.h. |
|
|
Definition at line 707 of file Root_POA.h. Referenced by set_id(), and system_name(). |
|
|
Definition at line 697 of file Root_POA.h. Referenced by create_stub_object(), and save_ior_component(). |
|
|
Definition at line 699 of file Root_POA.h. Referenced by create_stub_object(), and save_ior_component_and_profile_id(). |
|
|
Definition at line 751 of file Root_POA.h. Referenced by TAO::Portable_Server::Servant_Upcall::poa_cleanup(), and wait_for_completions(). |
|
|
Definition at line 753 of file Root_POA.h. Referenced by complete_destruction_i(), destroy_i(), TAO::Portable_Server::Servant_Upcall::poa_cleanup(), and waiting_destruction(). |
1.3.6