00001
00002
00003 #include "tao/PortableServer/Adapter_Activator.h"
00004
00005 ACE_RCSID (PortableServer,
00006 Adapter_Activator,
00007 "$Id: Adapter_Activator.cpp 77357 2007-02-24 06:58:14Z 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
00033 CORBA::PolicyList default_policies;
00034
00035
00036 PortableServer::POA_var child =
00037 parent->create_POA (name,
00038 this->poa_manager_.in (),
00039 default_policies);
00040
00041 try
00042 {
00043 child->the_activator (this);
00044 }
00045 catch (const ::CORBA::Exception&)
00046 {
00047 (void) child->destroy (1, 1);
00048
00049 return false;
00050 }
00051
00052
00053 return true;
00054 }
00055 }
00056 }
00057
00058 TAO_END_VERSIONED_NAMESPACE_DECL
00059
00060 #endif
00061 #endif