diff options
author | aky <aky@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-06-14 19:12:56 +0000 |
---|---|---|
committer | aky <aky@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-06-14 19:12:56 +0000 |
commit | a7b3545c9e3c977ac9e84db5248b0dd85af9d632 (patch) | |
tree | 3c7a8d28dda57ff01f736ea14024abeedc1ae767 /TAO/orbsvcs/DevGuideExamples | |
parent | c05177dc1c19017053fc116dae7b693824c5a0f8 (diff) | |
download | ATCD-a7b3545c9e3c977ac9e84db5248b0dd85af9d632.tar.gz |
Tue Jun 14 19:08:03 UTC 2011 Akshay V. Dabholkar <aky@dre.vanderbilt.edu>
* orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp:
* orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp:
Restructured the code a little bit.
Diffstat (limited to 'TAO/orbsvcs/DevGuideExamples')
-rw-r--r-- | TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp | 9 | ||||
-rw-r--r-- | TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp | 8 |
2 files changed, 9 insertions, 8 deletions
diff --git a/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp b/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp index 92ad339261a..eed5e95f62c 100644 --- a/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp +++ b/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventConsumerMain.cpp @@ -47,6 +47,11 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) obj = orb->resolve_initial_references("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in()); + + // Activate the POA via its POAManager. + PortableServer::POAManager_var poa_manager = poa->the_POAManager(); + poa_manager->activate(); + // Instantiate an EchoEventConsumer_i servant. PortableServer::Servant_var<EchoEventConsumer_i> servant = new EchoEventConsumer_i(orb.in(), supplier.in(), EVENT_LIMIT); @@ -65,10 +70,6 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) supplier->connect_push_consumer (consumer.in (), qos.get_ConsumerQOS ()); - // Activate the POA via its POAManager. - PortableServer::POAManager_var poa_manager = poa->the_POAManager(); - poa_manager->activate(); - std::cout << "EchoEventConsumerMain.cpp: Ready to receive events..." << std::endl; // Enter the ORB event loop. diff --git a/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp b/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp index dd571baada7..f5e5fd80327 100644 --- a/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp +++ b/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Basic/EchoEventSupplierMain.cpp @@ -50,6 +50,10 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) obj = orb->resolve_initial_references("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in()); + // Activate the POA via its POAManager. + PortableServer::POAManager_var poa_manager = poa->the_POAManager(); + poa_manager->activate(); + // Instantiate an EchoEventSupplier_i servant. PortableServer::Servant_var<EchoEventSupplier_i> servant = new EchoEventSupplier_i(orb.in()); @@ -71,10 +75,6 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) consumer->connect_push_supplier (supplier.in (), qos.get_SupplierQOS ()); - // Activate the POA via its POAManager. - PortableServer::POAManager_var poa_manager = poa->the_POAManager(); - poa_manager->activate(); - // Create an event (just a string in this case). const CORBA::String_var eventData = CORBA::string_dup("Hello, world."); |