Adapter_Activator.cpp

Go to the documentation of this file.
00001 // Adapter_Activator.cpp,v 1.5 2006/06/19 19:50:42 jwillemsen Exp
00002 
00003 #include "tao/PortableServer/Adapter_Activator.h"
00004 
00005 ACE_RCSID (PortableServer,
00006            Adapter_Activator,
00007            "Adapter_Activator.cpp,v 1.5 2006/06/19 19:50:42 jwillemsen Exp")
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                                         ACE_ENV_ARG_DECL)
00032       ACE_THROW_SPEC ((CORBA::SystemException))
00033     {
00034       // Default policies
00035       CORBA::PolicyList default_policies;
00036 
00037       // This assumes that the lock on the parent is recursive
00038       PortableServer::POA_var child =
00039         parent->create_POA (name,
00040                             this->poa_manager_.in (),
00041                             default_policies
00042                             ACE_ENV_ARG_PARAMETER);
00043       ACE_CHECK_RETURN (0);
00044 
00045       ACE_TRY
00046         {
00047           child->the_activator (this ACE_ENV_ARG_PARAMETER);
00048           ACE_TRY_CHECK;
00049         }
00050       ACE_CATCHANY
00051         {
00052           (void) child->destroy (1,
00053                                  1
00054                                  ACE_ENV_ARG_PARAMETER);
00055 
00056           return false;
00057         }
00058       ACE_ENDTRY;
00059       ACE_CHECK_RETURN (0);
00060 
00061       // Finally everything is fine
00062       return true;
00063     }
00064   }
00065 }
00066 
00067 TAO_END_VERSIONED_NAMESPACE_DECL
00068 
00069 #endif
00070 #endif /* TAO_HAS_MINIMUM_POA == 0 */

Generated on Thu Nov 9 12:40:37 2006 for TAO_PortableServer by doxygen 1.3.6