Notify_EventChannelFactory_i.cpp

Go to the documentation of this file.
00001 // $Id: Notify_EventChannelFactory_i.cpp 79084 2007-07-30 13:13:45Z elliott_c $
00002 
00003 #include "orbsvcs/Notify/Notify_EventChannelFactory_i.h"
00004 
00005 #include "orbsvcs/Notify/Service.h"
00006 #include "ace/Dynamic_Service.h"
00007 #include "tao/PortableServer/Root_POA.h"
00008 #include "tao/ORB_Core.h"
00009 
00010 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00011 
00012 CosNotifyChannelAdmin::EventChannelFactory_ptr
00013 TAO_Notify_EventChannelFactory_i::create (PortableServer::POA_ptr default_POA,
00014                                           const char* factory_name)
00015 {
00016   CosNotifyChannelAdmin::EventChannelFactory_var notify_factory;
00017 
00018   TAO_Notify_Service* notify_service = ACE_Dynamic_Service<TAO_Notify_Service>::instance (TAO_COS_NOTIFICATION_SERVICE_NAME);
00019 
00020   if (notify_service == 0)
00021   {
00022     ACE_DEBUG ((LM_DEBUG, "Service not found! check conf. file\n"));
00023     return notify_factory._retn ();
00024   }
00025 
00026   TAO_Root_POA *poa = dynamic_cast <TAO_Root_POA*> (default_POA);
00027 
00028   if (poa == 0)
00029     return notify_factory._retn ();
00030 
00031   CORBA::ORB_ptr orb = poa->orb_core ().orb () ;
00032 
00033   notify_service->init_service (orb);
00034 
00035   notify_factory = notify_service->create (default_POA, factory_name);
00036 
00037   return notify_factory._retn ();
00038 }
00039 
00040 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:45:29 2010 for TAO_CosNotification by  doxygen 1.4.7