Adapter_Activator.cpp

Go to the documentation of this file.
00001 // $Id: Adapter_Activator.cpp 81410 2008-04-24 09:22:08Z johnnyw $
00002 
00003 #include "tao/PortableServer/Adapter_Activator.h"
00004 
00005 ACE_RCSID (PortableServer,
00006            Adapter_Activator,
00007            "$Id: Adapter_Activator.cpp 81410 2008-04-24 09:22:08Z johnnyw $")
00008 
00009 #if (TAO_HAS_MINIMUM_POA == 0)
00010 #if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00011 
00012 #include "tao/PortableServer/AdapterActivatorC.h"
00013 #include "tao/PortableServer/POAManagerC.h"
00014 #include "tao/PortableServer/PortableServer.h"
00015 
00016 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00017 
00018 namespace TAO
00019 {
00020   namespace Portable_Server
00021   {
00022     Adapter_Activator::Adapter_Activator (
00023       PortableServer::POAManager_ptr pm)
00024       : poa_manager_ (PortableServer::POAManager::_duplicate (pm))
00025     {
00026     }
00027 
00028     CORBA::Boolean
00029     Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent,
00030                                         const char *name)
00031     {
00032       // Default policies
00033       CORBA::PolicyList default_policies;
00034 
00035       // This assumes that the lock on the parent is recursive
00036       PortableServer::POA_var child =
00037         parent->create_POA (name, this->poa_manager_.in (), default_policies);
00038 
00039       try
00040         {
00041           child->the_activator (this);
00042         }
00043       catch (const ::CORBA::Exception&)
00044         {
00045           (void) child->destroy (1, 1);
00046 
00047           return false;
00048         }
00049 
00050       // Finally everything is fine
00051       return true;
00052     }
00053   }
00054 }
00055 
00056 TAO_END_VERSIONED_NAMESPACE_DECL
00057 
00058 #endif
00059 #endif /* TAO_HAS_MINIMUM_POA == 0 */

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7