diff options
Diffstat (limited to 'TAO/tests')
39 files changed, 132 insertions, 111 deletions
diff --git a/TAO/tests/AMI/server.cpp b/TAO/tests/AMI/server.cpp index 397d1f70232..e52ef915ec6 100644 --- a/TAO/tests/AMI/server.cpp +++ b/TAO/tests/AMI/server.cpp @@ -106,9 +106,9 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); } diff --git a/TAO/tests/AMI_Timeouts/client.cpp b/TAO/tests/AMI_Timeouts/client.cpp index eb1a3f8ba28..ec2dd4c519c 100644 --- a/TAO/tests/AMI_Timeouts/client.cpp +++ b/TAO/tests/AMI_Timeouts/client.cpp @@ -99,14 +99,14 @@ main (int argc, char *argv[]) } // Activate POA to handle the call back. - + CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize the POA.\n"), 1); - + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); ACE_TRY_CHECK; @@ -131,7 +131,7 @@ main (int argc, char *argv[]) timeoutHandler_var.in ()); client->activate (); - + // ORB loop. ACE_Time_Value time (1,0); // 1 s orb->run (time); // Fetch responses diff --git a/TAO/tests/AMI_Timeouts/server.cpp b/TAO/tests/AMI_Timeouts/server.cpp index 34ab77b97b0..1bab591c8d9 100644 --- a/TAO/tests/AMI_Timeouts/server.cpp +++ b/TAO/tests/AMI_Timeouts/server.cpp @@ -122,9 +122,9 @@ main (int argc, char *argv[]) timeoutHandler_var.in ()); client->activate (); - - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); diff --git a/TAO/tests/AMI_Timeouts/timeout_client.cpp b/TAO/tests/AMI_Timeouts/timeout_client.cpp index 27010961a10..fd8c1cb4ae8 100644 --- a/TAO/tests/AMI_Timeouts/timeout_client.cpp +++ b/TAO/tests/AMI_Timeouts/timeout_client.cpp @@ -72,12 +72,12 @@ TimeoutClient::send (bool async, if (async) { timeoutObject_->sendc_sendTimeToWait (replyHandlerObject_, - msec, + msec, ACE_TRY_ENV); } else // synch { - timeoutObject_->sendTimeToWait (msec, + timeoutObject_->sendTimeToWait (msec, ACE_TRY_ENV); } @@ -107,8 +107,8 @@ TimeoutClient::svc () ACE_TRY_NEW_ENV { unsigned long msec = 10; - - TimeBase::TimeT timeout = 10000 * msec; + + TimeBase::TimeT timeout = 10000 * msec; CORBA::Any any_orb; any_orb <<= timeout; @@ -151,7 +151,7 @@ TimeoutClient::svc () ACE_Time_Value tv (1, 0); // wait 1s to give the responses enough time. ACE_OS::sleep (tv); - // shut down ORB + // shut down ORB //timeoutObject_->shutdown (ACE_TRY_ENV); ACE_TRY_CHECK; @@ -171,4 +171,3 @@ TimeoutClient::svc () return 0; }; - diff --git a/TAO/tests/BiDirectional/client.cpp b/TAO/tests/BiDirectional/client.cpp index 50acc019605..f195e507f0b 100644 --- a/TAO/tests/BiDirectional/client.cpp +++ b/TAO/tests/BiDirectional/client.cpp @@ -138,7 +138,8 @@ main (int argc, char *argv[]) r)); } - orb->run (); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; root_poa->destroy (1, 1, ACE_TRY_ENV); ACE_TRY_CHECK; diff --git a/TAO/tests/BiDirectional_NestedUpcall/server.cpp b/TAO/tests/BiDirectional_NestedUpcall/server.cpp index 2fd7095f1d5..e669836949b 100644 --- a/TAO/tests/BiDirectional_NestedUpcall/server.cpp +++ b/TAO/tests/BiDirectional_NestedUpcall/server.cpp @@ -134,7 +134,9 @@ main (int argc, char *argv[]) } // Run the event loop - orb->run (); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, ACE_TRY_ENV); diff --git a/TAO/tests/DSI_Gateway/gateway.cpp b/TAO/tests/DSI_Gateway/gateway.cpp index db4dcfd39aa..2a2144a27cb 100644 --- a/TAO/tests/DSI_Gateway/gateway.cpp +++ b/TAO/tests/DSI_Gateway/gateway.cpp @@ -130,7 +130,8 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - orb->run (); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); } diff --git a/TAO/tests/DSI_Gateway/server.cpp b/TAO/tests/DSI_Gateway/server.cpp index ea1fb4cc732..fadc17ccf27 100644 --- a/TAO/tests/DSI_Gateway/server.cpp +++ b/TAO/tests/DSI_Gateway/server.cpp @@ -95,7 +95,8 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - orb->run (); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); } diff --git a/TAO/tests/Faults/middle.cpp b/TAO/tests/Faults/middle.cpp index a14b828bd65..b2108110e5a 100644 --- a/TAO/tests/Faults/middle.cpp +++ b/TAO/tests/Faults/middle.cpp @@ -117,8 +117,9 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, ACE_TRY_ENV); diff --git a/TAO/tests/Faults/ping.cpp b/TAO/tests/Faults/ping.cpp index b3dfb51e622..cc21f45d8cd 100644 --- a/TAO/tests/Faults/ping.cpp +++ b/TAO/tests/Faults/ping.cpp @@ -112,8 +112,9 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); persistent_poa->destroy (1, 1, ACE_TRY_ENV); diff --git a/TAO/tests/Faults/pong.cpp b/TAO/tests/Faults/pong.cpp index 6dbe4d624ba..a7e374e5501 100644 --- a/TAO/tests/Faults/pong.cpp +++ b/TAO/tests/Faults/pong.cpp @@ -71,7 +71,8 @@ run_client (CORBA::ORB_ptr orb, ACE_TRY_CHECK; // Run for <period> milliseconds, to receive the reply - orb->run (tv); + orb->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; // Terminate the client if: // - This is the last iteration diff --git a/TAO/tests/Faults/server.cpp b/TAO/tests/Faults/server.cpp index 5410582b955..6effd6fe38d 100644 --- a/TAO/tests/Faults/server.cpp +++ b/TAO/tests/Faults/server.cpp @@ -88,8 +88,9 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, ACE_TRY_ENV); diff --git a/TAO/tests/Forwarding/server.cpp b/TAO/tests/Forwarding/server.cpp index d8c5a0e6d90..acd0a523c8a 100644 --- a/TAO/tests/Forwarding/server.cpp +++ b/TAO/tests/Forwarding/server.cpp @@ -99,7 +99,7 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - + orb->run (ACE_TRY_ENV); ACE_TRY_CHECK; diff --git a/TAO/tests/InterOp-Naming/Server_i.cpp b/TAO/tests/InterOp-Naming/Server_i.cpp index 48f1a9c6374..aa6c9b360d5 100644 --- a/TAO/tests/InterOp-Naming/Server_i.cpp +++ b/TAO/tests/InterOp-Naming/Server_i.cpp @@ -79,7 +79,7 @@ Server_i::add_IOR_to_table (CORBA::String_var ior) "IORTable", ACE_TRY_ENV); ACE_TRY_CHECK; - + IORTable::Table_var adapter = IORTable::Table::_narrow (table_object.in (), ACE_TRY_ENV); ACE_TRY_CHECK; diff --git a/TAO/tests/Leader_Followers/client.cpp b/TAO/tests/Leader_Followers/client.cpp index d712fbff103..dc53a97fae9 100644 --- a/TAO/tests/Leader_Followers/client.cpp +++ b/TAO/tests/Leader_Followers/client.cpp @@ -205,9 +205,7 @@ public: ACE_Time_Value timeout (0, event_loop_timeout_for_this_thread * 1000); - if (this->orb_->run (timeout, - ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + this->orb_->run (timeout, ACE_TRY_ENV); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Client: Event loop finished for thread %t @ %T\n")); diff --git a/TAO/tests/Leader_Followers/server.cpp b/TAO/tests/Leader_Followers/server.cpp index 0bd163e7081..15c7f9ee652 100644 --- a/TAO/tests/Leader_Followers/server.cpp +++ b/TAO/tests/Leader_Followers/server.cpp @@ -58,8 +58,7 @@ public: ACE_TRY { - if (this->orb_->run (ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + this->orb_->run (ACE_TRY_ENV); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/tests/LongUpcalls/AMI_Manager.cpp b/TAO/tests/LongUpcalls/AMI_Manager.cpp index 9d7ed3b8390..b3a92ab9689 100644 --- a/TAO/tests/LongUpcalls/AMI_Manager.cpp +++ b/TAO/tests/LongUpcalls/AMI_Manager.cpp @@ -90,7 +90,8 @@ Worker::svc (void) for (;;) { ACE_Time_Value tv (0, 1000 * this->milliseconds_); - this->orb_->run (tv); + this->orb_->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, mutex, -1); if (pending_requests == 0) diff --git a/TAO/tests/LongUpcalls/ami_client.cpp b/TAO/tests/LongUpcalls/ami_client.cpp index 7e9b3c9e7dc..30fdc298976 100644 --- a/TAO/tests/LongUpcalls/ami_client.cpp +++ b/TAO/tests/LongUpcalls/ami_client.cpp @@ -96,7 +96,8 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; ACE_Time_Value tv (30, 0); - orb->run (tv); + orb->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; controller_impl.dump_results (); diff --git a/TAO/tests/LongUpcalls/ami_server.cpp b/TAO/tests/LongUpcalls/ami_server.cpp index 75f4a46e045..bfa01f43acf 100644 --- a/TAO/tests/LongUpcalls/ami_server.cpp +++ b/TAO/tests/LongUpcalls/ami_server.cpp @@ -82,7 +82,8 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - orb->run (); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; // ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); diff --git a/TAO/tests/LongUpcalls/blocking_server.cpp b/TAO/tests/LongUpcalls/blocking_server.cpp index f2bd16c1d44..23b2277592c 100644 --- a/TAO/tests/LongUpcalls/blocking_server.cpp +++ b/TAO/tests/LongUpcalls/blocking_server.cpp @@ -82,7 +82,8 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - orb->run (); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; // ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); diff --git a/TAO/tests/MProfile/server.cpp b/TAO/tests/MProfile/server.cpp index 98d48abede8..2d638ca33cc 100644 --- a/TAO/tests/MProfile/server.cpp +++ b/TAO/tests/MProfile/server.cpp @@ -89,8 +89,9 @@ main (int argc, char *argv[]) } - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, ACE_TRY_ENV); diff --git a/TAO/tests/MProfile_Forwarding/Manager.cpp b/TAO/tests/MProfile_Forwarding/Manager.cpp index 8875bf46499..bb7e6b5c4f3 100644 --- a/TAO/tests/MProfile_Forwarding/Manager.cpp +++ b/TAO/tests/MProfile_Forwarding/Manager.cpp @@ -294,10 +294,8 @@ Manager::make_iors_register (CORBA::Environment &ACE_TRY_ENV) int Manager::run (CORBA::Environment &ACE_TRY_ENV) { - if (this->orb_->run (ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, - "Error in run \n"), - -1); + this->orb_->run (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/tests/MProfile_Forwarding/server.cpp b/TAO/tests/MProfile_Forwarding/server.cpp index 73f979b5771..ecc88e5f3b0 100755 --- a/TAO/tests/MProfile_Forwarding/server.cpp +++ b/TAO/tests/MProfile_Forwarding/server.cpp @@ -51,7 +51,7 @@ main (int argc, char *argv[]) PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - + // Get the POAManager of the RootPOA. PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (ACE_TRY_ENV); @@ -64,7 +64,7 @@ main (int argc, char *argv[]) return 1; Simple_Server_i server_impl (orb.in ()); - + Simple_Server_var server = server_impl._this (ACE_TRY_ENV); ACE_TRY_CHECK; @@ -89,8 +89,9 @@ main (int argc, char *argv[]) } - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, ACE_TRY_ENV); diff --git a/TAO/tests/MT_Client/server.cpp b/TAO/tests/MT_Client/server.cpp index 988be31d6cd..95456486ec3 100644 --- a/TAO/tests/MT_Client/server.cpp +++ b/TAO/tests/MT_Client/server.cpp @@ -87,8 +87,9 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, ACE_TRY_ENV); diff --git a/TAO/tests/MT_Server/server.cpp b/TAO/tests/MT_Server/server.cpp index 9eb94b2aa00..4f2ae231f3b 100644 --- a/TAO/tests/MT_Server/server.cpp +++ b/TAO/tests/MT_Server/server.cpp @@ -147,6 +147,15 @@ Worker::Worker (CORBA::ORB_ptr orb) int Worker::svc (void) { - this->orb_->run (); + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + } + ACE_ENDTRY; return 0; } diff --git a/TAO/tests/Native_Exceptions/server.cpp b/TAO/tests/Native_Exceptions/server.cpp index 1a28e883d43..cae2e7d2570 100644 --- a/TAO/tests/Native_Exceptions/server.cpp +++ b/TAO/tests/Native_Exceptions/server.cpp @@ -78,8 +78,8 @@ main (int argc, char *argv[]) poa_manager->activate (); - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (); + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); } catch (CORBA::SystemException &ex) diff --git a/TAO/tests/NestedUpcall/Simple/server.cpp b/TAO/tests/NestedUpcall/Simple/server.cpp index e35959b5a43..2b9450234cc 100644 --- a/TAO/tests/NestedUpcall/Simple/server.cpp +++ b/TAO/tests/NestedUpcall/Simple/server.cpp @@ -33,7 +33,18 @@ Server_Task::Server_Task (CORBA::ORB_ptr orb) int Server_Task::svc (void) { - return this->orb_->run (); + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + return -1; + } + ACE_ENDTRY; + return 0; } static int diff --git a/TAO/tests/Nested_Event_Loop/server.cpp b/TAO/tests/Nested_Event_Loop/server.cpp index bac5b3b7042..b3617663e24 100644 --- a/TAO/tests/Nested_Event_Loop/server.cpp +++ b/TAO/tests/Nested_Event_Loop/server.cpp @@ -89,8 +89,7 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb->run (ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); diff --git a/TAO/tests/OctetSeq/server.cpp b/TAO/tests/OctetSeq/server.cpp index c52091468ad..0ccc9a2fb08 100644 --- a/TAO/tests/OctetSeq/server.cpp +++ b/TAO/tests/OctetSeq/server.cpp @@ -89,8 +89,9 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, ACE_TRY_ENV); diff --git a/TAO/tests/Param_Test/server.cpp b/TAO/tests/Param_Test/server.cpp index 93293c80355..99418c47dd6 100644 --- a/TAO/tests/Param_Test/server.cpp +++ b/TAO/tests/Param_Test/server.cpp @@ -149,8 +149,8 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb_ptr->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); + orb_ptr->run (ACE_TRY_ENV); + ACE_TRY_CHECK; good_poa->destroy (1, 1, diff --git a/TAO/tests/Single_Read/server.cpp b/TAO/tests/Single_Read/server.cpp index 6707dd21ce4..b84f0bc46a3 100644 --- a/TAO/tests/Single_Read/server.cpp +++ b/TAO/tests/Single_Read/server.cpp @@ -87,8 +87,7 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb->run (ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); diff --git a/TAO/tests/Smart_Proxies/On_Demand/server.cpp b/TAO/tests/Smart_Proxies/On_Demand/server.cpp index 79975e2e1d2..d72e3068539 100644 --- a/TAO/tests/Smart_Proxies/On_Demand/server.cpp +++ b/TAO/tests/Smart_Proxies/On_Demand/server.cpp @@ -27,7 +27,7 @@ class Test_i : public POA_Test { public: Test_i (CORBA::ORB_ptr orb); - + CORBA::Short method (CORBA::Short boo, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, @@ -38,7 +38,7 @@ public: private: CORBA::ORB_var orb_; - + }; Test_i::Test_i (CORBA::ORB_ptr orb) @@ -110,14 +110,14 @@ main (int argc, char *argv[]) "", ACE_TRY_ENV); ACE_TRY_CHECK; - - Test_i servant (orb.in ()); + + Test_i servant (orb.in ()); // Obtain RootPOA. CORBA::Object_var object = - orb->resolve_initial_references ("RootPOA", + orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); - - PortableServer::POA_var root_poa = + + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (object.in (), ACE_TRY_ENV); @@ -138,7 +138,7 @@ main (int argc, char *argv[]) // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) { - FILE *output_file = + FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) @@ -156,13 +156,10 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "orb->run"), - -1); - ACE_DEBUG ((LM_DEBUG, - "event loop finished\n")); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, @@ -178,6 +175,3 @@ main (int argc, char *argv[]) ACE_ENDTRY; return 0; } - - - diff --git a/TAO/tests/Smart_Proxies/server.cpp b/TAO/tests/Smart_Proxies/server.cpp index 22768dc39b3..bc3396c04d9 100644 --- a/TAO/tests/Smart_Proxies/server.cpp +++ b/TAO/tests/Smart_Proxies/server.cpp @@ -27,7 +27,7 @@ class Test_i : public POA_Test { public: Test_i (CORBA::ORB_ptr orb); - + CORBA::Short method (CORBA::Short boo, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, @@ -38,7 +38,7 @@ public: private: CORBA::ORB_var orb_; - + }; Test_i::Test_i (CORBA::ORB_ptr orb) @@ -110,14 +110,14 @@ main (int argc, char *argv[]) "", ACE_TRY_ENV); ACE_TRY_CHECK; - - Test_i servant (orb.in ()); + + Test_i servant (orb.in ()); // Obtain RootPOA. CORBA::Object_var object = - orb->resolve_initial_references ("RootPOA", + orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); - - PortableServer::POA_var root_poa = + + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (object.in (), ACE_TRY_ENV); @@ -138,7 +138,7 @@ main (int argc, char *argv[]) // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) { - FILE *output_file = + FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) @@ -156,13 +156,10 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "orb->run"), - -1); - ACE_DEBUG ((LM_DEBUG, - "event loop finished\n")); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, @@ -178,6 +175,3 @@ main (int argc, char *argv[]) ACE_ENDTRY; return 0; } - - - diff --git a/TAO/tests/Strategies/server.cpp b/TAO/tests/Strategies/server.cpp index fb876200dca..e7410c871a0 100644 --- a/TAO/tests/Strategies/server.cpp +++ b/TAO/tests/Strategies/server.cpp @@ -87,8 +87,9 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1, ACE_TRY_ENV); diff --git a/TAO/tests/Timed_Buffered_Oneways/server.cpp b/TAO/tests/Timed_Buffered_Oneways/server.cpp index 6707dd21ce4..b84f0bc46a3 100644 --- a/TAO/tests/Timed_Buffered_Oneways/server.cpp +++ b/TAO/tests/Timed_Buffered_Oneways/server.cpp @@ -87,8 +87,7 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb->run (ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); diff --git a/TAO/tests/Timeout/client.cpp b/TAO/tests/Timeout/client.cpp index 786bfbf88f9..951411992b0 100644 --- a/TAO/tests/Timeout/client.cpp +++ b/TAO/tests/Timeout/client.cpp @@ -66,7 +66,8 @@ send_echo (CORBA::ORB_ptr orb, // Sleep so the server can send the reply... ACE_Time_Value tv (max_timeout / 1000, (max_timeout % 1000) * 1000); - orb->run (tv); + orb->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_ENDTRY; } diff --git a/TAO/tests/Timeout/server.cpp b/TAO/tests/Timeout/server.cpp index 30f7e1c872c..33e49416cdc 100644 --- a/TAO/tests/Timeout/server.cpp +++ b/TAO/tests/Timeout/server.cpp @@ -52,7 +52,7 @@ main (int argc, char *argv[]) ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize the POA.\n"), 1); - + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); ACE_TRY_CHECK; @@ -66,7 +66,7 @@ main (int argc, char *argv[]) Simple_Server_var server = server_impl._this (ACE_TRY_ENV); ACE_TRY_CHECK; - + CORBA::String_var ior = orb->object_to_string (server.in (), ACE_TRY_ENV); ACE_TRY_CHECK; @@ -89,7 +89,8 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - orb->run (); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; // ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); } diff --git a/TAO/tests/ior_corbaloc/Makefile b/TAO/tests/ior_corbaloc/Makefile index 8b09c3054c3..32760d469d4 100644 --- a/TAO/tests/ior_corbaloc/Makefile +++ b/TAO/tests/ior_corbaloc/Makefile @@ -15,7 +15,7 @@ endif # ! TAO_ROOT IDL_FILES = corbaloc IDL_SRC = corbalocC corbalocS -LDLIBS = -lTAO_PortableServer -lTAO -lTAO_CosNaming +LDLIBS = -lTAO_CosNaming -lTAO_PortableServer -lTAO #CPPFLAGS += -I$(TAO_ROOT)/orbsvcs BIN = server client diff --git a/TAO/tests/ior_corbaloc/server.cpp b/TAO/tests/ior_corbaloc/server.cpp index d38e86f0a52..ea0a172b6cd 100644 --- a/TAO/tests/ior_corbaloc/server.cpp +++ b/TAO/tests/ior_corbaloc/server.cpp @@ -45,7 +45,7 @@ int main (int argc, char* argv[]) corbaloc_Status_i status_i; // Activate it to obtain the reference - corbaloc::Status_var status = + corbaloc::Status_var status = status_i._this (); // Get a reference to Naming Context @@ -67,12 +67,14 @@ int main (int argc, char* argv[]) naming_context->bind (name, status.in ()); // Run the orb - orb->run (); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; // Destroy the POA, waiting until the destruction terminates - poa->destroy (1, 1); - orb->destroy (); - + poa->destroy (1, 1, ACE_TRY_ENV); + ACE_TRY_CHECK; + orb->destroy (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCH (CORBA::SystemException, ex) { std::cerr << "CORBA exception raised! " << ex << std::endl; |