diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-29 20:03:34 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-29 20:03:34 +0000 |
commit | 24013d1db884fdbe519f0cce25e695cd8503c5cc (patch) | |
tree | f24323379bf6b7dd1f167fdeaa57b67357e9849c /TAO/examples/POA/Loader | |
parent | ee276cdb86cd0b34fa055e7bedcc804c5005e5f4 (diff) | |
download | ATCD-24013d1db884fdbe519f0cce25e695cd8503c5cc.tar.gz |
ChangeLogTag:Sat Apr 29 12:54:08 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/examples/POA/Loader')
-rw-r--r-- | TAO/examples/POA/Loader/Servant_Activator.cpp | 10 | ||||
-rw-r--r-- | TAO/examples/POA/Loader/Servant_Activator.h | 16 | ||||
-rw-r--r-- | TAO/examples/POA/Loader/Servant_Locator.cpp | 10 | ||||
-rw-r--r-- | TAO/examples/POA/Loader/Servant_Locator.h | 22 |
4 files changed, 31 insertions, 27 deletions
diff --git a/TAO/examples/POA/Loader/Servant_Activator.cpp b/TAO/examples/POA/Loader/Servant_Activator.cpp index aced224e8de..8f52cbb8d87 100644 --- a/TAO/examples/POA/Loader/Servant_Activator.cpp +++ b/TAO/examples/POA/Loader/Servant_Activator.cpp @@ -61,9 +61,11 @@ ServantActivator_i::ServantActivator_i (CORBA::ORB_ptr orb, PortableServer::Servant ServantActivator_i::incarnate (const PortableServer::ObjectId &oid, - PortableServer::POA_ptr poa, - CORBA::Environment &ACE_TRY_ENV) + PortableServer::POA_ptr poa + TAO_ENV_ARG_DECL) { + TAO_ENV_ARG_DEFN; + // Obtain the servant else exception. PortableServer::Servant servant = (*servant_supplier_) (oid, @@ -84,8 +86,8 @@ ServantActivator_i::etherealize (const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa, PortableServer::Servant servant, CORBA::Boolean, - CORBA::Boolean remaining_activations, - CORBA::Environment &) + CORBA::Boolean remaining_activations + TAO_ENV_ARG_DECL_NOT_USED) { // If there are no remaining activations i.e ObjectIds associated // with MyFooServant object, deactivate it by calling the garbage_collection_function. diff --git a/TAO/examples/POA/Loader/Servant_Activator.h b/TAO/examples/POA/Loader/Servant_Activator.h index 84de271ec87..ae421b1a7f3 100644 --- a/TAO/examples/POA/Loader/Servant_Activator.h +++ b/TAO/examples/POA/Loader/Servant_Activator.h @@ -10,7 +10,7 @@ // Servant_Activator.h // // = DESCRIPTION -// Defines a <ServantActivator_i> class, which activates a servant by +// Defines a <ServantActivator_i> class, which activates a servant by // obtaining it and associates it with an object on-demand. // // = AUTHOR @@ -35,7 +35,7 @@ class ServantActivator_i : public POA_PortableServer::ServantActivator // This class associates an unassociated servant with an object in // the POA Active Object Map. public: - typedef PortableServer::Servant + typedef PortableServer::Servant (*SERVANT_FACTORY) (const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa, CORBA::ORB_ptr orb); @@ -43,12 +43,12 @@ public: // a symbol in the dll. Invoking the function pointer obtained would // get a servant. - typedef void + typedef void (*SERVANT_GARBAGE_COLLECTOR) (const PortableServer::ObjectId &oid, PortableServer::POA_ptr, PortableServer::Servant servant); // This typedef is used to obtain the garbage_collection_function symbol - // in the dll. Invoking the function pointer obtained would then destroy + // in the dll. Invoking the function pointer obtained would then destroy // the servant. ServantActivator_i (CORBA::ORB_ptr orb, @@ -58,8 +58,8 @@ public: // Initialization. virtual PortableServer::Servant incarnate (const PortableServer::ObjectId &oid, - PortableServer::POA_ptr poa, - CORBA::Environment &ACE_TRY_ENV); + PortableServer::POA_ptr poa + TAO_ENV_ARG_DECL); // This method is invoked by a POA with USE_SERVANT_MANAGER and // RETAIN policies, whenever it receives a request for a // MyFooServant object that is not currently active. When an servant @@ -74,8 +74,8 @@ public: PortableServer::POA_ptr adapter, PortableServer::Servant servant, CORBA::Boolean cleanup_in_progress, - CORBA::Boolean remaining_activations, - CORBA::Environment &ACE_TRY_ENV); + CORBA::Boolean remaining_activations + TAO_ENV_ARG_DECL); // This method is invoked whenever a MyFooServant for a MyFoo object // is deactivated. This occurs when the POA is destroyed or the // Object is deactivated. When the POA is getting destroyed, it diff --git a/TAO/examples/POA/Loader/Servant_Locator.cpp b/TAO/examples/POA/Loader/Servant_Locator.cpp index d7cef6ebcc2..ff7001b88c8 100644 --- a/TAO/examples/POA/Loader/Servant_Locator.cpp +++ b/TAO/examples/POA/Loader/Servant_Locator.cpp @@ -66,9 +66,11 @@ PortableServer::Servant ServantLocator_i::preinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa, const char * /* operation */, - PortableServer::ServantLocator::Cookie &cookie, - CORBA::Environment &ACE_TRY_ENV) + PortableServer::ServantLocator::Cookie &cookie + TAO_ENV_ARG_DECL) { + TAO_ENV_ARG_DEFN; + PortableServer::Servant servant = (*servant_supplier_) (oid, poa, @@ -95,8 +97,8 @@ ServantLocator_i::postinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa , const char * /* operation */, PortableServer::ServantLocator::Cookie cookie, - PortableServer::Servant servant, - CORBA::Environment &/* env */) + PortableServer::Servant servant + TAO_ENV_ARG_DECL_NOT_USED) { // Check the passed servant with the cookie. PortableServer::Servant my_servant = diff --git a/TAO/examples/POA/Loader/Servant_Locator.h b/TAO/examples/POA/Loader/Servant_Locator.h index 5e099a7938b..6c70a3aeb34 100644 --- a/TAO/examples/POA/Loader/Servant_Locator.h +++ b/TAO/examples/POA/Loader/Servant_Locator.h @@ -11,7 +11,7 @@ // // = DESCRIPTION // Defines a ServantLocator_i class , used with a POA having -// a NON_RETAIN policy. +// a NON_RETAIN policy. // // = AUTHOR // Kirthika Parameswaran <kirthika@cs.wustl.edu> @@ -31,13 +31,13 @@ class ServantLocator_i : public POA_PortableServer::ServantLocator // = TITLE // This class is used by a POA with USE_SERVANT_MANAGER and // NON_RETAIN policy. - // + // // = DESCRIPTION // This class defines the Servant Locator interface of the Servant // Manager. It is invoked when the POA has an USE_SERVANT_MANAGER // policy and a servant_retention policy of NON_RETAIN type. public: - typedef PortableServer::Servant + typedef PortableServer::Servant (*SERVANT_FACTORY) (const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa, CORBA::ORB_ptr orb); @@ -45,14 +45,14 @@ public: // a symbol in the dll. Invoking the function pointer obtained would // get a servant. - typedef void + typedef void (*SERVANT_GARBAGE_COLLECTOR) (const PortableServer::ObjectId &oid, PortableServer::POA_ptr, PortableServer::Servant servant); // This typedef is used to obtain the garbage_collection_function symbol - // in the dll. Invoking the function pointer obtained would then destroy + // in the dll. Invoking the function pointer obtained would then destroy // the servant. - + ServantLocator_i (CORBA::ORB_ptr orb, const char *dllname, const char *factory_function, @@ -62,8 +62,8 @@ public: virtual PortableServer::Servant preinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, const char *operation, - PortableServer::ServantLocator::Cookie &the_cookie, - CORBA::Environment &ACE_TRY_ENV); + PortableServer::ServantLocator::Cookie &the_cookie + TAO_ENV_ARG_DECL); // This method is invoked by a POA whenever it receives a request // for MyFoo object that is not currently active. When the POA is // created using the NON_RETAIN policy the Active Object Map is not @@ -78,8 +78,8 @@ public: PortableServer::POA_ptr adapter, const char *operation, PortableServer::ServantLocator::Cookie the_cookie, - PortableServer::Servant the_servant, - CORBA::Environment &ACE_TRY_ENV); + PortableServer::Servant the_servant + TAO_ENV_ARG_DECL); // This method is invoked whenever a MyFooServant completes a // request. As the Servant Loactor interface is used when the POA // doesnt maintain the Active Object Map, its necessary to get rid @@ -90,7 +90,7 @@ public: private: ACE_CString dllname_; // The name of the dll containing the servant. - + ACE_CString create_symbol_; // The symbol which on getting invoked will give us the servant // pointer. |