Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / examples / Notify / Lanes / ORB_Objects.cpp
blob687fa6053ea93593f738ea79c43892ab6c67e77e
1 #include "ORB_Objects.h"
5 TAO_Notify_ORB_Objects::TAO_Notify_ORB_Objects (void)
9 void
10 TAO_Notify_ORB_Objects::init (CORBA::ORB_var& orb)
12 this->orb_ = orb;
14 CORBA::Object_var object = this->orb_->resolve_initial_references("RootPOA");
16 this->root_poa_ = PortableServer::POA::_narrow (object.in ());
18 // Resolve the RTORB.
19 object = this->orb_->resolve_initial_references ("RTORB");
21 this->rt_orb_ = RTCORBA::RTORB::_narrow (object.in ());
23 // Resolve the Current
24 object = this->orb_->resolve_initial_references ("RTCurrent");
26 this->current_ = RTCORBA::Current::_narrow (object.in ());
28 // Resolve the Naming service
29 object = this->orb_->resolve_initial_references ("NameService");
31 this->naming_ = CosNaming::NamingContextExt::_narrow (object.in ());
34 TAO_Notify_ORB_Objects::~TAO_Notify_ORB_Objects ()
38 CosNotifyChannelAdmin::EventChannelFactory_ptr
39 TAO_Notify_ORB_Objects::notify_factory (void)
41 CosNotifyChannelAdmin::EventChannelFactory_var ecf;
43 // Look for the Notification Service
44 CosNaming::Name name (1);
45 name.length (1);
46 name[0].id = CORBA::string_dup ("NotifyEventChannelFactory");
48 CORBA::Object_var object = this->naming_->resolve (name);
50 ecf = CosNotifyChannelAdmin::EventChannelFactory::_narrow (object.in());
52 return ecf._retn ();