Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / examples / Notify / ThreadPool / ORB_Objects.cpp
blob84e33b4c6aaea6c17edc18f605c5cd818057e71e
1 #include "ORB_Objects.h"
4 TAO_Notify_ORB_Objects::TAO_Notify_ORB_Objects ()
8 void
9 TAO_Notify_ORB_Objects::init (CORBA::ORB_var& orb)
11 this->orb_ = orb;
13 CORBA::Object_var object = this->orb_->resolve_initial_references("RootPOA");
15 this->root_poa_ = PortableServer::POA::_narrow (object.in ());
17 // Resolve the RTORB.
18 object = this->orb_->resolve_initial_references ("RTORB");
20 this->rt_orb_ = RTCORBA::RTORB::_narrow (object.in ());
22 // Resolve the Current
23 object = this->orb_->resolve_initial_references ("RTCurrent");
25 this->current_ = RTCORBA::Current::_narrow (object.in ());
27 // Resolve the Naming service
28 object = this->orb_->resolve_initial_references ("NameService");
30 this->naming_ = CosNaming::NamingContextExt::_narrow (object.in ());
33 TAO_Notify_ORB_Objects::~TAO_Notify_ORB_Objects ()
37 CosNotifyChannelAdmin::EventChannelFactory_ptr
38 TAO_Notify_ORB_Objects::notify_factory ()
40 CosNotifyChannelAdmin::EventChannelFactory_var ecf;
42 // Look for the Notification Service
43 CosNaming::Name name (1);
44 name.length (1);
45 name[0].id = CORBA::string_dup ("NotifyEventChannelFactory");
47 CORBA::Object_var object = this->naming_->resolve (name);
49 ecf = CosNotifyChannelAdmin::EventChannelFactory::_narrow (object.in());
51 return ecf._retn ();