diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-24 15:39:09 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-24 15:39:09 +0000 |
commit | c801f87e59c00f72bdeb5ce7bd0d276674665bac (patch) | |
tree | 70bff03d1cf156ecf05ee4c5c338d8ce423e64ee /TAO/tests/Smart_Proxies | |
parent | 98c0b37d4714ff774fc3ada8c9ee893c719af714 (diff) | |
download | ATCD-c801f87e59c00f72bdeb5ce7bd0d276674665bac.tar.gz |
Wed Jan 24 14:00:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tests/Smart_Proxies')
21 files changed, 80 insertions, 188 deletions
diff --git a/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.cpp index 949c299e773..766e16bd8bd 100644 --- a/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.cpp +++ b/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.cpp @@ -28,13 +28,12 @@ Smart_Test_Proxy::Smart_Test_Proxy (Test_ptr proxy) } CORBA::Short -Smart_Test_Proxy::box_prices (ACE_ENV_SINGLE_ARG_DECL) +Smart_Test_Proxy::box_prices (void) ACE_THROW_SPEC ((CORBA::SystemException)) { if (this->price_ == 0) { - this->price_ = TAO_Test_Smart_Proxy_Base::box_prices (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->price_ = TAO_Test_Smart_Proxy_Base::box_prices (); } return this->price_; } diff --git a/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.h b/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.h index b3ac7e0c5d9..a9702e0cc56 100644 --- a/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.h +++ b/TAO/tests/Smart_Proxies/Benchmark/Smart_Proxy_Impl.h @@ -17,7 +17,7 @@ class Smart_Test_Proxy : public virtual TAO_Test_Smart_Proxy_Base public: Smart_Test_Proxy (Test_ptr proxy); - virtual CORBA::Short box_prices(ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + virtual CORBA::Short box_prices(void) ACE_THROW_SPEC ((CORBA::SystemException)); // "Smartify" the method call! diff --git a/TAO/tests/Smart_Proxies/Benchmark/client.cpp b/TAO/tests/Smart_Proxies/Benchmark/client.cpp index 34732cdac90..6a61bacafdb 100644 --- a/TAO/tests/Smart_Proxies/Benchmark/client.cpp +++ b/TAO/tests/Smart_Proxies/Benchmark/client.cpp @@ -124,7 +124,6 @@ main (int argc, char *argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; @@ -132,7 +131,6 @@ main (int argc, char *argv[]) CORBA::Object_var object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (register_smart_proxy == 1) { // To use the smart proxy it is necessary to allocate the @@ -154,7 +152,6 @@ main (int argc, char *argv[]) Test_var server = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (server.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -177,8 +174,7 @@ main (int argc, char *argv[]) // Record current time. ACE_hrtime_t latency_base = ACE_OS::gethrtime (); - price = server->box_prices (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + price = server->box_prices (); if (price < 300) cost = server->tickets (5); @@ -190,21 +186,18 @@ main (int argc, char *argv[]) marker.sample (now - throughput_base, now - latency_base); - ACE_TRY_CHECK; if (TAO_debug_level > 0 && i % 100 == 0) ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i)); } marker.dump_stats ("buying tickets ", gsf); - server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + server->shutdown (); /* Test_var server1 = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (server1.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -227,8 +220,7 @@ main (int argc, char *argv[]) // Record current time. ACE_hrtime_t latency_base = ACE_OS::gethrtime (); - price1 = server1->box_prices (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + price1 = server1->box_prices (); if (price1 < 300) cost = server1->tickets (5); @@ -240,15 +232,13 @@ main (int argc, char *argv[]) marker.sample (now - throughput_base1, now - latency_base); - ACE_TRY_CHECK; if (TAO_debug_level > 0 && i % 100 == 0) ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i)); } marker1.dump_stats ("buying tickets using a default proxy ", gsf1); - server1->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + server1->shutdown (); */ } ACE_CATCHANY diff --git a/TAO/tests/Smart_Proxies/Benchmark/server.cpp b/TAO/tests/Smart_Proxies/Benchmark/server.cpp index ca2acbcbec2..e16d114222e 100644 --- a/TAO/tests/Smart_Proxies/Benchmark/server.cpp +++ b/TAO/tests/Smart_Proxies/Benchmark/server.cpp @@ -29,14 +29,14 @@ class Test_i : public POA_Test public: Test_i (CORBA::ORB_ptr orb); - CORBA::Short box_prices (ACE_ENV_SINGLE_ARG_DECL) + CORBA::Short box_prices (void) ACE_THROW_SPEC ((CORBA::SystemException)); CORBA::Long tickets (CORBA::Short number ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - void shutdown (ACE_ENV_SINGLE_ARG_DECL) + void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); private: @@ -50,7 +50,7 @@ Test_i::Test_i (CORBA::ORB_ptr orb) } CORBA::Short -Test_i::box_prices (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Test_i::box_prices (void) ACE_THROW_SPEC ((CORBA::SystemException)) { return 125; @@ -65,7 +65,7 @@ Test_i::tickets (CORBA::Short number } void -Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL) +Test_i::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); @@ -112,34 +112,28 @@ main (int argc, char *argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Test_i servant (orb.in ()); // Obtain RootPOA. CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var root_poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POAManager of the RootPOA. PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); Test_var Test_object = - servant._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + servant._this (); CORBA::String_var ior = orb->object_to_string (Test_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) @@ -159,11 +153,9 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); @@ -171,7 +163,6 @@ main (int argc, char *argv[]) root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp b/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp index fce6e571c50..2442eee0e51 100644 --- a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp +++ b/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp @@ -26,7 +26,6 @@ Collocation_Test::init (int argc, char *argv[] ACE_ENV_ARG_DECL) { // Initialize the ORB. this->orb_ = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); int result = this->parse_args (argc, argv); if (result != 0) @@ -35,52 +34,42 @@ Collocation_Test::init (int argc, char *argv[] ACE_ENV_ARG_DECL) // Get an Object reference to RootPOA. CORBA::Object_var obj = this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Narrow the Object reference to a POA reference this->root_poa_ = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Get the POAManager of RootPOA this->poa_manager_ = - this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->root_poa_->the_POAManager (); // Activate the diamond servant and its base classes under RootPOA. PortableServer::ObjectId_var id = this->root_poa_->activate_object (&this->top_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // // We only care about the most derived class here. -// this->diamond_obj_ = this->diamond_servant_._this (ACE_ENV_SINGLE_ARG_PARAMETER); -// ACE_CHECK_RETURN (-1); +// this->diamond_obj_ = this->diamond_servant_._this (); id = this->root_poa_->activate_object (&this->diamond_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // We only care about the most derived class here. this->diamond_obj_ = this->root_poa_->id_to_reference (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); id = this->root_poa_->activate_object (&this->left_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); id = this->root_poa_->activate_object (&this->right_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); CORBA::String_var str = this->orb_->object_to_string (this->diamond_obj_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); ACE_DEBUG ((LM_DEBUG, "Diamond Servant activated:\n %s\n", str.in())); @@ -99,7 +88,7 @@ Collocation_Test::parse_args (int argc, char *argv[]) } int -Collocation_Test::test_narrow (ACE_ENV_SINGLE_ARG_DECL) +Collocation_Test::test_narrow (void) { // Ensure that the smart proxy is the one which is used by registering // the user-defined factory. Its necessary to create one on the heap so @@ -111,47 +100,37 @@ Collocation_Test::test_narrow (ACE_ENV_SINGLE_ARG_DECL) Diamond::Top_var top = Diamond::Top::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); Diamond::Left_var left = Diamond::Left::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); Diamond::Right_var right = Diamond::Right::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); Diamond::Buttom_var buttom = Diamond::Buttom::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - CORBA::String_var str = top->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + CORBA::String_var str = top->shape (); ACE_DEBUG ((LM_DEBUG, "Calling top->shape: %s\n", str.in ())); - str = left->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + str = left->shape (); ACE_DEBUG ((LM_DEBUG, "Calling left->shape: %s\n", str.in ())); - str = right->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + str = right->shape (); ACE_DEBUG ((LM_DEBUG, "Calling right->shape: %s\n", str.in ())); - str = buttom->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + str = buttom->shape (); ACE_DEBUG ((LM_DEBUG, "Calling buttom->shape: %s\n", str.in ())); return 0; } int -Collocation_Test::run (ACE_ENV_SINGLE_ARG_DECL) +Collocation_Test::run (void) { - this->poa_manager_->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->poa_manager_->activate (); - this->test_narrow (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->test_narrow (); return 0; } diff --git a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.h b/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.h index 9e91a8f045b..af950ec9cec 100644 --- a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.h +++ b/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.h @@ -34,11 +34,11 @@ public: int parse_args (int argc, char *argv[]); // Parse the test specific arguments. - int test_narrow (ACE_ENV_SINGLE_ARG_DECL_NOT_USED); + int test_narrow (void); // This test narrow an object reference to its base class and see // if it works correctly. - int run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED); + int run (void); // Run the test. private: diff --git a/TAO/tests/Smart_Proxies/Collocation/Diamond_i.cpp b/TAO/tests/Smart_Proxies/Collocation/Diamond_i.cpp index f94a35d2c4b..1aed52ccf2f 100644 --- a/TAO/tests/Smart_Proxies/Collocation/Diamond_i.cpp +++ b/TAO/tests/Smart_Proxies/Collocation/Diamond_i.cpp @@ -13,7 +13,7 @@ Top_i::~Top_i () } char * -Top_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Top_i::shape (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -32,7 +32,7 @@ Left_i::~Left_i () } char * -Left_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Left_i::shape (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -41,7 +41,7 @@ Left_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } char * -Left_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Left_i::color (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -60,7 +60,7 @@ Right_i::~Right_i () } char * -Right_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Right_i::shape (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -69,7 +69,7 @@ Right_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } char * -Right_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Right_i::color (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -79,7 +79,7 @@ Right_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } CORBA::Long -Right_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Right_i::width (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -98,7 +98,7 @@ Buttom_i::~Buttom_i () } char * -Buttom_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Buttom_i::shape (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -107,7 +107,7 @@ Buttom_i::shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } char * -Buttom_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Buttom_i::color (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -116,7 +116,7 @@ Buttom_i::color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } CORBA::Long -Buttom_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Buttom_i::width (void) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -125,7 +125,7 @@ Buttom_i::width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } char * -Buttom_i::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Buttom_i::name (void) ACE_THROW_SPEC (( CORBA::SystemException )) diff --git a/TAO/tests/Smart_Proxies/Collocation/Diamond_i.h b/TAO/tests/Smart_Proxies/Collocation/Diamond_i.h index 853f34ff03d..6200a2ec1d3 100644 --- a/TAO/tests/Smart_Proxies/Collocation/Diamond_i.h +++ b/TAO/tests/Smart_Proxies/Collocation/Diamond_i.h @@ -17,7 +17,7 @@ public: ~Top_i (void); // Ctor and dtor. - virtual char* shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual char* shape (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the shape of this object (interface.) }; @@ -29,11 +29,11 @@ public: ~Left_i (void); // Ctor, dtor. - virtual char * shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual char * shape (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the shape of this object (interface.) - virtual char * color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual char * color (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the color of this object (interface.) }; @@ -45,15 +45,15 @@ public: ~Right_i (void); // Ctor, dtor. - virtual char * shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual char * shape (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the shape of this object (interface.) - virtual char * color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual char * color (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the color of this object (interface.) - virtual CORBA::Long width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual CORBA::Long width (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the width of the stuff. }; @@ -65,19 +65,19 @@ public: ~Buttom_i (void); // Ctor, dtor. - virtual char * shape (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual char * shape (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the shape of this object (interface.) - virtual char * color (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual char * color (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the color of this object (interface.) - virtual CORBA::Long width (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual CORBA::Long width (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the width of the stuff. - virtual char * name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual char * name (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Return the name of the object. }; diff --git a/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.cpp index 8de0a3ed17d..d8d6d3aa4bc 100644 --- a/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.cpp +++ b/TAO/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.cpp @@ -46,7 +46,6 @@ Smart_Diamond_Top_Proxy::shape ( ACE_ENV_SINGLE_ARG_DECL) ACE_ENV_SINGLE_ARG_PARAMETER ) ); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "%s\n", ans)); } diff --git a/TAO/tests/Smart_Proxies/Collocation/main.cpp b/TAO/tests/Smart_Proxies/Collocation/main.cpp index dff11cb451f..0494c5f5b7a 100644 --- a/TAO/tests/Smart_Proxies/Collocation/main.cpp +++ b/TAO/tests/Smart_Proxies/Collocation/main.cpp @@ -12,10 +12,8 @@ int main (int argc, char *argv[]) ACE_TRY_NEW_ENV { coll_test.init (argc, argv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - coll_test.run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + coll_test.run (); } ACE_CATCHANY { diff --git a/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.cpp index 62e5232517a..569ec789b91 100644 --- a/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.cpp +++ b/TAO/tests/Smart_Proxies/On_Demand/Smart_Proxy_Impl.cpp @@ -20,7 +20,6 @@ Smart_Test_Proxy::method (CORBA::Short boo { retval = TAO_Test_Smart_Proxy_Base::method (boo ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCH (Test::Oops, reason) { diff --git a/TAO/tests/Smart_Proxies/On_Demand/client.cpp b/TAO/tests/Smart_Proxies/On_Demand/client.cpp index 2ba4e74ca80..1f69262842d 100644 --- a/TAO/tests/Smart_Proxies/On_Demand/client.cpp +++ b/TAO/tests/Smart_Proxies/On_Demand/client.cpp @@ -60,7 +60,6 @@ main (int argc, char *argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; @@ -68,7 +67,6 @@ main (int argc, char *argv[]) CORBA::Object_var object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // To use the smart proxy just enter it as a svc.conf // entry. @@ -76,7 +74,6 @@ main (int argc, char *argv[]) Test_var server = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (server.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -86,9 +83,8 @@ main (int argc, char *argv[]) server->method (0); - server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); + server->shutdown (); - ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/tests/Smart_Proxies/On_Demand/server.cpp b/TAO/tests/Smart_Proxies/On_Demand/server.cpp index 5f0ebde1ffa..583cc64c268 100644 --- a/TAO/tests/Smart_Proxies/On_Demand/server.cpp +++ b/TAO/tests/Smart_Proxies/On_Demand/server.cpp @@ -34,7 +34,7 @@ public: ACE_THROW_SPEC ((CORBA::SystemException, Test::Oops)); - void shutdown (ACE_ENV_SINGLE_ARG_DECL) + void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); private: @@ -63,7 +63,7 @@ Test_i :: method (CORBA::Short boo } void -Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Test_i::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { this->orb_->shutdown (); @@ -110,34 +110,28 @@ main (int argc, char *argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Test_i servant (orb.in ()); // Obtain RootPOA. CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var root_poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POAManager of the RootPOA. PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); Test_var Test_object = - servant._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + servant._this (); CORBA::String_var ior = orb->object_to_string (Test_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) @@ -157,18 +151,15 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp index 4123f962892..2b9bc6ff99d 100644 --- a/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp +++ b/TAO/tests/Smart_Proxies/Policy/Smart_Proxy_Impl.cpp @@ -42,7 +42,6 @@ Smart_Test_Proxy::method (CORBA::Short boo { retval = TAO_Test_Smart_Proxy_Base::method (boo ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCH (Test::Oops, reason) { diff --git a/TAO/tests/Smart_Proxies/Policy/client.cpp b/TAO/tests/Smart_Proxies/Policy/client.cpp index a54fa3856f3..2dd2519cdaa 100644 --- a/TAO/tests/Smart_Proxies/Policy/client.cpp +++ b/TAO/tests/Smart_Proxies/Policy/client.cpp @@ -70,20 +70,17 @@ run_test (CORBA::ORB_ptr orb_ptr, object = orb->string_to_object (ior1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } else { object = orb->string_to_object (ior2 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } Test_var server = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (server.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -92,8 +89,7 @@ run_test (CORBA::ORB_ptr orb_ptr, server->method (0); - server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + server->shutdown (); } ACE_CATCHANY { @@ -114,7 +110,6 @@ main (int argc, char *argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; @@ -139,7 +134,6 @@ main (int argc, char *argv[]) run_test (orb.in (), 1); run_test (orb.in (), 2); - ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/tests/Smart_Proxies/Policy/server.cpp b/TAO/tests/Smart_Proxies/Policy/server.cpp index 7e000c323d3..027b6855313 100644 --- a/TAO/tests/Smart_Proxies/Policy/server.cpp +++ b/TAO/tests/Smart_Proxies/Policy/server.cpp @@ -34,7 +34,7 @@ public: ACE_THROW_SPEC ((CORBA::SystemException, Test::Oops)); - void shutdown (ACE_ENV_SINGLE_ARG_DECL) + void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); private: @@ -63,7 +63,7 @@ Test_i :: method (CORBA::Short boo } void -Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL) +Test_i::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); @@ -110,34 +110,28 @@ main (int argc, char *argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Test_i servant (orb.in ()); // Obtain RootPOA. CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var root_poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POAManager of the RootPOA. PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); Test_var Test_object = - servant._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + servant._this (); CORBA::String_var ior = orb->object_to_string (Test_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) @@ -157,11 +151,9 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); @@ -169,7 +161,6 @@ main (int argc, char *argv[]) root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.cpp b/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.cpp index b2bd94142ee..ebb632a5b9e 100644 --- a/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.cpp +++ b/TAO/tests/Smart_Proxies/Smart_Proxy_Impl.cpp @@ -59,7 +59,6 @@ Smart_Test_Proxy::method (CORBA::Short boo { retval = TAO_Test_Smart_Proxy_Base::method (boo ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCH (Test::Oops, reason) { diff --git a/TAO/tests/Smart_Proxies/client.cpp b/TAO/tests/Smart_Proxies/client.cpp index 2fc36491398..d4e304f9c11 100644 --- a/TAO/tests/Smart_Proxies/client.cpp +++ b/TAO/tests/Smart_Proxies/client.cpp @@ -62,7 +62,6 @@ main (int argc, char *argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; @@ -70,7 +69,6 @@ main (int argc, char *argv[]) CORBA::Object_var object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // To use the smart proxy it is necessary to allocate the // user-defined smart factory on the heap as the smart proxy @@ -89,7 +87,6 @@ main (int argc, char *argv[]) Test_var server = Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (server.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -118,10 +115,8 @@ main (int argc, char *argv[]) } server->method (0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + server->shutdown (); // The following sleep is a hack to make sure the above oneway // request gets sent before we exit. Otherwise, at least on @@ -129,8 +124,7 @@ main (int argc, char *argv[]) ACE_Time_Value tv (0, 100000); ACE_OS::sleep(tv); - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY { diff --git a/TAO/tests/Smart_Proxies/dtor/client.cpp b/TAO/tests/Smart_Proxies/dtor/client.cpp index 47c2c88884b..29d339a3a31 100644 --- a/TAO/tests/Smart_Proxies/dtor/client.cpp +++ b/TAO/tests/Smart_Proxies/dtor/client.cpp @@ -41,14 +41,12 @@ int main (int argc, char* argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; CORBA::Object_var obj = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // force a scope to see the destruction of the server object { @@ -62,7 +60,6 @@ int main (int argc, char* argv[]) Test_var server = Test::_narrow(obj.in() ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (server.in())) { ACE_ERROR_RETURN ((LM_ERROR, @@ -77,8 +74,7 @@ int main (int argc, char* argv[]) // Testing the _non_existent function ACE_DEBUG ((LM_DEBUG, "Testing _non_existent()\n")); CORBA::Boolean ne = - server->_non_existent(ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + server->_non_existent(); if (ne) ACE_ERROR_RETURN ((LM_ERROR, "Not a Messenger object reference\n"), @@ -87,8 +83,7 @@ int main (int argc, char* argv[]) ACE_DEBUG ((LM_DEBUG,"Successfully called _non_existent()\n")); #endif /* TAO_HAS_MINIMUM_CORBA */ - server->shutdown(ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + server->shutdown(); // The following sleep is a hack to make sure the above oneway // request gets sent before we exit. Otherwise, at least on @@ -102,8 +97,7 @@ int main (int argc, char* argv[]) "The Smart proxy is not deleted\n"),1); } - orb->destroy(ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy(); } ACE_CATCHANY { diff --git a/TAO/tests/Smart_Proxies/dtor/server.cpp b/TAO/tests/Smart_Proxies/dtor/server.cpp index fa9eadf988b..e835df199e1 100644 --- a/TAO/tests/Smart_Proxies/dtor/server.cpp +++ b/TAO/tests/Smart_Proxies/dtor/server.cpp @@ -13,7 +13,7 @@ public: ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - void shutdown (ACE_ENV_SINGLE_ARG_DECL) + void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); private: @@ -34,7 +34,7 @@ Test_i::hello (CORBA::Long howmany } void -Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL) +Test_i::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); @@ -77,7 +77,6 @@ int main (int argc, char* argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; @@ -85,19 +84,15 @@ int main (int argc, char* argv[]) // Obtain RootPOA. CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in() ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POAManager of the RootPOA PortableServer::POAManager_var poa_mgr = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); - poa_mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_mgr->activate (); // Create a servant Test_i servant (orb.in ()); @@ -105,16 +100,13 @@ int main (int argc, char* argv[]) PortableServer::ObjectId_var oid = root_poa->activate_object (&servant ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; obj = root_poa->id_to_reference (oid.in() ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::String_var ior = orb->object_to_string (obj.in() ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) @@ -134,18 +126,15 @@ int main (int argc, char* argv[]) else ACE_ERROR_RETURN ((LM_ERROR,"ior file name is null\n"),1); - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY { diff --git a/TAO/tests/Smart_Proxies/server.cpp b/TAO/tests/Smart_Proxies/server.cpp index 0fc44b24f0f..b4a86a45b7e 100644 --- a/TAO/tests/Smart_Proxies/server.cpp +++ b/TAO/tests/Smart_Proxies/server.cpp @@ -34,7 +34,7 @@ public: ACE_THROW_SPEC ((CORBA::SystemException, Test::Oops)); - void shutdown (ACE_ENV_SINGLE_ARG_DECL) + void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); private: @@ -63,7 +63,7 @@ Test_i :: method (CORBA::Short boo } void -Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL) +Test_i::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); @@ -107,7 +107,6 @@ main (int argc, char *argv[]) argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; @@ -117,27 +116,22 @@ main (int argc, char *argv[]) CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var root_poa = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POAManager of the RootPOA. PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); Test_var Test_object = - servant._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + servant._this (); CORBA::String_var ior = orb->object_to_string (Test_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) @@ -157,21 +151,17 @@ main (int argc, char *argv[]) ACE_OS::fclose (output_file); } - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY { |