Notify_EventChannelFactory_i.cpp

Go to the documentation of this file.
00001 // Notify_EventChannelFactory_i.cpp,v 1.32 2006/03/14 06:14:34 jtc Exp
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 ACE_ENV_ARG_DECL)
00014 {
00015   CosNotifyChannelAdmin::EventChannelFactory_var notify_factory;
00016 
00017   TAO_Notify_Service* notify_service = ACE_Dynamic_Service<TAO_Notify_Service>::instance (TAO_COS_NOTIFICATION_SERVICE_NAME);
00018 
00019   if (notify_service == 0)
00020   {
00021     ACE_DEBUG ((LM_DEBUG, "Service not found! check conf. file\n"));
00022     return notify_factory._retn ();
00023   }
00024 
00025   TAO_Root_POA *poa = dynamic_cast <TAO_Root_POA*> (default_POA);
00026 
00027   if (poa == 0)
00028     return notify_factory._retn ();
00029 
00030   CORBA::ORB_ptr orb = poa->orb_core ().orb () ;
00031 
00032   notify_service->init_service (orb ACE_ENV_ARG_PARAMETER);
00033   ACE_CHECK_RETURN (notify_factory._retn ());
00034 
00035   notify_factory = notify_service->create (default_POA ACE_ENV_ARG_PARAMETER);
00036   ACE_CHECK_RETURN (notify_factory._retn ());
00037 
00038   return notify_factory._retn ();
00039 }
00040 
00041 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 13:24:12 2006 for TAO_CosNotification by doxygen 1.3.6