diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-20 06:55:01 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-20 06:55:01 +0000 |
commit | 70497fd124abf721c99c0e5ae3cf15c5b50034fb (patch) | |
tree | 0c5245153c2bfb1818348f55cef109cf78d27557 /TAO/tao | |
parent | 64633773272a610a063bf43bf5dc3c8984f22e55 (diff) | |
download | ATCD-70497fd124abf721c99c0e5ae3cf15c5b50034fb.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/poa.cpp | 40 | ||||
-rw-r--r-- | TAO/tao/poa.h | 8 |
2 files changed, 31 insertions, 17 deletions
diff --git a/TAO/tao/poa.cpp b/TAO/tao/poa.cpp index f9b599d9974..9c4fa7f8ff8 100644 --- a/TAO/tao/poa.cpp +++ b/TAO/tao/poa.cpp @@ -2484,6 +2484,12 @@ TAO_POA::dispatch_servant_i (const TAO_ObjectKey &key, // const char *operation = req.operation (); const char *operation = req.op_name (); + // Setup for POA Current + TAO_ORB_Core *orb_core = TAO_ORB_Core_instance (); + TAO_POA_Current current_context; + // Set the current context and remember the old one + TAO_POA_Current *previous_context = orb_core->poa_current (¤t_context); + PortableServer::Servant servant = this->locate_poa_and_servant_i (key, operation, id_out, @@ -2493,12 +2499,13 @@ TAO_POA::dispatch_servant_i (const TAO_ObjectKey &key, return; // Setup for upcall - TAO_POA_Current upcall_context (poa, key, id.in (), servant); - TAO_POA_Current *previous_context; - poa->pre_invoke (upcall_context, - previous_context, + poa->pre_invoke (key, + id.in (), + servant, + ¤t_context, env); - + + // Upcall servant->_dispatch (req, context, env); @@ -2506,30 +2513,35 @@ TAO_POA::dispatch_servant_i (const TAO_ObjectKey &key, // Cleanup from upcall poa->post_invoke (servant, operation, - previous_context, + ¤t_context, env); + + // Reset old context + orb_core->poa_current (previous_context); + } void -TAO_POA::pre_invoke (TAO_POA_Current &upcall_context, - TAO_POA_Current *&previous_context, +TAO_POA::pre_invoke (const TAO_ObjectKey &key, + const PortableServer::ObjectId &id, + PortableServer::Servant servant, + TAO_POA_Current *poa_current, CORBA::Environment &env) { ACE_UNUSED_ARG (env); - TAO_ORB_Core *orb_core = TAO_ORB_Core_instance (); - previous_context = orb_core->poa_current (&upcall_context); + poa_current->POA_impl (this); + poa_current->object_key (key); + poa_current->object_id (id); + poa_current->servant (servant); } void TAO_POA::post_invoke (PortableServer::Servant servant, const char *operation, - TAO_POA_Current *previous_context, + TAO_POA_Current *poa_current, CORBA::Environment &env) { - TAO_ORB_Core *orb_core = TAO_ORB_Core_instance (); - TAO_POA_Current *poa_current = orb_core->poa_current (previous_context); - PortableServer::ServantLocator::Cookie cookie = poa_current->locator_cookie (); if (cookie != 0) diff --git a/TAO/tao/poa.h b/TAO/tao/poa.h index 965285fd9d1..7feb78a5fff 100644 --- a/TAO/tao/poa.h +++ b/TAO/tao/poa.h @@ -619,13 +619,15 @@ protected: void *context, CORBA::Environment &env); - virtual void pre_invoke (TAO_POA_Current &upcall_context, - TAO_POA_Current *&previous_context, + virtual void pre_invoke (const TAO_ObjectKey &key, + const PortableServer::ObjectId &id, + PortableServer::Servant servant, + TAO_POA_Current *poa_current, CORBA::Environment &env); virtual void post_invoke (PortableServer::Servant servant, const char *operation, - TAO_POA_Current *previous_context, + TAO_POA_Current *poa_current, CORBA::Environment &env); virtual CORBA::Boolean persistent (void); |