diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-02-07 09:56:46 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-02-07 09:56:46 +0000 |
commit | 3bc7d7ea521de70a4cb87fb5e27efae89ebbfe30 (patch) | |
tree | c8d1ac47f2b068461d70a1643ba2cc0362c622b3 /TAO/tests/POA | |
parent | a393d2df6c8d05b101d11950b0cf8c18bff0e36d (diff) | |
download | ATCD-3bc7d7ea521de70a4cb87fb5e27efae89ebbfe30.tar.gz |
Tue Feb 7 09:54:31 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* MPC/config/compression.mpb:
Added anytypecode
* tao/DynamicInterface/Request.h:
Doxygen fix
* tao/GIOP_Message_Base.cpp:
* tao/Tagged_Profile.cpp:
Typo fixe
* tao/ZIOP/ZIOP.cpp:
Added rle
* tests/POA/FindPOA/Adapter_Activator.h:
* tests/POA/FindPOA/Adapter_Activator.cpp:
* tests/POA/FindPOA/FindPOA.cpp:
Fixed compile problems with versioned namespaces
Diffstat (limited to 'TAO/tests/POA')
-rw-r--r-- | TAO/tests/POA/FindPOA/Adapter_Activator.cpp | 57 | ||||
-rw-r--r-- | TAO/tests/POA/FindPOA/Adapter_Activator.h | 30 | ||||
-rw-r--r-- | TAO/tests/POA/FindPOA/FindPOA.cpp | 2 |
3 files changed, 38 insertions, 51 deletions
diff --git a/TAO/tests/POA/FindPOA/Adapter_Activator.cpp b/TAO/tests/POA/FindPOA/Adapter_Activator.cpp index d13c144bac3..1e4a8689991 100644 --- a/TAO/tests/POA/FindPOA/Adapter_Activator.cpp +++ b/TAO/tests/POA/FindPOA/Adapter_Activator.cpp @@ -6,46 +6,39 @@ #if (TAO_HAS_MINIMUM_POA == 0) #if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) -#include "tao/PortableServer/AdapterActivatorC.h" #include "tao/PortableServer/POAManagerC.h" #include "tao/PortableServer/PortableServer.h" -namespace TAO +Adapter_Activator::Adapter_Activator ( + PortableServer::POAManager_ptr pm) + : poa_manager_ (PortableServer::POAManager::_duplicate (pm)) { - namespace Portable_Server - { - Adapter_Activator::Adapter_Activator ( - PortableServer::POAManager_ptr pm) - : poa_manager_ (PortableServer::POAManager::_duplicate (pm)) +} + +CORBA::Boolean +Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent, + const char *name) +{ + // Default policies + CORBA::PolicyList default_policies; + + // This assumes that the lock on the parent is recursive + PortableServer::POA_var child = + parent->create_POA (name, this->poa_manager_.in (), default_policies); + + try { + child->the_activator (this); } - - CORBA::Boolean - Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent, - const char *name) + catch (const ::CORBA::Exception&) { - // Default policies - CORBA::PolicyList default_policies; - - // This assumes that the lock on the parent is recursive - PortableServer::POA_var child = - parent->create_POA (name, this->poa_manager_.in (), default_policies); - - try - { - child->the_activator (this); - } - catch (const ::CORBA::Exception&) - { - (void) child->destroy (1, 1); - - return false; - } - - // Finally everything is fine - return true; + (void) child->destroy (1, 1); + + return false; } - } + + // Finally everything is fine + return true; } #endif diff --git a/TAO/tests/POA/FindPOA/Adapter_Activator.h b/TAO/tests/POA/FindPOA/Adapter_Activator.h index 5100156534f..42237a07cf1 100644 --- a/TAO/tests/POA/FindPOA/Adapter_Activator.h +++ b/TAO/tests/POA/FindPOA/Adapter_Activator.h @@ -22,25 +22,19 @@ #if (TAO_HAS_MINIMUM_POA == 0) #if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) -namespace TAO +class Adapter_Activator + : public PortableServer::AdapterActivator { - namespace Portable_Server - { - class Adapter_Activator - : public PortableServer::AdapterActivator - { - public: - Adapter_Activator (PortableServer::POAManager_ptr poa_manager); - - CORBA::Boolean unknown_adapter (PortableServer::POA_ptr parent, - const char *name); - - protected: - /// POA Manager - PortableServer::POAManager_var poa_manager_; - }; - } -} +public: + Adapter_Activator (PortableServer::POAManager_ptr poa_manager); + + CORBA::Boolean unknown_adapter (PortableServer::POA_ptr parent, + const char *name); + +protected: + /// POA Manager + PortableServer::POAManager_var poa_manager_; +}; #endif #endif /* TAO_HAS_MINIMUM_POA == 0 */ diff --git a/TAO/tests/POA/FindPOA/FindPOA.cpp b/TAO/tests/POA/FindPOA/FindPOA.cpp index 08a1c5605d1..6fdc6432df0 100644 --- a/TAO/tests/POA/FindPOA/FindPOA.cpp +++ b/TAO/tests/POA/FindPOA/FindPOA.cpp @@ -75,7 +75,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) 1); // Get a TAO_Adapter_Activator reference - TAO::Portable_Server::Adapter_Activator activator (poa_manager.in ()); + Adapter_Activator activator (poa_manager.in ()); // Register the TAO_Adapter_Activator reference to be the RootPOA's // Adapter Activator. |