diff options
Diffstat (limited to 'TAO')
108 files changed, 629 insertions, 433 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index c56c075b145..9f64d6d8b46 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,122 @@ +Tue Feb 13 09:17:30 2001 Carlos O'Ryan <coryan@uci.edu> + + * tao/ORB.h: + * tao/ORB.cpp: + The spec says that ORB::run() and ORB::perform_work() return + void. If there are errors an exception is raised. Having both + exceptions and error codes only results in confusing and broken + code. + + * tao/PortableServer/ORB_Manager.cpp: + * examples/Borland/ORBThread.cpp: + * examples/Buffered_AMI/client.cpp: + * examples/Buffered_AMI/server.cpp: + * examples/Buffered_Oneways/client.cpp: + * examples/Buffered_Oneways/server.cpp: + * examples/Callback_Quoter/Consumer_Handler.cpp: + * examples/Callback_Quoter/Notifier_Input_Handler.cpp: + * examples/Callback_Quoter/Supplier_i.cpp: + * examples/Event_Comm/Consumer_Handler.cpp: + * examples/POA/Adapter_Activator/server.cpp: + * examples/POA/DSI/server.cpp: + * examples/POA/Default_Servant/server.cpp: + * examples/POA/Explicit_Activation/server.cpp: + * examples/POA/Forwarding/server.cpp: + * examples/POA/Loader/Server_Manager.cpp: + * examples/POA/On_Demand_Activation/server.cpp: + * examples/POA/On_Demand_Loading/Server_Manager.cpp: + * examples/POA/Reference_Counted_Servant/server.cpp: + * examples/POA/TIE/server.cpp: + * examples/Simulator/Event_Supplier/Event_Con.cpp: + * orbsvcs/CosEvent_Service/CosEvent_Service.cpp: + * orbsvcs/Event_Service/Event_Service.cpp: + * orbsvcs/IFR_Service/IFR_Service.cpp: + * orbsvcs/ImplRepo_Service/ImplRepo.cpp: + * orbsvcs/ImplRepo_Service/ImplRepo_i.cpp: + * orbsvcs/ImplRepo_Service/NT_Service.cpp: + * orbsvcs/ImplRepo_Service/tao_imr_i.cpp: + * orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp: + * orbsvcs/Logging_Service/Logging_Service.cpp: + * orbsvcs/Naming_Service/NT_Naming_Server.cpp: + * orbsvcs/Naming_Service/Naming_Service.cpp: + * orbsvcs/Notify_Service/Notify_Service.cpp: + * orbsvcs/Time_Service/Server_i.cpp: + * orbsvcs/examples/CosEC/RtEC_Based/bin/RtEC_Based_CosEC.cpp: + * orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Multiple.cpp: + * orbsvcs/examples/Security/Send_File/server.cpp: + * orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp: + * orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp: + * orbsvcs/tests/AVStreams/Latency/control.cpp: + * orbsvcs/tests/AVStreams/Latency/ping.cpp: + * orbsvcs/tests/AVStreams/Latency/pong.cpp: + * orbsvcs/tests/AVStreams/Multicast/ftp.cpp: + * orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp: + * orbsvcs/tests/AVStreams/benchmark/server.cpp: + * orbsvcs/tests/EC_Multiple/EC_Multiple.cpp: + * orbsvcs/tests/Event/Performance/Latency.cpp: + * orbsvcs/tests/Event/Performance/Latency_Server.cpp: + * orbsvcs/tests/Event/Performance/Makefile: + * orbsvcs/tests/FaultTolerance/IOGR/Manager.cpp: + * orbsvcs/tests/ImplRepo/airplane_client.cpp: + * orbsvcs/tests/ImplRepo/airplane_server.cpp: + * orbsvcs/tests/ImplRepo/nestea_server_i.cpp: + * orbsvcs/tests/InterfaceRepo/Application_Test/server.cpp: + * orbsvcs/tests/ior_corbaname/server.cpp: + * performance-tests/Callback/Callback_i.cpp: + * performance-tests/Callback/Callback_i.h: + * performance-tests/Callback/Server_i.cpp: + * performance-tests/Callback/Server_i.h: + * performance-tests/Callback/callback.idl: + * performance-tests/Callback/client.cpp: + * performance-tests/Latency/client.conf: + * performance-tests/Latency/st_client.conf: + * performance-tests/POA/Demux/demux_test_server.cpp: + * performance-tests/RTCorba/Oneways/Reliable/server.cpp: + * performance-tests/Thruput/TAO/server.cpp: + * tests/AMI/server.cpp: + * tests/AMI_Timeouts/client.cpp: + * tests/AMI_Timeouts/server.cpp: + * tests/AMI_Timeouts/timeout_client.cpp: + * tests/BiDirectional/client.cpp: + * tests/BiDirectional_NestedUpcall/server.cpp: + * tests/DSI_Gateway/gateway.cpp: + * tests/DSI_Gateway/server.cpp: + * tests/Faults/middle.cpp: + * tests/Faults/ping.cpp: + * tests/Faults/pong.cpp: + * tests/Faults/server.cpp: + * tests/Forwarding/server.cpp: + * tests/InterOp-Naming/Server_i.cpp: + * tests/Leader_Followers/client.cpp: + * tests/Leader_Followers/server.cpp: + * tests/LongUpcalls/AMI_Manager.cpp: + * tests/LongUpcalls/ami_client.cpp: + * tests/LongUpcalls/ami_server.cpp: + * tests/LongUpcalls/blocking_server.cpp: + * tests/MProfile/server.cpp: + * tests/MProfile_Forwarding/Manager.cpp: + * tests/MProfile_Forwarding/server.cpp: + * tests/MT_Client/server.cpp: + * tests/MT_Server/server.cpp: + * tests/Native_Exceptions/server.cpp: + * tests/NestedUpcall/Simple/server.cpp: + * tests/Nested_Event_Loop/server.cpp: + * tests/OctetSeq/server.cpp: + * tests/Param_Test/server.cpp: + * tests/Single_Read/server.cpp: + * tests/Smart_Proxies/server.cpp: + * tests/Smart_Proxies/On_Demand/server.cpp: + * tests/Strategies/server.cpp: + * tests/Timed_Buffered_Oneways/server.cpp: + * tests/Timeout/client.cpp: + * tests/Timeout/server.cpp: + * tests/ior_corbaloc/server.cpp: + Don't check for return code from ORB::run() + + * tests/ior_corbaloc/Makefile: + Reorder libraries, -lTAO_CosNaming should appear *before* + -lTAO. + Tue Feb 13 09:16:42 2001 Darrell Brunsch <brunsch@uci.edu> * orbsvcs/ImplRepo_Service/Forwarder.cpp: diff --git a/TAO/examples/Borland/ORBThread.cpp b/TAO/examples/Borland/ORBThread.cpp index 883729698bb..71b761ffb89 100644 --- a/TAO/examples/Borland/ORBThread.cpp +++ b/TAO/examples/Borland/ORBThread.cpp @@ -34,7 +34,7 @@ __fastcall TORBThread::~TORBThread () catch (CORBA::Exception&) { } - + WaitFor (); } //--------------------------------------------------------------------------- diff --git a/TAO/examples/Buffered_AMI/client.cpp b/TAO/examples/Buffered_AMI/client.cpp index 5c7a23cfba5..03de4f5e928 100644 --- a/TAO/examples/Buffered_AMI/client.cpp +++ b/TAO/examples/Buffered_AMI/client.cpp @@ -314,7 +314,8 @@ main (int argc, char **argv) ACE_Time_Value sleep_interval (0, interval * 1000); - orb->run (sleep_interval); + orb->run (sleep_interval, ACE_TRY_ENV); + ACE_TRY_CHECK; } // Loop until all replies have been received. diff --git a/TAO/examples/Buffered_AMI/server.cpp b/TAO/examples/Buffered_AMI/server.cpp index 8db43471f86..57565d8e20f 100644 --- a/TAO/examples/Buffered_AMI/server.cpp +++ b/TAO/examples/Buffered_AMI/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/examples/Buffered_Oneways/client.cpp b/TAO/examples/Buffered_Oneways/client.cpp index f3c41136d34..2bdf6317cee 100644 --- a/TAO/examples/Buffered_Oneways/client.cpp +++ b/TAO/examples/Buffered_Oneways/client.cpp @@ -308,7 +308,8 @@ main (int argc, char **argv) ACE_Time_Value sleep_interval (0, interval * 1000); - orb->run (sleep_interval); + orb->run (sleep_interval, ACE_TRY_ENV); + ACE_TRY_CHECK; } // Shutdown server. diff --git a/TAO/examples/Buffered_Oneways/server.cpp b/TAO/examples/Buffered_Oneways/server.cpp index cf6412faf12..0833f740340 100644 --- a/TAO/examples/Buffered_Oneways/server.cpp +++ b/TAO/examples/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/examples/Callback_Quoter/Consumer_Handler.cpp b/TAO/examples/Callback_Quoter/Consumer_Handler.cpp index 5d8d9ed57b8..9b1daa80a75 100644 --- a/TAO/examples/Callback_Quoter/Consumer_Handler.cpp +++ b/TAO/examples/Callback_Quoter/Consumer_Handler.cpp @@ -185,7 +185,7 @@ Consumer_Handler::via_naming_service (void) ACE_TRY_CHECK; } - ACE_CATCHANY + ACE_CATCHANY { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Consumer_Handler::via_naming_service\n"); return -1; @@ -200,7 +200,7 @@ Consumer_Handler::via_naming_service (void) int Consumer_Handler::init (int argc, char **argv) { - + this->argc_ = argc; this->argv_ = argv; @@ -217,13 +217,13 @@ Consumer_Handler::init (int argc, char **argv) ACE_TRY_ENV); ACE_TRY_CHECK; - + // Parse command line and verify parameters. if (this->parse_args () == -1) ACE_ERROR_RETURN ((LM_ERROR, "parse_args failed\n"), -1); - + if (this->interactive_ == 1) { ACE_DEBUG ((LM_DEBUG, @@ -231,11 +231,11 @@ Consumer_Handler::init (int argc, char **argv) " * Registration <type 'r'>\n " " * Unregistration <type 'u'>\n " " * Quit <type 'q'>\n ")); - + ACE_NEW_RETURN (consumer_input_handler_, Consumer_Input_Handler (this), -1); - + if (ACE_Event_Handler::register_stdin_handler (consumer_input_handler_, this->orb_->orb_core ()->reactor (), @@ -244,12 +244,12 @@ Consumer_Handler::init (int argc, char **argv) "%p\n", "register_stdin_handler"), -1); - + // Register the signal event handler for ^C ACE_NEW_RETURN (consumer_signal_handler_, Consumer_Signal_Handler (this), -1); - + if (this->reactor_used ()->register_handler (SIGINT, consumer_signal_handler_) == -1) @@ -268,18 +268,18 @@ Consumer_Handler::init (int argc, char **argv) } else { - + if (this->ior_ == 0) ACE_ERROR_RETURN ((LM_ERROR, "%s: no ior specified\n", this->argv_[0]), -1); - + CORBA::Object_var server_object = this->orb_->string_to_object (this->ior_, ACE_TRY_ENV); ACE_TRY_CHECK; - + if (CORBA::is_nil (server_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, "invalid ior <%s>\n", @@ -312,13 +312,13 @@ Consumer_Handler::run (void) ACE_TRY { // Obtain and activate the RootPOA. - CORBA::Object_var obj = + CORBA::Object_var obj = this->orb_->resolve_initial_references ("RootPOA"); PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - + PortableServer::POAManager_var poa_manager= root_poa->the_POAManager (ACE_TRY_ENV); ACE_TRY_CHECK; @@ -331,22 +331,22 @@ Consumer_Handler::run (void) -1); // Set the orb in the consumer_ object. this->consumer_servant_->orb (this->orb_.in ()); - + // Get the consumer stub (i.e consumer object) pointer. this->consumer_var_ = this->consumer_servant_->_this (ACE_TRY_ENV); - ACE_TRY_CHECK; - + ACE_TRY_CHECK; + if (this->interactive_ == 0) { - + // Register with the server. this->server_->register_callback (this->stock_name_, this->threshold_value_, this->consumer_var_.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - + // Note the registration. this->registered_ = 1; this->unregistered_ = 0; @@ -356,8 +356,9 @@ Consumer_Handler::run (void) } // Run the ORB. - this->orb_->run (); - + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } ACE_CATCHANY { @@ -365,7 +366,7 @@ Consumer_Handler::run (void) return -1; } ACE_ENDTRY; - + return 0; } diff --git a/TAO/examples/Callback_Quoter/Notifier_Input_Handler.cpp b/TAO/examples/Callback_Quoter/Notifier_Input_Handler.cpp index a040da0ac6f..82c2c122464 100644 --- a/TAO/examples/Callback_Quoter/Notifier_Input_Handler.cpp +++ b/TAO/examples/Callback_Quoter/Notifier_Input_Handler.cpp @@ -69,7 +69,7 @@ Notifier_Input_Handler::init_naming_service (CORBA::Environment &ACE_TRY_ENV) { Notifier_var notifier_obj = notifier_i_._this (ACE_TRY_ENV); ACE_TRY_CHECK; - + this->orb_manager_.activate_poa_manager (ACE_TRY_ENV); ACE_TRY_CHECK; diff --git a/TAO/examples/Callback_Quoter/Supplier_i.cpp b/TAO/examples/Callback_Quoter/Supplier_i.cpp index 9c405c80786..f2c5ab1f9ba 100644 --- a/TAO/examples/Callback_Quoter/Supplier_i.cpp +++ b/TAO/examples/Callback_Quoter/Supplier_i.cpp @@ -156,7 +156,7 @@ Supplier::send_market_status (const char *stock_name, ACE_TRY { - + // Make the RMI. this->notifier_->market_status (stock_name, value, @@ -249,7 +249,7 @@ Supplier::via_naming_service (void) return -1; } ACE_ENDTRY; - + return 0; } @@ -318,7 +318,7 @@ Supplier::init (int argc, char **argv) return -1; } ACE_ENDTRY; - + return 0; } diff --git a/TAO/examples/Event_Comm/Consumer_Handler.cpp b/TAO/examples/Event_Comm/Consumer_Handler.cpp index 46a30a7d912..9004347a4c4 100644 --- a/TAO/examples/Event_Comm/Consumer_Handler.cpp +++ b/TAO/examples/Event_Comm/Consumer_Handler.cpp @@ -152,7 +152,16 @@ Consumer_Handler::run (void) "Running the Consumer...\n")); // Run the ORB. - 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/examples/POA/Adapter_Activator/server.cpp b/TAO/examples/POA/Adapter_Activator/server.cpp index 03f10f6b015..4d1e25cf9ed 100644 --- a/TAO/examples/POA/Adapter_Activator/server.cpp +++ b/TAO/examples/POA/Adapter_Activator/server.cpp @@ -430,8 +430,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", "CORBA::ORB::run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } ACE_CATCHANY { diff --git a/TAO/examples/POA/DSI/server.cpp b/TAO/examples/POA/DSI/server.cpp index 9fc3fc567d2..334038c62a3 100644 --- a/TAO/examples/POA/DSI/server.cpp +++ b/TAO/examples/POA/DSI/server.cpp @@ -200,8 +200,8 @@ main (int argc, char **argv) ACE_TRY_CHECK; // Run the ORB - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/examples/POA/Default_Servant/server.cpp b/TAO/examples/POA/Default_Servant/server.cpp index 6d786bcc182..5a34e913b69 100644 --- a/TAO/examples/POA/Default_Servant/server.cpp +++ b/TAO/examples/POA/Default_Servant/server.cpp @@ -161,8 +161,9 @@ main (int argc, char **argv) ACE_TRY_CHECK; // Run the ORB - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } ACE_CATCHANY { diff --git a/TAO/examples/POA/Explicit_Activation/server.cpp b/TAO/examples/POA/Explicit_Activation/server.cpp index cfd49439658..456e3c712b3 100644 --- a/TAO/examples/POA/Explicit_Activation/server.cpp +++ b/TAO/examples/POA/Explicit_Activation/server.cpp @@ -309,8 +309,8 @@ 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", "CORBA::ORB::run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; ACE_TIMEPROBE_PRINT; } diff --git a/TAO/examples/POA/Forwarding/server.cpp b/TAO/examples/POA/Forwarding/server.cpp index 64879ed88ef..43623dc0ff1 100644 --- a/TAO/examples/POA/Forwarding/server.cpp +++ b/TAO/examples/POA/Forwarding/server.cpp @@ -212,14 +212,11 @@ main (int argc, poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - if (orb->run (ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "CORBA::ORB::run"), - -1); + orb->run (ACE_TRY_ENV); ACE_TRY_CHECK; - orb->destroy (); + orb->destroy (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/examples/POA/Loader/Server_Manager.cpp b/TAO/examples/POA/Loader/Server_Manager.cpp index 68d3199b557..3988d01dc8d 100644 --- a/TAO/examples/POA/Loader/Server_Manager.cpp +++ b/TAO/examples/POA/Loader/Server_Manager.cpp @@ -367,11 +367,8 @@ Server_i::run (void) ACE_TRY_CHECK; // Run the ORB. - if (orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "CORBA::ORB::run"), - -1); + orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/examples/POA/On_Demand_Activation/server.cpp b/TAO/examples/POA/On_Demand_Activation/server.cpp index 31488ddea2f..875341ff073 100644 --- a/TAO/examples/POA/On_Demand_Activation/server.cpp +++ b/TAO/examples/POA/On_Demand_Activation/server.cpp @@ -264,8 +264,8 @@ main (int argc, char **argv) ACE_TRY_CHECK; // Run the ORB. - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp b/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp index f6af48b38e1..3818fa20739 100644 --- a/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp @@ -357,11 +357,8 @@ Server_i::run (void) ACE_TRY_CHECK; // Run the ORB. - if (orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "CORBA::ORB::run"), - -1); + orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/examples/POA/Reference_Counted_Servant/server.cpp b/TAO/examples/POA/Reference_Counted_Servant/server.cpp index 012a98199da..8185e99fad6 100644 --- a/TAO/examples/POA/Reference_Counted_Servant/server.cpp +++ b/TAO/examples/POA/Reference_Counted_Servant/server.cpp @@ -169,8 +169,8 @@ 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", "CORBA::ORB::run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/examples/POA/TIE/server.cpp b/TAO/examples/POA/TIE/server.cpp index c4d8558e5fb..1e2d1eb506b 100644 --- a/TAO/examples/POA/TIE/server.cpp +++ b/TAO/examples/POA/TIE/server.cpp @@ -248,8 +248,8 @@ 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", "CORBA::ORB::run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp index f2fd6988de3..14766b7a4ea 100644 --- a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp +++ b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp @@ -357,11 +357,7 @@ main (int argc, char *argv []) // Run the ORB - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "CORBA::ORB::run"), - -1); + orb->run (ACE_TRY_ENV); ACE_TRY_CHECK; delete demo_consumer; diff --git a/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp b/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp index a89aaf5229d..62cef5a4223 100644 --- a/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp +++ b/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp @@ -25,7 +25,7 @@ main (int argc, char* argv[]) TAO_CEC_Event_Loader event_service; // To intialise the service - int result = + int result = event_service.init (argc, argv); if (result == -1) diff --git a/TAO/orbsvcs/Event_Service/Event_Service.cpp b/TAO/orbsvcs/Event_Service/Event_Service.cpp index e377271a858..e2dbc619768 100644 --- a/TAO/orbsvcs/Event_Service/Event_Service.cpp +++ b/TAO/orbsvcs/Event_Service/Event_Service.cpp @@ -219,8 +219,8 @@ Event_Service::run (int argc, char* argv[]) ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "%s; running event service\n", __FILE__)); - if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1); + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; naming_context->unbind (channel_name, ACE_TRY_ENV); ACE_TRY_CHECK; diff --git a/TAO/orbsvcs/IFR_Service/IFR_Service.cpp b/TAO/orbsvcs/IFR_Service/IFR_Service.cpp index 483b243e994..9f6217c7c50 100644 --- a/TAO/orbsvcs/IFR_Service/IFR_Service.cpp +++ b/TAO/orbsvcs/IFR_Service/IFR_Service.cpp @@ -119,17 +119,9 @@ IFR_Service::init (int argc, int IFR_Service::run (CORBA::Environment &ACE_TRY_ENV) { - int status = this->orb_->run (0, - ACE_TRY_ENV); + this->orb_->run (0, ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - if (status == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Error: IFR_Service::run"), - -1); - } - return 0; } diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo.cpp b/TAO/orbsvcs/ImplRepo_Service/ImplRepo.cpp index b069060f1db..53aabcd739f 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImplRepo.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo.cpp @@ -5,7 +5,7 @@ #include "ImplRepo_i.h" #include "NT_Service.h" -int +int run_standalone (void) { ImplRepo_i server; @@ -27,7 +27,7 @@ run_standalone (void) status = server.fini (ACE_TRY_ENV); ACE_TRY_CHECK; - + if (status == -1) return 1; } @@ -48,7 +48,7 @@ run_standalone (void) return 1; } ACE_ENDTRY; - + return 0; } @@ -66,7 +66,7 @@ run_service (void) // being called from the service manager to start the service. ACE_NT_SERVICE_RUN (service, SERVICE::instance (), ret); - + if (ret == 0) ACE_ERROR ((LM_ERROR, "%p\n", "Couldn't start service")); @@ -80,7 +80,7 @@ int main (int argc, char *argv[]) { int result = OPTIONS::instance ()->init (argc, argv); - + if (result < 0) return 1; // Error parsing args else if (result > 0) diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp index 7c16845a812..6dcef1e85bc 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp @@ -648,7 +648,7 @@ ImplRepo_i::server_is_running (const char *server, ACE_DEBUG ((LM_DEBUG, " at %s\n", location)); // Get the stringified server_object_ior - ACE_TCHAR *server_object_ior = orb->object_to_string (server_object, + ACE_TCHAR *server_object_ior = orb->object_to_string (server_object, ACE_TRY_ENV); ACE_CHECK_RETURN (0); @@ -986,13 +986,13 @@ ImplRepo_i::run (CORBA::Environment &ACE_TRY_ENV) { CORBA::ORB_var orb = OPTIONS::instance ()->orb (); - PortableServer::POAManager_var poa_manager = + PortableServer::POAManager_var poa_manager = this->imr_poa_->the_POAManager (ACE_TRY_ENV); poa_manager->activate (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); // Get a new iterator - auto_ptr<Server_Repository::HASH_IMR_ITER> + auto_ptr<Server_Repository::HASH_IMR_ITER> server_iter (this->repository_.new_iterator ()); // Check for a memory error. @@ -1010,7 +1010,7 @@ ImplRepo_i::run (CORBA::Environment &ACE_TRY_ENV) server_iter->advance (); ACE_TString logical, server, command_line, working_directory; - ImplementationRepository::ActivationMode activation + ImplementationRepository::ActivationMode activation = ImplementationRepository::NORMAL; ImplementationRepository::EnvironmentList environment_vars ; @@ -1042,13 +1042,9 @@ ImplRepo_i::run (CORBA::Environment &ACE_TRY_ENV) } - int status = orb->run (0, ACE_TRY_ENV); + orb->run (0, ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - if (status == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error: In IMR_Server_i::run"), - -1); return 0; } @@ -1166,7 +1162,7 @@ ImplRepo_i::list (CORBA::ULong how_many, ACE_TString location, server_ior; ImplementationRepository::EnvironmentList environment_vars; - ImplementationRepository::ActivationMode activation = + ImplementationRepository::ActivationMode activation = ImplementationRepository::NORMAL; server_entry->int_id_->get_running_info (location, server_ior); @@ -1255,7 +1251,7 @@ ImplRepo_i::shutdown_server (const char *server, ACE_TRY_CHECK; ImplementationRepository::ServerObject_var server_object = - ImplementationRepository::ServerObject::_narrow (object.in (), + ImplementationRepository::ServerObject::_narrow (object.in (), ACE_TRY_ENV); ACE_TRY_CHECK; diff --git a/TAO/orbsvcs/ImplRepo_Service/NT_Service.cpp b/TAO/orbsvcs/ImplRepo_Service/NT_Service.cpp index 0c188c69d5c..80505d90f52 100644 --- a/TAO/orbsvcs/ImplRepo_Service/NT_Service.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/NT_Service.cpp @@ -6,8 +6,8 @@ * * @author Darrell Brunsch <brunsch@cs.wustl.edu> * @author Jeff Parsons <parsons@cs.wustl.edu> - * @author John Tucker <jtucker@infoglide.com> - * @author Mike Vitalo <mvitalo@infoglide.com> + * @author John Tucker <jtucker@infoglide.com> + * @author Mike Vitalo <mvitalo@infoglide.com> */ //============================================================================= diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp index 96a638d5aa8..cb26d5b25fe 100644 --- a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp @@ -732,9 +732,9 @@ TAO_IMR_Op_IOR::run (void) || !this->implrepo_->_stubobj ()->profile_in_use ()) { ACE_ERROR_RETURN (( - LM_ERROR, + LM_ERROR, ACE_TEXT ("Invalid Implementation Repository IOR\n") - ), + ), -1 ); } @@ -743,10 +743,10 @@ TAO_IMR_Op_IOR::run (void) this->implrepo_->_stubobj ()->profile_in_use ()->to_string (ACE_TRY_ENV); ACE_TRY_CHECK; - char *pos = ACE_OS::strstr (imr_str.inout (), + char *pos = ACE_OS::strstr (imr_str.inout (), "://"); - pos = + pos = ACE_OS::strchr ( pos + 3, this->implrepo_->_stubobj ()->profile_in_use ()->object_key_delimiter () @@ -758,8 +758,8 @@ TAO_IMR_Op_IOR::run (void) } else { - ACE_ERROR_RETURN ((LM_ERROR, - "Could not parse IMR IOR\n"), + ACE_ERROR_RETURN ((LM_ERROR, + "Could not parse IMR IOR\n"), -1); } @@ -768,25 +768,25 @@ TAO_IMR_Op_IOR::run (void) // Add the key ior += this->server_name_; - ACE_DEBUG ((LM_DEBUG, - "%s\n", + ACE_DEBUG ((LM_DEBUG, + "%s\n", ior.c_str ())); if (this->filename_.length () > 0) { - FILE *file = ACE_OS::fopen (this->filename_.c_str (), + FILE *file = ACE_OS::fopen (this->filename_.c_str (), "w"); if (file == 0) { ACE_ERROR_RETURN ((LM_ERROR, "Error: Unable to open %s for writing: %p\n", - this->filename_.c_str ()), + this->filename_.c_str ()), -1); } - ACE_OS::fprintf (file, - "%s", + ACE_OS::fprintf (file, + "%s", ior.c_str ()); ACE_OS::fclose (file); } @@ -1104,10 +1104,10 @@ TAO_IMR_Op::display_server_information (const ImplementationRepository::ServerIn ACE_DEBUG ((LM_DEBUG, "Environment Variable: %s=%s \n", info.startup.environment[i].name.in (), info.startup.environment[i].value.in ())); - + // @@ add logical server once implemented - + if (info.startup.activation == ImplementationRepository::PER_CLIENT) ACE_DEBUG ((LM_DEBUG, " No running info available for PER_CLIENT mode\n")); else if (ACE_OS::strlen (info.location) > 0) @@ -1131,6 +1131,3 @@ TAO_IMR_Op_List::display_server_information (const ImplementationRepository::Ser else ACE_DEBUG ((LM_DEBUG, "<%s>\n", info.server.in ())); } - - - diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp index 34e3c9a5734..361f97ff360 100644 --- a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp +++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp @@ -140,17 +140,13 @@ Life_Cycle_Service_Server::init (int argc, int Life_Cycle_Service_Server::run (CORBA::Environment &ACE_TRY_ENV) { - ACE_UNUSED_ARG (ACE_TRY_ENV); - if (this->debug_level_ >= 1) ACE_DEBUG ((LM_DEBUG, "\nLifeCycle Service: Life_Cycle_Service_Server is running\n")); - - if (orb_manager_.orb()->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "run"), - -1); + + orb_manager_.orb()->run (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); + return 0; } @@ -172,7 +168,7 @@ Life_Cycle_Service_Server::parse_args (void) break; default: exit_code = 1; - ACE_ERROR ((LM_ERROR, + ACE_ERROR ((LM_ERROR, "%s: unknown arg, -%c\n", this->argv_[0], char(opt))); case '?': @@ -218,5 +214,3 @@ main (int argc, char *argv []) ACE_ENDTRY; return 0; } - - diff --git a/TAO/orbsvcs/Logging_Service/Logging_Service.cpp b/TAO/orbsvcs/Logging_Service/Logging_Service.cpp index a78aac121ae..348999b826d 100644 --- a/TAO/orbsvcs/Logging_Service/Logging_Service.cpp +++ b/TAO/orbsvcs/Logging_Service/Logging_Service.cpp @@ -112,8 +112,18 @@ int Logging_Service::run (void) { ACE_DEBUG ((LM_DEBUG, "%s: Running the Telecom Log Service\n", __FILE__)); - if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1); + + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + return -1; + } + ACE_ENDTRY; return 0; } diff --git a/TAO/orbsvcs/Naming_Service/NT_Naming_Server.cpp b/TAO/orbsvcs/Naming_Service/NT_Naming_Server.cpp index b256d5153ee..17060ad4cc0 100644 --- a/TAO/orbsvcs/Naming_Service/NT_Naming_Server.cpp +++ b/TAO/orbsvcs/Naming_Service/NT_Naming_Server.cpp @@ -12,7 +12,7 @@ // // = DESCRIPTION // Driver program that runs the TAO Naming Service as a Windows NT -// Service. +// Service. // // = AUTHORS // John Tucker <jtucker@infoglide.com> and @@ -99,7 +99,7 @@ void Options::parse_args (int argc, char *argv[]) { ACE_Get_Opt get_opt (argc, argv, "i:rskt:d"); - int c; + int c; while ((c = get_opt ()) != -1) switch (c) @@ -199,13 +199,12 @@ Options::run (int argc, char* argv[]) "%p\n", "Couldn't start service")); } - + return 0; } int main (int argc, char *argv[]) -{ +{ return OPTIONS::instance ()->run (argc, argv); } - diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp b/TAO/orbsvcs/Naming_Service/Naming_Service.cpp index 175787dd765..994984ed13c 100644 --- a/TAO/orbsvcs/Naming_Service/Naming_Service.cpp +++ b/TAO/orbsvcs/Naming_Service/Naming_Service.cpp @@ -91,7 +91,7 @@ TAO_Naming_Service::parse_args (int argc, for (i = count_argv; i != argc; ++i) argv [i] = argv [i+2]; } - + // Decrement the value of this->argc_ to reflect the removal // of '-t' option. argc = argc-2; @@ -111,21 +111,19 @@ TAO_Naming_Service::parse_args (int argc, int TAO_Naming_Service::run (CORBA_Environment& ACE_TRY_ENV) { - int result; - if (time_ == 0) { - result = this->orb_->run (ACE_TRY_ENV); + this->orb_->run (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); } else { ACE_Time_Value tv (time_); - result = this->orb_->run (tv, ACE_TRY_ENV); + this->orb_->run (tv, ACE_TRY_ENV); ACE_CHECK_RETURN (-1); } - return result; + return 0; } // Destructor. diff --git a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp index 1422e94f302..009ac1f08ae 100644 --- a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp +++ b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp @@ -234,9 +234,22 @@ Notify_Service::run (void) __FILE__)); if (this->nthreads_ > 0) - worker_.thr_mgr ()->wait (); - else if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); + { + worker_.thr_mgr ()->wait (); + return 0; + } + + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); + } + ACE_ENDTRY; return 0; } @@ -370,7 +383,16 @@ Worker::orb (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/orbsvcs/Time_Service/Server_i.cpp b/TAO/orbsvcs/Time_Service/Server_i.cpp index 3bd28dcf4ab..bb65dbab941 100644 --- a/TAO/orbsvcs/Time_Service/Server_i.cpp +++ b/TAO/orbsvcs/Time_Service/Server_i.cpp @@ -334,4 +334,3 @@ Server_i::run (CORBA::Environment &ACE_TRY_ENV) ACE_CHECK_RETURN (0); return 0; } - diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/bin/RtEC_Based_CosEC.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/bin/RtEC_Based_CosEC.cpp index 746c330ebb3..b0deec77fad 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/bin/RtEC_Based_CosEC.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/bin/RtEC_Based_CosEC.cpp @@ -239,8 +239,17 @@ int RtEC_Based_CosEC::run (void) { ACE_DEBUG ((LM_DEBUG, "%s: Running the CosEventService\n", __FILE__)); - if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1); + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1); + } + ACE_ENDTRY; return 0; } diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Multiple.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Multiple.cpp index 839d6b7c10c..63f8931ea7e 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Multiple.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Multiple.cpp @@ -128,8 +128,17 @@ Multiple::init_CosEC (void) int Multiple::runORB (void) { - if (this->orb_->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), 1); + } + ACE_ENDTRY; return 0; } diff --git a/TAO/orbsvcs/examples/Security/Send_File/server.cpp b/TAO/orbsvcs/examples/Security/Send_File/server.cpp index e8da4bb3aaf..429696fa557 100644 --- a/TAO/orbsvcs/examples/Security/Send_File/server.cpp +++ b/TAO/orbsvcs/examples/Security/Send_File/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/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp index a4cbf29ab8f..42b4ba4bf6e 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp @@ -55,12 +55,12 @@ template <class T_StreamEndpoint, class T_VDev , class T_MediaCtrl> char * TAO_AV_Endpoint_Reactive_Strategy <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activate_with_poa (PortableServer::Servant servant, CORBA::Environment &ACE_TRY_ENV) { - + PortableServer::ObjectId_var id = this->poa_->activate_object (servant, ACE_TRY_ENV); ACE_CHECK_RETURN (0); - + CORBA::Object_var obj = this->poa_->id_to_reference (id.in (), ACE_TRY_ENV); @@ -70,7 +70,7 @@ TAO_AV_Endpoint_Reactive_Strategy <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activ this->orb_->object_to_string (obj.in (), ACE_TRY_ENV); ACE_CHECK_RETURN (0); - + return str._retn (); } @@ -137,7 +137,7 @@ TAO_AV_Endpoint_Reactive_Strategy <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activ anyval <<= this->orb_->object_to_string (media_ctrl->_this (ACE_TRY_ENV), ACE_TRY_ENV); ACE_TRY_CHECK; - + this->vdev_->define_property ("Related_MediaCtrl", anyval, ACE_TRY_ENV); @@ -311,7 +311,7 @@ TAO_AV_Endpoint_Reactive_Strategy_B <T_StreamEndpoint, T_VDev, T_MediaCtrl>::act ACE_TRY_ENV); ACE_TRY_CHECK; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_Endpoint_Reactive_Strategy_B::activate_stream_endpoint,Stream Endpoint ior is : %s\n",stream_endpoint_ior.in ())); - + this->stream_endpoint_b_ = stream_endpoint_b->_this (ACE_TRY_ENV); ACE_TRY_CHECK; stream_endpoint_b->_remove_ref (ACE_TRY_ENV); @@ -365,7 +365,7 @@ TAO_AV_Child_Process <T_StreamEndpoint_B, T_VDev, T_MediaCtrl>::TAO_AV_Child_Pro // Initializes the ORB, activates the objects, and release the semaphore template <class T_StreamEndpoint_B, class T_VDev , class T_MediaCtrl> int -TAO_AV_Child_Process <T_StreamEndpoint_B, T_VDev, T_MediaCtrl>::init (int argc, +TAO_AV_Child_Process <T_StreamEndpoint_B, T_VDev, T_MediaCtrl>::init (int argc, char **argv, CORBA::ORB_ptr orb, PortableServer::POA_ptr poa) @@ -376,7 +376,7 @@ TAO_AV_Child_Process <T_StreamEndpoint_B, T_VDev, T_MediaCtrl>::init (int argc, this->orb_ = orb; this->poa_ = poa; - + // create the objects and activate them in the poa this->activate_objects (argc, argv, @@ -413,15 +413,15 @@ TAO_AV_Child_Process <T_StreamEndpoint_B, T_VDev, T_MediaCtrl>::init (int argc, template <class T_StreamEndpoint, class T_VDev , class T_MediaCtrl> char * -TAO_AV_Child_Process <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activate_with_poa (PortableServer::Servant servant, +TAO_AV_Child_Process <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activate_with_poa (PortableServer::Servant servant, CORBA::Environment &ACE_TRY_ENV) { - + PortableServer::ObjectId_var id = this->poa_->activate_object (servant, ACE_TRY_ENV); ACE_CHECK_RETURN (0); - + CORBA::Object_var obj = this->poa_->id_to_reference (id.in (), ACE_TRY_ENV); @@ -431,7 +431,7 @@ TAO_AV_Child_Process <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activate_with_poa this->orb_->object_to_string (obj.in (), ACE_TRY_ENV); ACE_CHECK_RETURN (0); - + return str._retn (); } @@ -595,11 +595,10 @@ template <class T_StreamEndpoint_B, class T_VDev , class T_MediaCtrl> int TAO_AV_Child_Process <T_StreamEndpoint_B, T_VDev, T_MediaCtrl>::run (ACE_Time_Value *tv) { - int result = -1; ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { - result = this->orb_->run (tv, ACE_TRY_ENV); + this->orb_->run (tv, ACE_TRY_ENV); ACE_TRY_CHECK; } ACE_CATCHANY @@ -608,7 +607,7 @@ TAO_AV_Child_Process <T_StreamEndpoint_B, T_VDev, T_MediaCtrl>::run (ACE_Time_V return -1; } ACE_ENDTRY; - return result; + return 0; } // release the semaphore the parent is waiting on diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp index 875d7da2adf..b6da4daddc3 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp @@ -184,7 +184,7 @@ Client::Client (void) orb_ (TAO_AV_CORE::instance ()->orb ()), poa_ (TAO_AV_CORE::instance ()->poa ()) { - endpoint_strategy_.init (TAO_AV_CORE::instance ()->orb (), + endpoint_strategy_.init (TAO_AV_CORE::instance ()->orb (), TAO_AV_CORE::instance ()->poa ()); } @@ -342,8 +342,9 @@ Client::run (void) // Schedule a timer for the for the flow handler. ACE_Time_Value tv (10000,0); - if (this->orb_->run (tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + this->orb_->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); ACE_DEBUG ((LM_DEBUG, "Exited the TAO_AV_Core::run\n")); diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp index a9ab12e439d..e1630af76b9 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp @@ -75,25 +75,25 @@ int main (int argc, char *argv[]) { parse_args (argc, argv); - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + PortableServer::POAManager_var mgr = poa->the_POAManager (); - + mgr->activate (); - + TAO_AV_CORE::instance ()->init (orb.in (), poa.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - + // Connect the two streams and run them... AVStreams::flowSpec flow_spec (2); flow_spec.length (2); @@ -151,8 +151,9 @@ int main (int argc, char *argv[]) ACE_TRY_CHECK; ACE_Time_Value tv (0, milliseconds * 1000); - if (orb->run (tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); flow_spec.length (0); diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp index a09e9bb391d..2a1acc40099 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp @@ -94,26 +94,26 @@ int main (int argc, char *argv[]) ACE_TRY_NEW_ENV { parse_args (argc, argv); - - CORBA::ORB_var orb = CORBA::ORB_init (argc, + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + PortableServer::POAManager_var mgr = poa->the_POAManager (); - + mgr->activate (); - + TAO_AV_CORE::instance ()->init (orb.in (), poa.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - + // Register the video mmdevice object with the ORB Reactive_Strategy *reactive_strategy; ACE_NEW_RETURN (reactive_strategy, @@ -174,8 +174,9 @@ int main (int argc, char *argv[]) } ACE_Time_Value tv (120, 0); - if (orb->run (tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); ACE_DEBUG ((LM_DEBUG, "Calibrating scale factory . . . ")); diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp index 3ad29475c6a..c40679df527 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp @@ -109,25 +109,25 @@ int main (int argc, char *argv[]) parse_args (argc, argv); - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + PortableServer::POAManager_var mgr = poa->the_POAManager (); - + mgr->activate (); - + TAO_AV_CORE::instance ()->init (orb.in (), poa.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - + Reactive_Strategy *reactive_strategy; ACE_NEW_RETURN (reactive_strategy, Reactive_Strategy, @@ -186,8 +186,9 @@ int main (int argc, char *argv[]) } ACE_Time_Value tv (120, 0); - if (orb->run (tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); ACE_DEBUG ((LM_DEBUG, "Calibrating scale factory . . . ")); diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp index bae3330e148..f67d26e4dd0 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp @@ -318,8 +318,10 @@ Client::run (void) // Schedule a timer for the for the flow handler. //TAO_AV_CORE::instance ()->run (); ACE_Time_Value tv (10000,0); - if (TAO_AV_CORE::instance ()->orb ()->run (tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + + TAO_AV_CORE::instance ()->orb ()->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); ACE_DEBUG ((LM_DEBUG, "Exited the TAO_AV_Core::run\n")); diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp index 9240f40c757..f8e7523c7cf 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp @@ -187,7 +187,7 @@ Client::Client (void) protocol_ (ACE_OS::strdup ("UDP")) { endpoint_strategy_.init (TAO_AV_CORE::instance ()->orb (), TAO_AV_CORE::instance ()->poa ()); - + } @@ -354,8 +354,9 @@ Client::run (void) //TAO_AV_CORE::instance ()->run (); ACE_Time_Value tv (10000,0); - if (TAO_AV_CORE::instance ()->orb ()->run (tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + TAO_AV_CORE::instance ()->orb ()->run (tv, ACE_TRY_ENV); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); ACE_DEBUG ((LM_DEBUG, "Exited the TAO_AV_Core::run\n")); diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp b/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp index fe2fd519a0d..053bddcf5e4 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp @@ -36,10 +36,10 @@ Server::init (int argc, char** argv, CORBA::Environment& ACE_TRY_ENV) = this->poa_->the_POAManager (); mgr->activate (); - - int result = SERVER_GLOBALS::instance ()->parse_args (argc, + + int result = SERVER_GLOBALS::instance ()->parse_args (argc, argv); - + if (result == -1) ACE_ERROR_RETURN ((LM_ERROR,"parse args failed\n"),-1); @@ -49,7 +49,7 @@ Server::init (int argc, char** argv, CORBA::Environment& ACE_TRY_ENV) " (%P|%t) Unable to initialize " "the TAO_Naming_Client. \n"), -1); - + switch (SERVER_GLOBALS::instance ()->strategy_) { case REACTIVE_STRATEGY: @@ -68,7 +68,7 @@ Server::init (int argc, char** argv, CORBA::Environment& ACE_TRY_ENV) -1); } - + // Register the mmdevice with the naming service. CosNaming::Name server_mmdevice_name (1); server_mmdevice_name.length (1); @@ -132,15 +132,15 @@ main (int argc, char **argv) //TAO_debug_level++; - CORBA::ORB_var orb = CORBA::ORB_init (argc, + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - + PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); - + Server server (orb.in (), poa.in ()); ACE_DECLARE_NEW_CORBA_ENV; @@ -149,7 +149,7 @@ main (int argc, char **argv) if (server.init (argc, argv, ACE_TRY_ENV) == -1) return 1; - + server.run (ACE_TRY_ENV); ACE_TRY_CHECK; } diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp index af62cfd60bc..180aa0fd098 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp @@ -439,8 +439,8 @@ Test_ECG::run (int argc, char* argv[]) if (this->rmt_name_ != 0) { - if (orb->run (&tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (&tv, ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_DEBUG ((LM_DEBUG, "starting....\n")); @@ -472,8 +472,8 @@ Test_ECG::run (int argc, char* argv[]) if (this->rmt_name_ != 0) { tv.set (5, 0); - if (orb->run (&tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (&tv, ACE_TRY_ENV); + ACE_TRY_CHECK; RtecEventChannelAdmin::EventChannel_var remote_ec = this->get_ec (naming_context.in (), @@ -508,8 +508,8 @@ Test_ECG::run (int argc, char* argv[]) ACE_DEBUG ((LM_DEBUG, "connected proxy\n")); tv.set (5, 0); - if (orb->run (&tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (&tv, ACE_TRY_ENV); + ACE_TRY_CHECK; RtecEventChannelAdmin::Observer_ptr observer = this->ecg_._this (ACE_TRY_ENV); @@ -560,8 +560,8 @@ Test_ECG::run (int argc, char* argv[]) ec_impl.activate (); ACE_DEBUG ((LM_DEBUG, "running the test\n")); - if (orb->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; this->test_stop_ = ACE_OS::gethrtime (); @@ -630,9 +630,8 @@ Test_ECG::run (int argc, char* argv[]) ACE_DEBUG ((LM_DEBUG, "shutdown grace period\n")); tv.set (5, 0); - if (orb->run (&tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1); - + orb->run (&tv, ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCH (CORBA::SystemException, sys_ex) { diff --git a/TAO/orbsvcs/tests/Event/Performance/Latency.cpp b/TAO/orbsvcs/tests/Event/Performance/Latency.cpp index 37fab174375..d648dde8dba 100644 --- a/TAO/orbsvcs/tests/Event/Performance/Latency.cpp +++ b/TAO/orbsvcs/tests/Event/Performance/Latency.cpp @@ -2,6 +2,7 @@ #include "Latency.h" #include "orbsvcs/Event_Service_Constants.h" +#include "tao/Strategies/advanced_resource.h" #include "tao/PortableServer/PortableServer.h" #include "ace/High_Res_Timer.h" #include "ace/Get_Opt.h" @@ -49,7 +50,7 @@ main (int argc, char *argv []) CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); ACE_TRY_CHECK; -#if (TAO_HAS_MESSAGING == 1) +#if (TAO_HAS_CORBA_MESSAGING == 1) CORBA::Object_var manager_object = orb->resolve_initial_references ("ORBPolicyManager", ACE_TRY_ENV); @@ -198,20 +199,24 @@ main (int argc, char *argv []) task.activate (); + ACE_hrtime_t start = ACE_OS::gethrtime (); while (!task.done () || !consumer.done ()) { - ACE_Time_Value tv (10, 0); //0, 10000); + ACE_Time_Value tv (1, 0); orb->run (tv, ACE_TRY_ENV); ACE_TRY_CHECK; } + ACE_hrtime_t end = ACE_OS::gethrtime (); ACE_Thread_Manager::instance ()->wait (); // Calibrate the high resolution timer *before* starting the // test. + ACE_DEBUG ((LM_DEBUG, "Calibrating high res timer ....")); ACE_High_Res_Timer::calibrate (); ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + ACE_DEBUG ((LM_DEBUG, "Done (%d)\n", gsf)); if (do_dump_history) { history.dump_samples ("HISTORY", gsf); @@ -221,6 +226,14 @@ main (int argc, char *argv []) history.collect_basic_stats (stats); stats.dump_results ("Latency", gsf); + ACE_hrtime_t elapsed_microseconds = (end - start) / gsf; + double elapsed_seconds = + ACE_CU64_TO_CU32(elapsed_microseconds) / 1000000.0; + double throughput = + double(iterations) / elapsed_seconds; + + ACE_DEBUG ((LM_DEBUG, "Throughtput: %f\n", throughput)); + proxy_supplier->disconnect_push_supplier (ACE_TRY_ENV); ACE_TRY_CHECK; @@ -316,6 +329,12 @@ EC_Latency_Consumer::push (const RtecEventComm::EventSet& events, ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, *this->mutex_); this->history_->sample (now - creation); + if (this->remaining_messages_ % 1000 == 0) + { + ACE_DEBUG ((LM_DEBUG, "Only %d messages to go\n", + this->remaining_messages_)); + } + this->remaining_messages_--; } @@ -363,6 +382,7 @@ Task::svc (void) event[0].header.type = ACE_ES_EVENT_UNDEFINED; event[0].header.source = 1; event[0].header.ttl = 1; + event[0].data.payload.length(1024); for (;;) { diff --git a/TAO/orbsvcs/tests/Event/Performance/Latency_Server.cpp b/TAO/orbsvcs/tests/Event/Performance/Latency_Server.cpp index 75d52d49b09..97c4ab93952 100644 --- a/TAO/orbsvcs/tests/Event/Performance/Latency_Server.cpp +++ b/TAO/orbsvcs/tests/Event/Performance/Latency_Server.cpp @@ -2,6 +2,7 @@ #include "orbsvcs/Event/EC_Event_Channel.h" #include "orbsvcs/Event/EC_Default_Factory.h" +#include "tao/Strategies/advanced_resource.h" #include "tao/PortableServer/PortableServer.h" #include "ace/High_Res_Timer.h" #include "ace/Get_Opt.h" @@ -48,7 +49,7 @@ main (int argc, char *argv []) CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); ACE_TRY_CHECK; -#if (TAO_HAS_MESSAGING == 1) +#if (TAO_HAS_CORBA_MESSAGING == 1) CORBA::Object_var manager_object = orb->resolve_initial_references ("ORBPolicyManager", ACE_TRY_ENV); diff --git a/TAO/orbsvcs/tests/Event/Performance/Makefile b/TAO/orbsvcs/tests/Event/Performance/Makefile index 050e5c64ff9..2c0da6ddf45 100644 --- a/TAO/orbsvcs/tests/Event/Performance/Makefile +++ b/TAO/orbsvcs/tests/Event/Performance/Makefile @@ -19,7 +19,7 @@ BIN2 = Throughput \ Latency_Server PSRC=$(addsuffix .cpp,$(BIN2)) -LDLIBS = -lECTests -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_PortableServer -lTAO +LDLIBS = -lECTests -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_PortableServer -lTAO_Strategies -lTAO CPPFLAGS += -I../lib -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs \ $(foreach svc, $(TAO_ORBSVCS), -DTAO_ORBSVCS_HAS_$(svc)) diff --git a/TAO/orbsvcs/tests/FaultTolerance/IOGR/Manager.cpp b/TAO/orbsvcs/tests/FaultTolerance/IOGR/Manager.cpp index 943dc098c7a..1f52b861e36 100644 --- a/TAO/orbsvcs/tests/FaultTolerance/IOGR/Manager.cpp +++ b/TAO/orbsvcs/tests/FaultTolerance/IOGR/Manager.cpp @@ -239,10 +239,18 @@ Manager::set_properties (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); + ACE_TRY + { + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Error in run \n"), + -1); + } + ACE_ENDTRY; return 0; } diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_client.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_client.cpp index 6d386d2de1e..093f745386c 100644 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_client.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/airplane_client.cpp @@ -18,4 +18,3 @@ main (int argc, char **argv) else return client.run (); } - diff --git a/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp b/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp index 5a22f6d9285..4b9708cc0e2 100644 --- a/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/airplane_server.cpp @@ -10,7 +10,7 @@ main (int argc, char *argv[]) Airplane_Server_i server; ACE_DEBUG ((LM_DEBUG, "\n\tPaper Airplane Server\n\n")); - + ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp index 753562725ee..f7660f13d30 100644 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.cpp @@ -232,16 +232,16 @@ Nestea_Server_i::run (CORBA::Environment &ACE_TRY_ENV) ACE_TRY { - status = this->orb_->run (ACE_TRY_ENV); + this->orb_->run (ACE_TRY_ENV); ACE_TRY_CHECK; } ACE_CATCHANY { + status = -1; ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Nestea_i::run"); ACE_RE_THROW; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return status; diff --git a/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/server.cpp b/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/server.cpp index 915e3c77336..30297fcc6c6 100644 --- a/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/server.cpp +++ b/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/server.cpp @@ -14,7 +14,7 @@ write_ior_to_file (const char *ior) if (output_file == 0) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output files for writing IOR: %s\n", ior_output_file), -1); @@ -42,9 +42,9 @@ main (int argc, char *argv[]) { ACE_TRY_NEW_ENV { - CORBA::ORB_var orb = CORBA::ORB_init (argc, - argv, - "", + CORBA::ORB_var orb = CORBA::ORB_init (argc, + argv, + "", ACE_TRY_ENV); ACE_TRY_CHECK; @@ -52,7 +52,7 @@ main (int argc, char *argv[]) orb->resolve_initial_references ("RootPOA"); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), + PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); ACE_TRY_CHECK; @@ -65,12 +65,12 @@ main (int argc, char *argv[]) inventory_i servant_impl; - warehouse::inventory_var servant = + warehouse::inventory_var servant = servant_impl._this (ACE_TRY_ENV); ACE_TRY_CHECK; CORBA::String_var ior = - orb->object_to_string (servant.in (), + orb->object_to_string (servant.in (), ACE_TRY_ENV); ACE_TRY_CHECK; @@ -78,9 +78,9 @@ main (int argc, char *argv[]) if (write_result != 0) { - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "write_ior_to_file"), + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "write_ior_to_file"), -1); } @@ -88,13 +88,8 @@ main (int argc, char *argv[]) "IOR is: <%s>\n", ior.in ())); - if (orb->run () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "CORBA::ORB::run"), - -1); - } + orb->run (ACE_TRY_ENV); + ACE_TRY_CHECK; root_poa->destroy (1, 1, @@ -111,4 +106,3 @@ main (int argc, char *argv[]) return 0; } - diff --git a/TAO/orbsvcs/tests/ior_corbaname/server.cpp b/TAO/orbsvcs/tests/ior_corbaname/server.cpp index 7c10797802d..46bbdf3ee08 100644 --- a/TAO/orbsvcs/tests/ior_corbaname/server.cpp +++ b/TAO/orbsvcs/tests/ior_corbaname/server.cpp @@ -39,7 +39,7 @@ int main (int argc, char* argv[]) corbaname_Status_i status_i; // Activate it to obtain the reference - corbaname::Status_var status = + corbaname::Status_var status = status_i._this (); // Get a reference to Naming Context @@ -58,7 +58,7 @@ int main (int argc, char* argv[]) name.length (1); name[0].id = CORBA::string_dup ("STATUS"); - naming_context->bind (name, + naming_context->bind (name, status.in (), ACE_TRY_ENV); ACE_TRY_CHECK; @@ -72,12 +72,12 @@ int main (int argc, char* argv[]) orb->destroy (); } - ACE_CATCH (CORBA::SystemException, ex) + ACE_CATCH (CORBA::SystemException, ex) { ACE_PRINT_EXCEPTION (ex, "CORBA exception raised in server!"); } ACE_ENDTRY; ACE_CHECK_RETURN (-1); - + return 0; } diff --git a/TAO/performance-tests/Callback/Callback_i.cpp b/TAO/performance-tests/Callback/Callback_i.cpp index 4fb59c1d299..0b632dd0ac2 100644 --- a/TAO/performance-tests/Callback/Callback_i.cpp +++ b/TAO/performance-tests/Callback/Callback_i.cpp @@ -17,6 +17,7 @@ Callback_i::done (void) void Callback_i::response (Test::TimeStamp time_stamp, + const Test::Payload &, CORBA::Environment &) ACE_THROW_SPEC (()) { @@ -24,6 +25,12 @@ Callback_i::response (Test::TimeStamp time_stamp, ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); if (this->remaining_samples_ == 0) return; + + if (this->remaining_samples_ % 1000 == 0) + { + ACE_DEBUG ((LM_DEBUG, "Only %d messages to go\n", + this->remaining_samples_)); + } this->remaining_samples_--; this->history_.sample (now - time_stamp); } diff --git a/TAO/performance-tests/Callback/Callback_i.h b/TAO/performance-tests/Callback/Callback_i.h index e66d1969d98..5561ada4901 100644 --- a/TAO/performance-tests/Callback/Callback_i.h +++ b/TAO/performance-tests/Callback/Callback_i.h @@ -22,6 +22,7 @@ public: /// Implement the CORBA methods //@{ void response (Test::TimeStamp, + const Test::Payload &, CORBA::Environment &) ACE_THROW_SPEC (()); //@} diff --git a/TAO/performance-tests/Callback/Server_i.cpp b/TAO/performance-tests/Callback/Server_i.cpp index 4288955318b..8821be546eb 100644 --- a/TAO/performance-tests/Callback/Server_i.cpp +++ b/TAO/performance-tests/Callback/Server_i.cpp @@ -18,12 +18,13 @@ Server_i::set_callback (Test::Callback_ptr callback, void Server_i::request (Test::TimeStamp time_stamp, + const Test::Payload &payload, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { if (!CORBA::is_nil (this->callback_.in ())) { - this->callback_->response (time_stamp, ACE_TRY_ENV); + this->callback_->response (time_stamp, payload, ACE_TRY_ENV); } } diff --git a/TAO/performance-tests/Callback/Server_i.h b/TAO/performance-tests/Callback/Server_i.h index 87cd2126d2f..fca9406d808 100644 --- a/TAO/performance-tests/Callback/Server_i.h +++ b/TAO/performance-tests/Callback/Server_i.h @@ -22,6 +22,7 @@ public: ACE_THROW_SPEC (()); void request (Test::TimeStamp, + const Test::Payload &, CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)); diff --git a/TAO/performance-tests/Callback/callback.idl b/TAO/performance-tests/Callback/callback.idl index 7f3a14d4393..7ac2851dc01 100644 --- a/TAO/performance-tests/Callback/callback.idl +++ b/TAO/performance-tests/Callback/callback.idl @@ -9,9 +9,13 @@ module Test { /// we stick the native high resolution timer value there. typedef unsigned long long TimeStamp; + /// Simulated + typedef sequence<octet> Payload; + /// Define the callback interface interface Callback { - oneway void response (in TimeStamp time_stamp); + oneway void response (in TimeStamp time_stamp, + in Payload message_payload); }; /// Define the server interface @@ -22,7 +26,8 @@ module Test { /// Send a request, the Callback::response method is invoked with /// the @param time_stamp value - oneway void request (in TimeStamp time_stamp); + oneway void request (in TimeStamp time_stamp, + in Payload message_payload); /// Shutdown the server, just to make cleanup simpler. oneway void shutdown (); diff --git a/TAO/performance-tests/Callback/client.cpp b/TAO/performance-tests/Callback/client.cpp index 05f06814964..7fa2f0bbf5c 100644 --- a/TAO/performance-tests/Callback/client.cpp +++ b/TAO/performance-tests/Callback/client.cpp @@ -149,20 +149,25 @@ main (int argc, char *argv []) Task task (server.in (), iterations); task.activate (); + ACE_hrtime_t start = ACE_OS::gethrtime (); while (!callback_i.done () || !task.done ()) { ACE_Time_Value tv (1, 0); orb->run (tv, ACE_TRY_ENV); ACE_TRY_CHECK; } + ACE_hrtime_t end = ACE_OS::gethrtime (); ACE_Thread_Manager::instance ()->wait (); // Calibrate the high resolution timer *before* starting the // test. + ACE_DEBUG ((LM_DEBUG, "Calibrating high res timer ....")); ACE_High_Res_Timer::calibrate (); ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + ACE_DEBUG ((LM_DEBUG, "Done (%d)\n", gsf)); + ACE_Sample_History &history = callback_i.sample_history (); if (do_dump_history) @@ -174,12 +179,19 @@ main (int argc, char *argv []) history.collect_basic_stats (stats); stats.dump_results ("Latency", gsf); + ACE_hrtime_t elapsed_microseconds = (end - start) / gsf; + double elapsed_seconds = + ACE_CU64_TO_CU32(elapsed_microseconds) / 1000000.0; + double throughput = + double(iterations) / elapsed_seconds; + + ACE_DEBUG ((LM_DEBUG, "Throughtput: %f\n", throughput)); + server->shutdown (ACE_TRY_ENV); ACE_TRY_CHECK; - PortableServer::ObjectId_var id; - - id = root_poa->servant_to_id (&callback_i, ACE_TRY_ENV); + PortableServer::ObjectId_var id = + root_poa->servant_to_id (&callback_i, ACE_TRY_ENV); ACE_TRY_CHECK; root_poa->deactivate_object (id.in (), ACE_TRY_ENV); ACE_TRY_CHECK; @@ -251,12 +263,13 @@ Task::done (void) int Task::svc (void) { + Test::Payload payload(1024); payload.length(1024); ACE_TRY_NEW_ENV { for (;;) { Test::TimeStamp creation = ACE_OS::gethrtime (); - this->server_->request (creation, ACE_TRY_ENV); + this->server_->request (creation, payload, ACE_TRY_ENV); ACE_TRY_CHECK; // ACE_Time_Value tv (0, 5000); diff --git a/TAO/performance-tests/Latency/client.conf b/TAO/performance-tests/Latency/client.conf index 1396ec82df2..0aab8b992f6 100644 --- a/TAO/performance-tests/Latency/client.conf +++ b/TAO/performance-tests/Latency/client.conf @@ -1,4 +1,4 @@ # $Id$ # static Advanced_Resource_Factory "-ORBReactorType select_mt" -static Client_Strategy_Factory "-ORBclientconnectionhandler RW" +#static Client_Strategy_Factory "-ORBclientconnectionhandler LF" diff --git a/TAO/performance-tests/Latency/st_client.conf b/TAO/performance-tests/Latency/st_client.conf index 974da8731c6..29bbabbaf61 100644 --- a/TAO/performance-tests/Latency/st_client.conf +++ b/TAO/performance-tests/Latency/st_client.conf @@ -4,4 +4,5 @@ # static Advanced_Resource_Factory "-ORBresources global -ORBInputCDRAllocator null -ORBReactorType select_st" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW -ORBConnectorLock null" +static Client_Strategy_Factory "-ORBProfileLock null -ORBConnectorLock null" +# -ORBClientConnectionHandler RW diff --git a/TAO/performance-tests/POA/Demux/demux_test_server.cpp b/TAO/performance-tests/POA/Demux/demux_test_server.cpp index 303ccb4fb73..b9f3e59ce4d 100644 --- a/TAO/performance-tests/POA/Demux/demux_test_server.cpp +++ b/TAO/performance-tests/POA/Demux/demux_test_server.cpp @@ -471,13 +471,7 @@ Demux_Test_Server::run (CORBA::Environment &ACE_TRY_ENV) { ACE_TRY { - if (this->orb_->run (ACE_TRY_ENV) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) Demux_Test_Server::run - " - "orb run failed\n"), - -1); - } + this->orb_->run (ACE_TRY_ENV); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/performance-tests/RTCorba/Oneways/Reliable/server.cpp b/TAO/performance-tests/RTCorba/Oneways/Reliable/server.cpp index ed8013a7a6f..a3679dfd5b6 100644 --- a/TAO/performance-tests/RTCorba/Oneways/Reliable/server.cpp +++ b/TAO/performance-tests/RTCorba/Oneways/Reliable/server.cpp @@ -72,7 +72,7 @@ set_rt_mode (void) ACE_ERROR ((LM_ERROR, "server (%P|%t):thr_setprio failed %p\n", "set_rt_mode")); - + // Do a sanity check. if (ACE_OS::thr_getprio (self, priority) == 0) ACE_DEBUG ((LM_DEBUG, @@ -151,11 +151,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/performance-tests/Thruput/TAO/server.cpp b/TAO/performance-tests/Thruput/TAO/server.cpp index 7c7fa6ba0c5..e85995bca84 100644 --- a/TAO/performance-tests/Thruput/TAO/server.cpp +++ b/TAO/performance-tests/Thruput/TAO/server.cpp @@ -193,8 +193,8 @@ main (int argc, char **argv) // Handle requests for this object until we're killed, or one of the // methods asks us to exit. - if (orb_var->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); + orb_var->run (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 64f1ae6e359..3f6fe0ea2ac 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -227,41 +227,41 @@ CORBA_ORB::destroy (CORBA::Environment &ACE_TRY_ENV) this->orb_core_ = 0; } -int +void CORBA_ORB::run (CORBA::Environment &ACE_TRY_ENV) { - return this->run (0, ACE_TRY_ENV); + this->run (0, ACE_TRY_ENV); } -int +void CORBA_ORB::run (ACE_Time_Value &tv, CORBA::Environment &ACE_TRY_ENV) { - return this->run (&tv, ACE_TRY_ENV); + this->run (&tv, ACE_TRY_ENV); } -int +void CORBA_ORB::run (ACE_Time_Value *tv, CORBA::Environment &ACE_TRY_ENV) { this->check_shutdown (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - return this->orb_core ()->run (tv, 0, ACE_TRY_ENV); + this->orb_core ()->run (tv, 0, ACE_TRY_ENV); } -int +void CORBA_ORB::perform_work (CORBA::Environment &ACE_TRY_ENV) { - return this->perform_work (0, ACE_TRY_ENV); + this->perform_work (0, ACE_TRY_ENV); } -int +void CORBA_ORB::perform_work (ACE_Time_Value &tv, CORBA::Environment &ACE_TRY_ENV) { - return this->perform_work (&tv, ACE_TRY_ENV); + this->perform_work (&tv, ACE_TRY_ENV); } -int +void CORBA_ORB::perform_work (ACE_Time_Value *tv, CORBA::Environment &ACE_TRY_ENV) { @@ -269,7 +269,7 @@ CORBA_ORB::perform_work (ACE_Time_Value *tv, this->check_shutdown (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - return this->orb_core ()->run (tv, 1, ACE_TRY_ENV); + this->orb_core ()->run (tv, 1, ACE_TRY_ENV); } CORBA::Boolean diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h index 85f8cdb68ad..10146675c14 100644 --- a/TAO/tao/ORB.h +++ b/TAO/tao/ORB.h @@ -222,7 +222,7 @@ public: * If an error occurs during initialization or a run-time this * method will return -1. */ - int run (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + void run (CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); /** * Instructs the ORB to initialize itself and run its event loop in @@ -234,8 +234,8 @@ public: * we've returned since we've been asked to shut down the value of 1 * is returned. */ - int run (ACE_Time_Value &tv, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + void run (ACE_Time_Value &tv, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); /** * Instructs the ORB to initialize itself and run its event loop in @@ -247,8 +247,8 @@ public: * Otherwise, if we've returned since we've been asked to shut down * the value of 1 is returned. */ - int run (ACE_Time_Value *tv, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + void run (ACE_Time_Value *tv, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); /// Returns an indication of whether the ORB needs to perform some /// work. @@ -261,14 +261,14 @@ public: * behavior can be modified by passing an appropriate * <ACE_Time_Value>. */ - int perform_work (CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - int perform_work (ACE_Time_Value &, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); - int perform_work (ACE_Time_Value *, - CORBA_Environment &ACE_TRY_ENV = - TAO_default_environment ()); + void perform_work (CORBA_Environment &ACE_TRY_ENV = + TAO_default_environment ()); + void perform_work (ACE_Time_Value &, + CORBA_Environment &ACE_TRY_ENV = + TAO_default_environment ()); + void perform_work (ACE_Time_Value *, + CORBA_Environment &ACE_TRY_ENV = + TAO_default_environment ()); /** * This operation instructs the ORB to shut down. Shutting down the diff --git a/TAO/tao/PortableServer/ORB_Manager.cpp b/TAO/tao/PortableServer/ORB_Manager.cpp index 090ab78e4fd..8c1dcbad4a2 100644 --- a/TAO/tao/PortableServer/ORB_Manager.cpp +++ b/TAO/tao/PortableServer/ORB_Manager.cpp @@ -273,14 +273,9 @@ TAO_ORB_Manager::run (CORBA_Environment &ACE_TRY_ENV, this->poa_manager_->activate (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - int status = this->orb_->run (tv, ACE_TRY_ENV); + this->orb_->run (tv, ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - if (status == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), - ACE_TEXT ("run")), - -1); return 0; } @@ -291,14 +286,9 @@ TAO_ORB_Manager::run (ACE_Time_Value &tv, this->poa_manager_->activate (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - int status = this->orb_->run (tv, ACE_TRY_ENV); + this->orb_->run (tv, ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - if (status == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), - ACE_TEXT ("run")), - -1); return 0; } @@ -323,14 +313,9 @@ TAO_ORB_Manager::run (CORBA_Environment &ACE_TRY_ENV) this->poa_manager_->activate (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - int status = this->orb_->run (ACE_TRY_ENV); + this->orb_->run (ACE_TRY_ENV); ACE_CHECK_RETURN (-1); - if (status == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) TAO_ORB_Manager %p\n"), - ACE_TEXT ("run")), - -1); return 0; } 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; |