diff options
Diffstat (limited to 'TAO/tests/AMH_Oneway/server.cpp')
-rw-r--r-- | TAO/tests/AMH_Oneway/server.cpp | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/TAO/tests/AMH_Oneway/server.cpp b/TAO/tests/AMH_Oneway/server.cpp index 75b4004ae8e..cf0bd27d376 100644 --- a/TAO/tests/AMH_Oneway/server.cpp +++ b/TAO/tests/AMH_Oneway/server.cpp @@ -41,8 +41,7 @@ public: ST_AMH_Servant (CORBA::ORB_ptr orb); void test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, - Test::Timestamp send_time - ACE_ENV_ARG_DECL) + Test::Timestamp send_time) ACE_THROW_SPEC ((CORBA::SystemException)); protected: @@ -60,8 +59,7 @@ ST_AMH_Servant::ST_AMH_Servant (CORBA::ORB_ptr orb) void ST_AMH_Servant::test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh, - Test::Timestamp send_time - ACE_ENV_ARG_DECL_NOT_USED) + Test::Timestamp send_time) ACE_THROW_SPEC ((CORBA::SystemException)) { ACE_OS::sleep (1); @@ -140,51 +138,48 @@ ST_AMH_Server::~ST_AMH_Server () void ST_AMH_Server::cleanup () { - ACE_TRY_NEW_ENV + try { - this->root_poa_->destroy (1, 1 ACE_ENV_ARG_PARAMETER); + this->root_poa_->destroy (1, 1); this->orb_->destroy (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); } - ACE_ENDTRY; } int ST_AMH_Server::start_orb_and_poa (void) { - ACE_TRY_NEW_ENV + try { this->orb_ = CORBA::ORB_init (*(this->argc_), this->argv_, - "" ACE_ENV_ARG_PARAMETER); + ""); CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); + this->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); - this->root_poa_ = PortableServer::POA::_narrow (poa_object.in () - ACE_ENV_ARG_PARAMETER); + this->root_poa_ = PortableServer::POA::_narrow (poa_object.in ()); PortableServer::POAManager_var poa_manager = this->root_poa_->the_POAManager (); poa_manager->activate (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); return -1; } - ACE_ENDTRY; return 0; } @@ -192,28 +187,26 @@ ST_AMH_Server::start_orb_and_poa (void) void ST_AMH_Server::register_servant (ST_AMH_Servant *servant) { - ACE_TRY_NEW_ENV + try { Test::Roundtrip_var roundtrip = servant->_this (); CORBA::String_var ior = - this->orb_->object_to_string (roundtrip.in () ACE_ENV_ARG_PARAMETER); + this->orb_->object_to_string (roundtrip.in ()); (void) this->write_ior_to_file (ior); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); } - ACE_ENDTRY; } void ST_AMH_Server::run_event_loop () { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { ACE_Time_Value period (0, 11000); while (1) @@ -225,9 +218,8 @@ ST_AMH_Server::run_event_loop () return; } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) {} - ACE_ENDTRY; } int |