diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-22 02:02:31 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-22 02:02:31 +0000 |
commit | b0cc2015bd44f2c0a17028e15b021e7d94093871 (patch) | |
tree | 09414b2ad08831fe2c21238cd71287723d53763b | |
parent | c2fed335edea4c15fc4be8fd30dd6e969b75e54f (diff) | |
download | ATCD-b0cc2015bd44f2c0a17028e15b021e7d94093871.tar.gz |
Fri May 21 20:50:54 1999 Irfan Pyarali <irfan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-99c | 11 | ||||
-rw-r--r-- | TAO/tao/Connect.cpp | 23 | ||||
-rw-r--r-- | TAO/tao/Connect.h | 6 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 34 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.h | 3 |
5 files changed, 27 insertions, 50 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 7833164ac41..afd457a496f 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,4 +1,13 @@ -Fri May 21 16:34:35 1999 Irfan Pyarali <irfan@cs.wustl.edu> +Fri May 21 20:50:54 1999 Irfan Pyarali <irfan@cs.wustl.edu> + + * tao/Connect.cpp (svc): + * tao/ORB_Core.cpp (inherit_from_parent_thread): + + Redid (with the help of Carlos) these methods in view of the new + architecture. ORB_Core is no longer TSS, only + TAO_ORB_Core_TSS_Resources is. This will fix a bug in all + applications using the new architecture, TSS resources and + thread per connection (like the ImplRepo). * tao/Connect.cpp (handle_message): Changed the length of the INS lookup string from <TAO_POA::TAO_OBJECTKEY_PREFIX_SIZE> to diff --git a/TAO/tao/Connect.cpp b/TAO/tao/Connect.cpp index ee75c34ecb0..e85b2d7d0c6 100644 --- a/TAO/tao/Connect.cpp +++ b/TAO/tao/Connect.cpp @@ -83,7 +83,8 @@ TAO_IIOP_Handler_Base::resume_handler (ACE_Reactor *) // @@ For pluggable protocols, added a reference to the corresponding transport obj. TAO_Server_Connection_Handler::TAO_Server_Connection_Handler (ACE_Thread_Manager *t) : TAO_IIOP_Handler_Base (t ? t : TAO_ORB_Core_instance()->thr_mgr ()), - orb_core_ (TAO_ORB_Core_instance ()) + orb_core_ (TAO_ORB_Core_instance ()), + tss_resources_ (TAO_ORB_CORE_TSS_RESOURCES::instance ()) { iiop_transport_ = new TAO_IIOP_Server_Transport(this); } @@ -91,7 +92,8 @@ TAO_Server_Connection_Handler::TAO_Server_Connection_Handler (ACE_Thread_Manager // @@ For pluggable protocols, added a reference to the corresponding transport obj. TAO_Server_Connection_Handler::TAO_Server_Connection_Handler (TAO_ORB_Core *orb_core) : TAO_IIOP_Handler_Base (orb_core), - orb_core_ (orb_core) + orb_core_ (orb_core), + tss_resources_ (TAO_ORB_CORE_TSS_RESOURCES::instance ()) { iiop_transport_ = new TAO_IIOP_Server_Transport(this); } @@ -211,19 +213,8 @@ TAO_Server_Connection_Handler::svc (void) // thread with this method as the "worker function". int result = 0; - // Inheriting the ORB_Core stuff from the parent thread. WARNING: - // this->orb_core_ is *not* the same as TAO_ORB_Core_instance(), - // this thread was just created and we are in fact *initializing* - // the ORB_Core based on the resources of the ORB that created - // us.... - - TAO_ORB_Core *tss_orb_core = TAO_ORB_Core_instance (); - tss_orb_core->inherit_from_parent_thread (this->orb_core_); - - // We need to change this->orb_core_ so it points to the TSS ORB - // Core, but we must preserve the old value - TAO_ORB_Core* old_orb_core = this->orb_core_; - this->orb_core_ = tss_orb_core; + // Inheriting the ORB_Core tss stuff from the parent thread. + this->orb_core_->inherit_from_parent_thread (this->tss_resources_); if (TAO_orbdebug) ACE_DEBUG ((LM_DEBUG, @@ -240,8 +231,6 @@ TAO_Server_Connection_Handler::svc (void) ACE_DEBUG ((LM_DEBUG, "(%P|%t) TAO_Server_Connection_Handler::svc end\n")); - this->orb_core_ = old_orb_core; - return result; } diff --git a/TAO/tao/Connect.h b/TAO/tao/Connect.h index a7b146f0112..17be311cb51 100644 --- a/TAO/tao/Connect.h +++ b/TAO/tao/Connect.h @@ -36,6 +36,7 @@ class TAO_IIOP_Transport; class TAO_IIOP_Client_Transport; class TAO_IIOP_Server_Transport; class TAO_ORB_Core; +class TAO_ORB_Core_TSS_Resources; typedef ACE_Svc_Handler<TAO_SOCK_STREAM, ACE_NULL_SYNCH> TAO_SVC_HANDLER; @@ -282,7 +283,10 @@ protected: // Perform appropriate closing. TAO_ORB_Core *orb_core_; - // Cache the ORB Core to minimize + // Cached ORB Core. + + TAO_ORB_Core_TSS_Resources *tss_resources_; + // Cached tss resources of the ORB that activated this object. }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 2b1c76e282b..4d4b8011047 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -823,43 +823,17 @@ TAO_ORB_Core::arl_same_port_connect (void) #endif /* TAO_ARL_USES_SAME_CONNECTOR_PORT */ int -TAO_ORB_Core::inherit_from_parent_thread (TAO_ORB_Core *p) +TAO_ORB_Core::inherit_from_parent_thread (TAO_ORB_Core_TSS_Resources *tss_resources) { // Inherit properties/objects used in ORB_Core from the // parent thread. Stuff inherited here must already exist // in the "parent" orbcore. - this->reactor (p->reactor ()); + this->reactor (tss_resources->reactor_); // We'll use the spawning thread's reactor. - this->thr_mgr (p->thr_mgr ()); - // We should use the same thread_manager. - - this->connector_registry (p->connector_registry ()); - // We'll use the spawning thread's connector. - - this->orb (p->orb ()); - // We'll use the spawning thread's ORB. - - this->root_poa (p->root_poa ()); - // And its root_poa. - - this->orb_params_ = p->orb_params (); - // We also need its ORB_Params. - - this->acceptor (p->acceptor ()); - // Also grab the acceptor passively listening for connection - // requests. - - this->using_collocation (p->using_collocation ()); - // Use the same collocation settings - - this->resource_factory_ = p->resource_factory (); - this->client_factory_ = p->client_factory (); - this->server_factory_ = p->server_factory (); - // Inherit the factories. Notice that they will not be destroyed by - // this orb_core because *_factory_from_service_config_'s all - // default to FALSE. + // this->connection_cache (tss_resources->connection_cache_); + // Inherit connection cache? return 0; } diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h index 1ac2509fa39..486ee1cf4eb 100644 --- a/TAO/tao/ORB_Core.h +++ b/TAO/tao/ORB_Core.h @@ -39,6 +39,7 @@ class TAO_Resource_Factory; class TAO_Client_Strategy_Factory; class TAO_Server_Strategy_Factory; class TAO_Connection_Cache; +class TAO_ORB_Core_TSS_Resources; // **************************************************************** @@ -111,7 +112,7 @@ public: TAO_Object_Adapter *object_adapter (void); // Get <Object Adapter>. - int inherit_from_parent_thread (TAO_ORB_Core *p); + int inherit_from_parent_thread (TAO_ORB_Core_TSS_Resources *tss_resources); // A spawned thread needs to inherit some properties/objects from // the spawning thread in order to serve requests. Return 0 if // it successfully inherits from the parent, -1 otherwise. |