diff options
Diffstat (limited to 'TAO/examples/POA')
31 files changed, 147 insertions, 496 deletions
diff --git a/TAO/examples/POA/Adapter_Activator/server.cpp b/TAO/examples/POA/Adapter_Activator/server.cpp index 550f5082ff8..9dd14b65abd 100644 --- a/TAO/examples/POA/Adapter_Activator/server.cpp +++ b/TAO/examples/POA/Adapter_Activator/server.cpp @@ -92,20 +92,17 @@ Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent, this->poa_manager_.in (), this->first_poa_policies_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); // Creation of firstPOA is over. Destroy the Policy objects. for (CORBA::ULong i = 0; i < this->first_poa_policies_.length (); ++i) { - this->first_poa_policies_[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->first_poa_policies_[i]->destroy (); } child->the_activator (this ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); reference_counted_test_i *servant = new reference_counted_test_i (this->orb_.in (), @@ -113,12 +110,10 @@ Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent, child->set_servant (servant ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); // This means that the ownership of <servant> now belongs to the // POA. - servant->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + servant->_remove_ref (); // Finally everything is fine return 1; @@ -129,15 +124,13 @@ Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent, this->poa_manager_.in (), this->second_poa_policies_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); // Creation of secondPOA is over. Destroy the Policy objects. for (CORBA::ULong i = 0; i < this->second_poa_policies_.length (); ++i) { - this->second_poa_policies_[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->second_poa_policies_[i]->destroy (); } reference_counted_test_i *servant = @@ -150,12 +143,10 @@ Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent, child->activate_object_with_id (oid.in (), servant ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); // This means that the ownership of <servant> now belongs to the // POA. - servant->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + servant->_remove_ref (); // Finally everything is fine return 1; @@ -273,7 +264,6 @@ main (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int result = parse_args (argc, argv); if (result != 0) @@ -283,18 +273,15 @@ main (int argc, char **argv) CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POA_var object from Object_var. 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_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); Adapter_Activator *adapter_activator = new Adapter_Activator (poa_manager.in (), @@ -305,7 +292,6 @@ main (int argc, char **argv) root_poa->the_activator (adapter_activator_var.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var first_poa; PortableServer::POA_var second_poa; @@ -319,32 +305,27 @@ main (int argc, char **argv) policies[0] = root_poa->create_id_assignment_policy (PortableServer::SYSTEM_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan policy policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Request Processing policy policies[2] = root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Id Uniqueness policies[3] = root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Create the firstPOA under the RootPOA. first_poa = root_poa->create_POA ("firstPOA", poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } { @@ -356,20 +337,17 @@ main (int argc, char **argv) policies[0] = root_poa->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan policy policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Create the secondPOA under the firstPOA. second_poa = first_poa->create_POA ("secondPOA", poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } // Create a servant. @@ -379,16 +357,13 @@ main (int argc, char **argv) PortableServer::ObjectId_var first_oid = root_poa->activate_object (&first_servant ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get Object Reference for the first_servant object. - test_var first_test = first_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + test_var first_test = first_servant._this (); CORBA::Object_var second_test = first_poa->create_reference ("IDL:test:1.0" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::ObjectId_var third_oid = PortableServer::string_to_ObjectId ("third test"); @@ -397,22 +372,18 @@ main (int argc, char **argv) second_poa->create_reference_with_id (third_oid.in (), "IDL:test:1.0" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Stringyfy all the object references and print them out. CORBA::String_var first_ior = orb->object_to_string (first_test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::String_var second_ior = orb->object_to_string (second_test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::String_var third_ior = orb->object_to_string (third_test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "%s\n%s\n%s\n", @@ -429,13 +400,10 @@ main (int argc, char **argv) first_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - 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_CATCHANY @@ -444,7 +412,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/DSI/Database_i.cpp b/TAO/examples/POA/DSI/Database_i.cpp index d4af66acb11..5f4f05e5b39 100644 --- a/TAO/examples/POA/DSI/Database_i.cpp +++ b/TAO/examples/POA/DSI/Database_i.cpp @@ -32,13 +32,11 @@ DatabaseImpl::Entry::Entry (CORBA::ORB_ptr orb, CORBA::Object_var obj = this->orb_->resolve_initial_references ("POACurrent" ACE_ENV_ARG_PARAMETER); - ACE_CHECK; // Narrow the object reference to a POA Current reference this->poa_current_ = PortableServer::Current::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } DatabaseImpl::Entry::~Entry (void) @@ -52,8 +50,7 @@ DatabaseImpl::Entry::invoke (CORBA::ServerRequest_ptr request // The servant determines the key associated with the database // entry represented by self. PortableServer::ObjectId_var oid = - this->poa_current_->get_object_id (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->poa_current_->get_object_id (); // Now convert the id into a string CORBA::String_var key = @@ -67,7 +64,6 @@ DatabaseImpl::Entry::invoke (CORBA::ServerRequest_ptr request "_is_a") == 0) { this->is_a (request ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } else ACE_THROW (CORBA::NO_IMPLEMENT ()); @@ -87,23 +83,19 @@ DatabaseImpl::Entry::is_a (CORBA::ServerRequest_ptr request any_1, CORBA::ARG_IN ACE_ENV_ARG_PARAMETER); - ACE_CHECK; request->arguments (list ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::NamedValue_ptr nv = list->item (0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Any_ptr ap = nv->value (); const char *value; *ap >>= value; const char *object_id = - CORBA::_tc_Object->id (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + CORBA::_tc_Object->id (); CORBA::Boolean result; if (ACE_OS::strcmp (value, "IDL:Database/Employee:1.0") == 0 @@ -118,7 +110,6 @@ DatabaseImpl::Entry::is_a (CORBA::ServerRequest_ptr request result_any <<= from_boolean; request->set_result (result_any ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } CORBA::RepositoryId @@ -130,7 +121,7 @@ DatabaseImpl::Entry::_primary_interface (const PortableServer::ObjectId &/*oid*/ } PortableServer::POA_ptr -DatabaseImpl::Entry::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +DatabaseImpl::Entry::_default_POA (void) { return PortableServer::POA::_duplicate (this->poa_.in ()); } @@ -144,11 +135,9 @@ DatabaseImpl::Agent::Agent (CORBA::ORB_ptr orb, poa ACE_ENV_ARG_PARAMETER) { - ACE_CHECK; this->poa_->set_servant (&this->common_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } DatabaseImpl::Agent::~Agent (void) @@ -192,7 +181,6 @@ DatabaseImpl::Agent::create_entry (const char *key, ACE_NEW_THROW_EX (new_employee, Employee (name, id), CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (Database::Entry::_nil ()); // @@ Should check the return value here and throw an exception if // it fails. @@ -216,11 +204,9 @@ DatabaseImpl::Agent::create_entry (const char *key, this->poa_->create_reference_with_id (obj_id.in (), repository_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (Database::Entry::_nil ()); Database::Entry_var entry = Database::Entry::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (Database::Entry::_nil ()); return entry._retn (); } @@ -261,11 +247,9 @@ DatabaseImpl::Agent::find_entry (const char *key, this->poa_->create_reference_with_id (obj_id.in (), repository_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (Database::Entry::_nil ()); entry = Database::Entry::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (Database::Entry::_nil ()); } else { @@ -316,14 +300,14 @@ DatabaseImpl::Agent::destroy_entry (const char *key, } void -DatabaseImpl::Agent::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +DatabaseImpl::Agent::shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)) { this->orb_->shutdown (); } PortableServer::POA_ptr -DatabaseImpl::Agent::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +DatabaseImpl::Agent::_default_POA (void) { return PortableServer::POA::_duplicate (this->poa_.in ()); } diff --git a/TAO/examples/POA/DSI/Database_i.h b/TAO/examples/POA/DSI/Database_i.h index 4ef67eb752d..14aec44ec6b 100644 --- a/TAO/examples/POA/DSI/Database_i.h +++ b/TAO/examples/POA/DSI/Database_i.h @@ -52,7 +52,7 @@ public: // a POA_ptr as input parameters and returns a valid RepositoryId // representing the most-derived interface for that oid. - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL); + virtual PortableServer::POA_ptr _default_POA (void); // Returns the default POA for this servant. virtual void is_a (CORBA::ServerRequest_ptr request @@ -100,10 +100,10 @@ public: Database::Unknown_Type, Database::Unknown_Key)); - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL) + virtual void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL); + virtual PortableServer::POA_ptr _default_POA (void); // Returns the default POA for this servant. protected: diff --git a/TAO/examples/POA/DSI/client.cpp b/TAO/examples/POA/DSI/client.cpp index f3361796b0b..311044ef617 100644 --- a/TAO/examples/POA/DSI/client.cpp +++ b/TAO/examples/POA/DSI/client.cpp @@ -114,7 +114,6 @@ main (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Parse the command-line arguments to get the location of the // IOR @@ -137,7 +136,6 @@ main (int argc, char **argv) // Get the object reference with the IOR CORBA::Object_var object = orb->string_to_object (IOR ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::strcpy (str, "Database::Agent::_narrow"); @@ -146,7 +144,6 @@ main (int argc, char **argv) Database::Agent_var database_agent = Database::Agent::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Database::NVPairSequence employee_attributes (2); employee_attributes.length (2); @@ -173,14 +170,12 @@ main (int argc, char **argv) "Employee", employee_attributes ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::strcpy (str, "Database::Employee::_narrow"); Database::Employee_var employee = Database::Employee::_narrow (entry.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; /* * @@ -193,7 +188,6 @@ main (int argc, char **argv) // Reset the id ACE_OS::strcpy (str, "Database::Employee::id"); employee->id (666 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; #endif /* 0 */ ACE_OS::strcpy (str, "Database::Entry::find"); @@ -201,21 +195,18 @@ main (int argc, char **argv) entry = database_agent->find_entry ("irfan", "Employee" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::strcpy (str, "Database::Entry::destroy"); // Destroy the employee database_agent->destroy_entry ("irfan", "Employee" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::strcpy (str, "Shutdown server"); if (shutdown_server) { - database_agent->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + database_agent->shutdown (); } ACE_OS::free (IOR); @@ -227,7 +218,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/DSI/server.cpp b/TAO/examples/POA/DSI/server.cpp index 2e7bc06fe6e..1bec698a3c9 100644 --- a/TAO/examples/POA/DSI/server.cpp +++ b/TAO/examples/POA/DSI/server.cpp @@ -86,7 +86,6 @@ main (int argc, char **argv) { // Initialize the ORB CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int result = parse_args (argc, argv); if (result != 0) @@ -96,16 +95,13 @@ main (int argc, char **argv) CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Narrow the object reference to a POA reference PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); CORBA::PolicyList policies (5); policies.length (5); @@ -113,52 +109,44 @@ main (int argc, char **argv) // ID Assignment Policy policies[0] = root_poa->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan Policy policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Request Processing Policy policies[2] = root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Servant Retention Policy policies[3] = root_poa->create_servant_retention_policy (PortableServer::RETAIN ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Id Uniqueness Policy policies[4] = root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_CString name = "firstPOA"; PortableServer::POA_var first_poa = root_poa->create_POA (name.c_str (), poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; for (CORBA::ULong i = 0; i < policies.length (); ++i) { CORBA::Policy_ptr policy = policies[i]; - policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy->destroy (); } // Create a Database Agent Implementation object in first_poa DatabaseImpl::Agent database_agent_impl (orb.in (), first_poa.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::ObjectId_var database_agent_oid = PortableServer::string_to_ObjectId ("DatabaseAgent"); @@ -166,16 +154,13 @@ main (int argc, char **argv) first_poa->activate_object_with_id (database_agent_oid.in (), &database_agent_impl ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var database_agent = first_poa->id_to_reference (database_agent_oid.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the IOR for the "DatabaseAgent" object CORBA::String_var database_agent_ior = orb->object_to_string (database_agent.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG,"%s\n", database_agent_ior.in ())); @@ -185,12 +170,10 @@ main (int argc, char **argv) return write_result; // set the state of the poa_manager to active i.e ready to process requests - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); // Run the ORB - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); } ACE_CATCHANY { @@ -198,7 +181,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/Default_Servant/File_i.cpp b/TAO/examples/POA/Default_Servant/File_i.cpp index d471e1b9ee7..2e3a609cd00 100644 --- a/TAO/examples/POA/Default_Servant/File_i.cpp +++ b/TAO/examples/POA/Default_Servant/File_i.cpp @@ -31,7 +31,6 @@ FileImpl::System::System (PortableServer::POA_ptr poa) ACE_DECLARE_NEW_CORBA_ENV; // set the default servant of the POA poa->set_servant (&this->fd_servant_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } FileImpl::System::~System (void) @@ -39,7 +38,7 @@ FileImpl::System::~System (void) } PortableServer::POA_ptr -FileImpl::System::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +FileImpl::System::_default_POA (void) { return PortableServer::POA::_duplicate (this->poa_.in ()); } @@ -78,13 +77,11 @@ FileImpl::System::open (const char *file_name, this->poa_->create_reference_with_id (oid.in (), "IDL:File/Descriptor:1.0" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (File::Descriptor::_nil ()); // Narrow the object reference to a File Descriptor File::Descriptor_var fd = File::Descriptor::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (File::Descriptor::_nil ()); return fd._retn (); } @@ -100,27 +97,25 @@ FileImpl::Descriptor::~Descriptor (void) } PortableServer::POA_ptr -FileImpl::Descriptor::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +FileImpl::Descriptor::_default_POA (void) { return PortableServer::POA::_duplicate (this->poa_.in ()); } //Extracts the ACE_HANDLE from the passed object reference ACE_HANDLE -FileImpl::Descriptor::fd (ACE_ENV_SINGLE_ARG_DECL) +FileImpl::Descriptor::fd (void) { // // One way of getting our id. // // Get a reference to myself - File::Descriptor_var me = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (ACE_INVALID_HANDLE); + File::Descriptor_var me = this->_this (); // Get the ObjectId from the reference PortableServer::ObjectId_var oid1 = this->poa_->reference_to_id (me.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (ACE_INVALID_HANDLE); // // Another way of getting our id. @@ -128,7 +123,6 @@ FileImpl::Descriptor::fd (ACE_ENV_SINGLE_ARG_DECL) PortableServer::ObjectId_var oid2 = this->poa_->servant_to_id (this ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (ACE_INVALID_HANDLE); // // Yet another way of getting our id. @@ -136,23 +130,19 @@ FileImpl::Descriptor::fd (ACE_ENV_SINGLE_ARG_DECL) int argc = 0; CORBA::ORB_var orb = CORBA::ORB_init (argc, 0, 0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (ACE_INVALID_HANDLE); // Get the POA Current object reference CORBA::Object_var obj = orb->resolve_initial_references ("POACurrent" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (ACE_INVALID_HANDLE); // Narrow the object reference to a POA Current reference PortableServer::Current_var poa_current = PortableServer::Current::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (ACE_INVALID_HANDLE); PortableServer::ObjectId_var oid3 = - poa_current->get_object_id (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (ACE_INVALID_HANDLE); + poa_current->get_object_id (); ACE_ASSERT (oid1.in () == oid2.in ()); ACE_ASSERT (oid2.in () == oid3.in ()); @@ -171,8 +161,7 @@ FileImpl::Descriptor::write (const File::Descriptor::DataBuffer &buffer ACE_THROW_SPEC ((CORBA::SystemException, File::IOError)) { - ACE_HANDLE file_descriptor = this->fd (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + ACE_HANDLE file_descriptor = this->fd (); const CORBA::Octet *data = &buffer[0]; @@ -191,8 +180,7 @@ FileImpl::Descriptor::read (CORBA::Long num_bytes ACE_THROW_SPEC ((CORBA::SystemException, File::IOError)) { - ACE_HANDLE file_descriptor = this->fd (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + ACE_HANDLE file_descriptor = this->fd (); CORBA::Octet *buffer = File::Descriptor::DataBuffer::allocbuf (num_bytes); int length = ACE_OS::read (file_descriptor, buffer, num_bytes); @@ -214,8 +202,7 @@ FileImpl::Descriptor::lseek (CORBA::ULong offset, ACE_THROW_SPEC ((CORBA::SystemException, File::IOError)) { - ACE_HANDLE file_descriptor = this->fd (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + ACE_HANDLE file_descriptor = this->fd (); CORBA::Long result = (CORBA::Long) ACE_OS::lseek (file_descriptor, offset, @@ -227,12 +214,11 @@ FileImpl::Descriptor::lseek (CORBA::ULong offset, } void -FileImpl::Descriptor::destroy (ACE_ENV_SINGLE_ARG_DECL) +FileImpl::Descriptor::destroy (void) ACE_THROW_SPEC ((CORBA::SystemException)) { // Get the ACE_HANDLE for this object reference - ACE_HANDLE file_descriptor = this->fd (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + ACE_HANDLE file_descriptor = this->fd (); // Close the file corresponding to this object reference. ACE_OS::close (file_descriptor); diff --git a/TAO/examples/POA/Default_Servant/File_i.h b/TAO/examples/POA/Default_Servant/File_i.h index ebe06fce403..c77d5cdd66f 100644 --- a/TAO/examples/POA/Default_Servant/File_i.h +++ b/TAO/examples/POA/Default_Servant/File_i.h @@ -34,7 +34,7 @@ public: ~Descriptor (void); // Destructor - PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL); + PortableServer::POA_ptr _default_POA (void); // Returns the default POA of this object virtual CORBA::Long write (const File::Descriptor::DataBuffer &buffer @@ -56,13 +56,13 @@ public: File::IOError)); // seek to the offset in file from whence - virtual void destroy (ACE_ENV_SINGLE_ARG_DECL) + virtual void destroy (void) ACE_THROW_SPEC ((CORBA::SystemException)); // closes the file corresponding to the requested ObjectID private: - ACE_HANDLE fd (ACE_ENV_SINGLE_ARG_DECL); + ACE_HANDLE fd (void); // Extracts the ACE_HANDLE from the objectID PortableServer::POA_var poa_; @@ -80,7 +80,7 @@ public: ~System (void); //Destructor - PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL); + PortableServer::POA_ptr _default_POA (void); //Returns the default POA of this object File::Descriptor_ptr open (const char *file_name, diff --git a/TAO/examples/POA/Default_Servant/client.cpp b/TAO/examples/POA/Default_Servant/client.cpp index a1a99766578..36ce17b1e8a 100644 --- a/TAO/examples/POA/Default_Servant/client.cpp +++ b/TAO/examples/POA/Default_Servant/client.cpp @@ -79,7 +79,6 @@ main (int argc, char **argv) { // Initialize the ORB CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Parse the command-line arguments to get the IOR parse_args (argc, argv); @@ -108,18 +107,15 @@ main (int argc, char **argv) CORBA::Object_var object = orb->string_to_object (ior.c_str () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Narrow the object reference to a File::System File::System_var file_system = File::System::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creat the file filename i.e "test" File::Descriptor_var fd = file_system->open (filename, O_CREAT | O_RDWR ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int message_length = ACE_OS::strlen (message) + 1; CORBA::Octet *buffer = File::Descriptor::DataBuffer::allocbuf (message_length); @@ -128,16 +124,13 @@ main (int argc, char **argv) // write the message to the file fd->write (data_sent ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; //seek to the beginning of the file fd->lseek (0, SEEK_SET ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Read back the written message File::Descriptor::DataBuffer_var data_received = fd->read (message_length ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; char *result = (char *) &data_received[0]; @@ -146,8 +139,7 @@ main (int argc, char **argv) result)); // close the file - fd->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + fd->destroy (); } ACE_CATCHANY { @@ -155,7 +147,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/Default_Servant/server.cpp b/TAO/examples/POA/Default_Servant/server.cpp index be45c3a1297..2d51d030612 100644 --- a/TAO/examples/POA/Default_Servant/server.cpp +++ b/TAO/examples/POA/Default_Servant/server.cpp @@ -66,7 +66,6 @@ main (int argc, char **argv) { // Initialize the ORB CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int result = parse_args (argc, argv); if (result != 0) @@ -76,14 +75,11 @@ main (int argc, char **argv) CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Narrow the object reference to a POA reference PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (); CORBA::PolicyList policies (5); policies.length (5); @@ -91,42 +87,35 @@ main (int argc, char **argv) // ID Assignment Policy policies[0] = root_poa->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan Policy policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Request Processing Policy policies[2] = root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Servant Retention Policy policies[3] = root_poa->create_servant_retention_policy (PortableServer::RETAIN ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Id Uniqueness Policy policies[4] = root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_CString name = "firstPOA"; PortableServer::POA_var first_poa = root_poa->create_POA (name.c_str (), poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; for (CORBA::ULong i = 0; i < policies.length (); ++i) { CORBA::Policy_ptr policy = policies[i]; - policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy->destroy (); } // Create a File System Implementation object in first_poa @@ -138,16 +127,13 @@ main (int argc, char **argv) first_poa->activate_object_with_id (file_system_oid.in (), &file_system_impl ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var file_system = first_poa->id_to_reference (file_system_oid.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the IOR for the "FileSystem" object CORBA::String_var file_system_ior = orb->object_to_string (file_system.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG,"%s\n", file_system_ior.in ())); @@ -162,12 +148,10 @@ main (int argc, char **argv) ACE_OS::fclose (output_file); // set the state of the poa_manager to active i.e ready to process requests - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); // Run the ORB - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); } ACE_CATCHANY @@ -176,7 +160,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/Explicit_Activation/server.cpp b/TAO/examples/POA/Explicit_Activation/server.cpp index 924ce3bd0f1..8edf30304bf 100644 --- a/TAO/examples/POA/Explicit_Activation/server.cpp +++ b/TAO/examples/POA/Explicit_Activation/server.cpp @@ -130,7 +130,6 @@ main (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int result = parse_args (argc, argv); if (result != 0) @@ -140,18 +139,15 @@ main (int argc, char **argv) CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POA_var object from Object_var. 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_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); // Policies for the firstPOA to be created. CORBA::PolicyList policies (3); @@ -161,19 +157,16 @@ main (int argc, char **argv) policies[0] = root_poa->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan policy policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Threading policy policies[2] = root_poa->create_thread_policy (PortableServer::ORB_CTRL_MODEL ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Create the firstPOA under the RootPOA. ACE_CString name = "firstPOA"; @@ -182,16 +175,13 @@ main (int argc, char **argv) poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - policies[2]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policies[2]->destroy (); // Threading policy policies[2] = root_poa->create_thread_policy (PortableServer::SINGLE_THREAD_MODEL ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Create the secondPOA under the firstPOA. name = "secondPOA"; @@ -200,15 +190,13 @@ main (int argc, char **argv) poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of POAs is over. Destroy the Policy objects. for (CORBA::ULong i = 0; i < policies.length (); ++i) { - policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policies[i]->destroy (); } // Create two Objects of Class test_i (defined in @@ -226,12 +214,10 @@ main (int argc, char **argv) PortableServer::ObjectId_var first_oid = root_poa->activate_object (&first_servant ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get Object Reference for the first_servant object. test_var first_test = - first_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + first_servant._this (); // Get ObjectId for object secondtest and use that ObjectId to // activate the second_servant object. @@ -244,12 +230,10 @@ main (int argc, char **argv) first_poa->activate_object_with_id (second_oid.in (), &second_servant ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get Object reference for second_servant object. test_var second_test = - second_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + second_servant._this (); // Get ObjectId for the string thirdPOA Create the object reference // for thirdPOA using that ObjectId. Operation Used : @@ -271,20 +255,16 @@ main (int argc, char **argv) second_poa->create_reference_with_id (third_oid.in (), "IDL:test:1.0" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Stringyfy all the object references and print them out. CORBA::String_var first_ior = orb->object_to_string (first_test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::String_var second_ior = orb->object_to_string (second_test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::String_var third_ior = orb->object_to_string (third_test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "%s\n%s\n%s\n", @@ -305,13 +285,10 @@ main (int argc, char **argv) second_poa->activate_object_with_id (third_oid.in (), &third_servant ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - 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_CATCHANY { @@ -319,7 +296,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/FindPOA/FindPOA.cpp b/TAO/examples/POA/FindPOA/FindPOA.cpp index 3d811df3b1b..0cf0bdc8620 100644 --- a/TAO/examples/POA/FindPOA/FindPOA.cpp +++ b/TAO/examples/POA/FindPOA/FindPOA.cpp @@ -42,7 +42,6 @@ find_non_existant_POA (PortableServer::POA_ptr parent, parent->find_POA (child_poa_name, activate ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCH (PortableServer::POA::AdapterNonExistent, foo) { @@ -65,26 +64,21 @@ main (int argc, char **argv) ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Obtain the RootPOA. CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Narrow Object reference to RootPOA to a POA reference. 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_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); // Try to find a non-existant POA. Since the Adapter Activator // has not been installed yet, this call should fail. @@ -100,7 +94,6 @@ main (int argc, char **argv) // Adapter Activator. root_poa->the_activator (activator.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Try to find a childPOA of RootPOA named firstPOA ACE_CString name = "firstPOA"; @@ -108,14 +101,12 @@ main (int argc, char **argv) root_poa->find_POA (name.c_str (), 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; name = "secondPOA"; PortableServer::POA_var second_poa = first_poa->find_POA (name.c_str (), 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Try to find a non-existant POA. Even though the Adapter // Activator has been installed, this call should fail because @@ -126,16 +117,13 @@ main (int argc, char **argv) // Get the names of all the POAs CORBA::String_var root_poa_name = - root_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_name (); CORBA::String_var first_poa_name = - first_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + first_poa->the_name (); CORBA::String_var second_poa_name = - second_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + second_poa->the_name (); ACE_DEBUG ((LM_DEBUG, "%s\n%s\n%s\n", @@ -149,7 +137,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/Forwarding/Servant_Activator.cpp b/TAO/examples/POA/Forwarding/Servant_Activator.cpp index d7d2452dadf..c3d3cb08971 100644 --- a/TAO/examples/POA/Forwarding/Servant_Activator.cpp +++ b/TAO/examples/POA/Forwarding/Servant_Activator.cpp @@ -21,7 +21,6 @@ ServantActivator::incarnate (const PortableServer::ObjectId &, { this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); // Throw forward exception ACE_THROW_RETURN ( @@ -43,7 +42,7 @@ ServantActivator::etherealize (const PortableServer::ObjectId &, } void -ServantActivator::forward_requests (ACE_ENV_SINGLE_ARG_DECL) +ServantActivator::forward_requests (void) { if (CORBA::is_nil (this->forward_to_.in ())) ACE_THROW (test::Cannot_Forward ()); diff --git a/TAO/examples/POA/Forwarding/Servant_Activator.h b/TAO/examples/POA/Forwarding/Servant_Activator.h index 7b559180569..3eb3d9a6928 100644 --- a/TAO/examples/POA/Forwarding/Servant_Activator.h +++ b/TAO/examples/POA/Forwarding/Servant_Activator.h @@ -52,7 +52,7 @@ public: ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); - void forward_requests (ACE_ENV_SINGLE_ARG_DECL); + void forward_requests (void); // Object should be forwarded from now on. private: diff --git a/TAO/examples/POA/Forwarding/client.cpp b/TAO/examples/POA/Forwarding/client.cpp index a47f480a36d..3d34175c1b3 100644 --- a/TAO/examples/POA/Forwarding/client.cpp +++ b/TAO/examples/POA/Forwarding/client.cpp @@ -74,8 +74,7 @@ do_calls (test_ptr test for (int i = 1; i <= iterations; i++) { // Invoke the doit() method of the test reference. - CORBA::Long result = test->doit (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + CORBA::Long result = test->doit (); // Print the result of doit () method of the test reference. ACE_DEBUG ((LM_DEBUG, @@ -88,8 +87,7 @@ do_calls (test_ptr test { ACE_DEBUG ((LM_DEBUG, "Asking server to forward next time\n")); - test->forward (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + test->forward (); } } } @@ -104,7 +102,6 @@ main (int argc, char **argv) { // Initialize the ORB CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Initialize options based on command-line arguments. int parse_args_result = @@ -115,19 +112,15 @@ main (int argc, char **argv) // Get an object reference from the argument string. CORBA::Object_var object = orb->string_to_object (IOR ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Try to narrow the object reference to a test reference. test_var test = test::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; do_calls (test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + test->shutdown (); } ACE_CATCHANY { @@ -135,7 +128,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/Forwarding/server.cpp b/TAO/examples/POA/Forwarding/server.cpp index b4a4e26b918..b1e70b8b5e2 100644 --- a/TAO/examples/POA/Forwarding/server.cpp +++ b/TAO/examples/POA/Forwarding/server.cpp @@ -75,17 +75,14 @@ setup_poa (PortableServer::POA_ptr root_poa policies[0] = root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); // Allow implicit activation. policies[1] = root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); + root_poa->the_POAManager (); // Create POA as child of RootPOA with the above policies. This POA // will use a SERVANT_ACTIVATOR because of RETAIN policy. @@ -94,15 +91,13 @@ setup_poa (PortableServer::POA_ptr root_poa poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); // Creation of childPOAs is over. Destroy the Policy objects. for (CORBA::ULong i = 0; i < policies.length (); ++i) { - policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); + policies[i]->destroy (); } return child_poa._retn (); @@ -119,7 +114,6 @@ create_servant_manager (CORBA::ORB_ptr orb, forward_to = orb->string_to_object (forward_to_ior ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); } ServantActivator *activator = 0; @@ -140,7 +134,6 @@ create_servant_manager (CORBA::ORB_ptr orb, // // child_poa->set_servant_manager (servant_activator.in (), // ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); test_i *servant = 0; ACE_NEW_RETURN (servant, @@ -153,13 +146,11 @@ create_servant_manager (CORBA::ORB_ptr orb, PortableServer::ServantBase_var servant_var (servant); test_var test = - servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + servant->_this (); CORBA::String_var ior = orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) @@ -187,7 +178,6 @@ main (int argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int result = parse_args (argc, argv); @@ -199,37 +189,29 @@ main (int argc, 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_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); PortableServer::POA_var child_poa = setup_poa (root_poa.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::ServantManager_var manager = create_servant_manager (orb.in (), child_poa.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - 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 (); - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); } ACE_CATCHANY { @@ -237,7 +219,6 @@ main (int argc, return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/Forwarding/test_i.cpp b/TAO/examples/POA/Forwarding/test_i.cpp index 254c4377ace..a2dc72e82d1 100644 --- a/TAO/examples/POA/Forwarding/test_i.cpp +++ b/TAO/examples/POA/Forwarding/test_i.cpp @@ -18,42 +18,38 @@ test_i::test_i (CORBA::ORB_ptr orb, } CORBA::Long -test_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +test_i::doit (void) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->value_++; } void -test_i::forward (ACE_ENV_SINGLE_ARG_DECL) +test_i::forward (void) ACE_THROW_SPEC ((CORBA::SystemException, test::Cannot_Forward)) { - this->activator_.forward_requests (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->activator_.forward_requests (); PortableServer::ObjectId_var id = this->poa_->servant_to_id (this ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->poa_->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } 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); - ACE_CHECK; } PortableServer::POA_ptr -test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +test_i::_default_POA (void) { return PortableServer::POA::_duplicate (this->poa_.in ()); } diff --git a/TAO/examples/POA/Forwarding/test_i.h b/TAO/examples/POA/Forwarding/test_i.h index 4a78980de85..b72e64413e6 100644 --- a/TAO/examples/POA/Forwarding/test_i.h +++ b/TAO/examples/POA/Forwarding/test_i.h @@ -25,18 +25,18 @@ public: ServantActivator &activator, CORBA::Long value); - virtual CORBA::Long doit (ACE_ENV_SINGLE_ARG_DECL) + virtual CORBA::Long doit (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Setup forwarding - virtual void forward (ACE_ENV_SINGLE_ARG_DECL) + virtual void forward (void) ACE_THROW_SPEC ((CORBA::SystemException, test::Cannot_Forward)); - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL) + virtual void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL); + virtual PortableServer::POA_ptr _default_POA (void); // Returns the default POA for this servant. protected: diff --git a/TAO/examples/POA/Generic_Servant/client.cpp b/TAO/examples/POA/Generic_Servant/client.cpp index 901c06ce028..9d88bf617b3 100644 --- a/TAO/examples/POA/Generic_Servant/client.cpp +++ b/TAO/examples/POA/Generic_Servant/client.cpp @@ -116,7 +116,6 @@ main (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Initialize options based on command-line arguments. int parse_args_result = @@ -128,17 +127,14 @@ main (int argc, char **argv) CORBA::Object_var object = orb->string_to_object (IOR ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Try to narrow the object reference to a test reference. test_var test = test::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::String_var ior = orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "\nConnecting to: %s\n\n", @@ -158,23 +154,19 @@ main (int argc, char **argv) { test->timed_oneway_method (timeout ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } else if (oneway) { - test->oneway_method (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + test->oneway_method (); } else if (!oneway && timed_method) { test->timed_method (timeout ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } else { - test->method (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + test->method (); } } @@ -187,8 +179,7 @@ main (int argc, char **argv) if (shutdown_server) { - test->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + test->shutdown (); } } ACE_CATCHANY @@ -197,7 +188,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/Generic_Servant/test_i.cpp b/TAO/examples/POA/Generic_Servant/test_i.cpp index 3e9df19ff8c..f66c7305bf7 100644 --- a/TAO/examples/POA/Generic_Servant/test_i.cpp +++ b/TAO/examples/POA/Generic_Servant/test_i.cpp @@ -15,19 +15,19 @@ test_i::test_i (CORBA::ORB_ptr orb, } PortableServer::POA_ptr -test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +test_i::_default_POA (void) { return PortableServer::POA::_duplicate (this->poa_.in ()); } void -test_i::method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +test_i::method (void) ACE_THROW_SPEC ((CORBA::SystemException)) { } void -test_i::oneway_method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +test_i::oneway_method (void) ACE_THROW_SPEC ((CORBA::SystemException)) { } @@ -67,12 +67,11 @@ test_i::timed_oneway_method (CORBA::ULong timeout } 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); - ACE_CHECK; } diff --git a/TAO/examples/POA/Generic_Servant/test_i.h b/TAO/examples/POA/Generic_Servant/test_i.h index 3a6a4c96889..6baf3a65f93 100644 --- a/TAO/examples/POA/Generic_Servant/test_i.h +++ b/TAO/examples/POA/Generic_Servant/test_i.h @@ -22,14 +22,14 @@ public: PortableServer::POA_ptr poa); // Constructor - takes a POA and a value parameter - PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL); + PortableServer::POA_ptr _default_POA (void); // Returns the Default POA of this servant - void method (ACE_ENV_SINGLE_ARG_DECL) + void method (void) ACE_THROW_SPEC ((CORBA::SystemException)); // A twoway operation. - void oneway_method (ACE_ENV_SINGLE_ARG_DECL) + void oneway_method (void) ACE_THROW_SPEC ((CORBA::SystemException)); // A oneway operation. @@ -43,7 +43,7 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // A timed twoway operation. - void shutdown (ACE_ENV_SINGLE_ARG_DECL) + void shutdown (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Shutdown the ORB diff --git a/TAO/examples/POA/Loader/Server_Manager.cpp b/TAO/examples/POA/Loader/Server_Manager.cpp index 287be59afe8..353aa9cfbb6 100644 --- a/TAO/examples/POA/Loader/Server_Manager.cpp +++ b/TAO/examples/POA/Loader/Server_Manager.cpp @@ -117,7 +117,6 @@ Server_i::init (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int result = parse_args (argc, argv); if (result != 0) @@ -127,16 +126,13 @@ Server_i::init (int argc, char **argv) CORBA::Object_var obj = orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Narrow the Object reference to a POA reference root_poa_ = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POAManager of RootPOA - poa_manager_ = root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager_ = root_poa_->the_POAManager (); } ACE_CATCHANY @@ -170,21 +166,18 @@ Server_i::create_poa (const char *name, root_poa_->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan Policy. policies_[1] = root_poa_->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Request Processing Policy. policies_[2] = root_poa_->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Servant Retention Policy. if (servant_retention_policy == 1) @@ -193,7 +186,6 @@ Server_i::create_poa (const char *name, root_poa_->create_servant_retention_policy (PortableServer::RETAIN ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } if (servant_retention_policy == 0) @@ -202,7 +194,6 @@ Server_i::create_poa (const char *name, root_poa_->create_servant_retention_policy (PortableServer::NON_RETAIN ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } // Create myPOA as the child of RootPOA with the above @@ -213,7 +204,6 @@ Server_i::create_poa (const char *name, poa_manager_.in (), policies_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Destroy the policy objects as they have been passed to // create_POA and no longer needed. @@ -222,8 +212,7 @@ Server_i::create_poa (const char *name, ++i) { CORBA::Policy_ptr policy = policies_[i]; - policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy->destroy (); } } ACE_CATCHANY @@ -232,7 +221,6 @@ Server_i::create_poa (const char *name, return 0; } ACE_ENDTRY; - ACE_CHECK_RETURN (0); return my_poa; } @@ -269,7 +257,6 @@ Server_i::create_activator (PortableServer::POA_var first_poa) // // first_poa->set_servant_manager (this->servant_activator_.in () // ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Create a reference with user created ID in firstPOA which // uses the ServantActivator. @@ -279,7 +266,6 @@ Server_i::create_activator (PortableServer::POA_var first_poa) first_test_ = first_poa->create_reference_with_id (first_test_oid.in (), "IDL:test:1.0" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { @@ -324,7 +310,6 @@ Server_i::create_locator (PortableServer::POA_var second_poa) // secondPOA. // second_poa->set_servant_manager (this->servant_locator_.in () // ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Try to create a reference with user created ID in second_poa // which uses ServantLocator. @@ -335,7 +320,6 @@ Server_i::create_locator (PortableServer::POA_var second_poa) second_poa->create_reference_with_id (second_test_oid.in (), "IDL:test:1.0" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { @@ -362,12 +346,10 @@ Server_i::run (void) CORBA::String_var first_test_ior = orb_->object_to_string (first_test_.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::String_var second_test_ior = orb_->object_to_string (second_test_.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Print the ior's of first_test and second_test. @@ -383,13 +365,11 @@ Server_i::run (void) // Set the poa_manager state to active, ready to process // requests. - poa_manager_->activate (ACE_ENV_SINGLE_ARG_PARAMETER); + poa_manager_->activate (); - ACE_TRY_CHECK; // Run the ORB. - orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb_->run (); } ACE_CATCHANY { diff --git a/TAO/examples/POA/NewPOA/NewPOA.cpp b/TAO/examples/POA/NewPOA/NewPOA.cpp index be4283821ee..e2617cb42f0 100644 --- a/TAO/examples/POA/NewPOA/NewPOA.cpp +++ b/TAO/examples/POA/NewPOA/NewPOA.cpp @@ -37,12 +37,10 @@ print_poa (PortableServer::POA_ptr poa ACE_ENV_ARG_DECL) { CORBA::String_var poa_name = - poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa->the_name (); CORBA::OctetSeq_var poa_id = - poa->id (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa->id (); ACE_DEBUG ((LM_DEBUG, "POA name = %s\n", @@ -64,8 +62,7 @@ print_poa (PortableServer::POA_ptr poa "\n")); PortableServer::POAList_var children = - poa->the_children (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa->the_children (); for (CORBA::ULong index = 0; index != children->length (); @@ -73,7 +70,6 @@ print_poa (PortableServer::POA_ptr poa { print_poa (children[index] ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } @@ -89,18 +85,15 @@ main (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Obtain the RootPOA. CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // _narrow() the Object to get the POA object, i.e., the root_poa. PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Policies for the new POAs CORBA::PolicyList policies (2); @@ -109,12 +102,10 @@ main (int argc, char **argv) // Threading policy policies[0] = root_poa->create_thread_policy (PortableServer::ORB_CTRL_MODEL ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan policy policies[1] = root_poa->create_lifespan_policy (PortableServer::TRANSIENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of the firstPOA ACE_CString name = "firstPOA"; @@ -123,7 +114,6 @@ main (int argc, char **argv) PortableServer::POAManager::_nil (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of the new POA, i.e. firstPOA/secondPOA name = "secondPOA"; @@ -132,7 +122,6 @@ main (int argc, char **argv) PortableServer::POAManager::_nil (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creating thirdPOA. name = "thirdPOA"; @@ -142,7 +131,6 @@ main (int argc, char **argv) PortableServer::POAManager::_nil (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of the new POAs over, so destroy the Policy_ptr's. for (CORBA::ULong i = 0; @@ -150,27 +138,22 @@ main (int argc, char **argv) ++i) { CORBA::Policy_ptr policy = policies[i]; - policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy->destroy (); } // Get the names of all the POAs and print them out. CORBA::String_var root_poa_name = - root_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_name (); CORBA::String_var first_poa_name = - first_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + first_poa->the_name (); CORBA::String_var second_poa_name = - second_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + second_poa->the_name (); CORBA::String_var third_poa_name = - third_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + third_poa->the_name (); ACE_DEBUG ((LM_DEBUG, "%s\n%s\n%s\n%s\n", @@ -181,7 +164,6 @@ main (int argc, char **argv) print_poa (root_poa.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY @@ -190,7 +172,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/On_Demand_Activation/server.cpp b/TAO/examples/POA/On_Demand_Activation/server.cpp index c5aa44a172f..77c71e0a9cc 100644 --- a/TAO/examples/POA/On_Demand_Activation/server.cpp +++ b/TAO/examples/POA/On_Demand_Activation/server.cpp @@ -108,7 +108,6 @@ main (int argc, char **argv) { // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int result = parse_args (argc, argv); if (result != 0) @@ -118,19 +117,16 @@ main (int argc, char **argv) CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Narrow the Object reference to a POA reference PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POAManager of RootPOA PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); + root_poa->the_POAManager (); - ACE_TRY_CHECK; CORBA::PolicyList policies (4); policies.length (4); @@ -138,24 +134,20 @@ main (int argc, char **argv) // ID Assignment Policy policies[0] = root_poa->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan Policy policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Request Processing Policy policies[2] = root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POA_var first_poa; { // Servant Retention Policy policies[3] = root_poa->create_servant_retention_policy (PortableServer::RETAIN ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_CString name = "firstPOA"; @@ -165,7 +157,6 @@ main (int argc, char **argv) poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } @@ -174,7 +165,6 @@ main (int argc, char **argv) // Servant Retention Policy policies[3] = root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_CString name = "secondPOA"; @@ -185,7 +175,6 @@ main (int argc, char **argv) poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } @@ -196,8 +185,7 @@ main (int argc, char **argv) ++i) { CORBA::Policy_ptr policy = policies[i]; - policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy->destroy (); } // Allocate the servant activator. @@ -219,7 +207,6 @@ main (int argc, char **argv) // // first_poa->set_servant_manager (servant_activator.in (), // ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; // Create a reference with user created ID in firstPOA which uses // the ServantActivator. @@ -229,7 +216,6 @@ main (int argc, char **argv) CORBA::Object_var first_test = first_poa->create_reference_with_id (first_test_oid.in (), "IDL:test:1.0" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Allocate the servant activator. ServantLocator *locator; @@ -250,7 +236,6 @@ main (int argc, char **argv) // // second_poa->set_servant_manager (servant_locator.in (), // ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; // Try to create a reference with user created ID in second_poa // which uses ServantLocator. @@ -261,19 +246,16 @@ main (int argc, char **argv) CORBA::Object_var second_test = second_poa->create_reference_with_id (second_test_oid.in (), "IDL:test:1.0" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Invoke object_to_string on the references created in firstPOA and // secondPOA. CORBA::String_var first_test_ior = orb->object_to_string (first_test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::String_var second_test_ior = orb->object_to_string (second_test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Print the ior's of first_test and second_test. @@ -287,12 +269,10 @@ main (int argc, char **argv) return write_result; // Set the poa_manager state to active, ready to process requests. - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); // Run the ORB. - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->run (); } ACE_CATCHANY { @@ -300,7 +280,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp b/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp index c1d6f600d34..3da1b381a55 100644 --- a/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Server_Manager.cpp @@ -122,7 +122,6 @@ Server_i::init (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int result = parse_args (argc, argv); if (result != 0) @@ -132,16 +131,13 @@ Server_i::init (int argc, char **argv) CORBA::Object_var obj = orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Narrow the Object reference to a POA reference root_poa_ = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POAManager of RootPOA - poa_manager_ = root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager_ = root_poa_->the_POAManager (); } ACE_CATCHANY @@ -174,21 +170,18 @@ Server_i::create_poa (const char *name, root_poa_->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan Policy. policies_[1] = root_poa_->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Request Processing Policy. policies_[2] = root_poa_->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Servant Retention Policy. if (servant_retention_policy == 1) @@ -196,14 +189,12 @@ Server_i::create_poa (const char *name, root_poa_->create_servant_retention_policy (PortableServer::RETAIN ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (servant_retention_policy == 0) policies_[3] = root_poa_->create_servant_retention_policy (PortableServer::NON_RETAIN ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Create myPOA as the child of RootPOA with the above // policies_. myPOA will use SERVANT_ACTIVATOR or @@ -213,7 +204,6 @@ Server_i::create_poa (const char *name, poa_manager_.in (), policies_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Destroy the policy objects as they have been passed to // create_POA and no longer needed. @@ -222,8 +212,7 @@ Server_i::create_poa (const char *name, ++i) { CORBA::Policy_ptr policy = policies_[i]; - policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy->destroy (); } } ACE_CATCHANY @@ -232,7 +221,6 @@ Server_i::create_poa (const char *name, return 0; } ACE_ENDTRY; - ACE_CHECK_RETURN (PortableServer::POA::_nil ()); return my_poa; } @@ -264,7 +252,6 @@ Server_i::create_activator (PortableServer::POA_var first_poa) // // first_poa->set_servant_manager (servant_activator.in (), // ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; // Create a reference with user created ID in firstPOA which // uses the ServantActivator. The servant dll name as well as @@ -278,7 +265,6 @@ Server_i::create_activator (PortableServer::POA_var first_poa) first_test_ = first_poa->create_reference_with_id (first_test_oid.in (), "IDL:test:1.0" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { @@ -316,7 +302,6 @@ Server_i::create_locator (PortableServer::POA_var second_poa) // // second_poa->set_servant_manager (servant_locator_impl_, // ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; // Try to create a reference with user created ID in second_poa // which uses ServantLocator. The servant dll name as well as @@ -330,7 +315,6 @@ Server_i::create_locator (PortableServer::POA_var second_poa) (second_test_oid.in (), "IDL:test:1.0" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { @@ -356,12 +340,10 @@ Server_i::run (void) CORBA::String_var first_test_ior = orb_->object_to_string (first_test_.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::String_var second_test_ior = orb_->object_to_string (second_test_.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Print the ior's of first_test and second_test. @@ -377,16 +359,13 @@ Server_i::run (void) // Set the poa_manager state to active, ready to process // requests. - poa_manager_->activate (ACE_ENV_SINGLE_ARG_PARAMETER); + poa_manager_->activate (); - ACE_TRY_CHECK; // Run the ORB. - orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb_->run (); - orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb_->destroy (); } ACE_CATCHANY { @@ -394,6 +373,5 @@ Server_i::run (void) return 1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/POA_BiDir/POA_BiDir.cpp b/TAO/examples/POA/POA_BiDir/POA_BiDir.cpp index df22f01b0a9..d4ab6a6fa22 100644 --- a/TAO/examples/POA/POA_BiDir/POA_BiDir.cpp +++ b/TAO/examples/POA/POA_BiDir/POA_BiDir.cpp @@ -35,12 +35,10 @@ print_poa (PortableServer::POA_ptr poa ACE_ENV_ARG_DECL) { CORBA::String_var poa_name = - poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa->the_name (); CORBA::OctetSeq_var poa_id = - poa->id (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa->id (); ACE_DEBUG ((LM_DEBUG, "POA name = %s\n", @@ -62,8 +60,7 @@ print_poa (PortableServer::POA_ptr poa "\n")); PortableServer::POAList_var children = - poa->the_children (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + poa->the_children (); for (CORBA::ULong index = 0; index != children->length (); @@ -71,7 +68,6 @@ print_poa (PortableServer::POA_ptr poa { print_poa (children[index] ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } @@ -87,18 +83,15 @@ main (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Obtain the RootPOA. CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // _narrow() the Object to get the POA object, i.e., the root_poa. PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Policies for the new POAs CORBA::PolicyList policies (2); @@ -107,12 +100,10 @@ main (int argc, char **argv) // Threading policy policies[0] = root_poa->create_thread_policy (PortableServer::ORB_CTRL_MODEL ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Lifespan policy policies[1] = root_poa->create_lifespan_policy (PortableServer::TRANSIENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of the firstPOA ACE_CString name = "firstPOA"; @@ -121,7 +112,6 @@ main (int argc, char **argv) PortableServer::POAManager::_nil (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of the new POA, i.e. firstPOA/secondPOA name = "secondPOA"; @@ -130,7 +120,6 @@ main (int argc, char **argv) PortableServer::POAManager::_nil (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of the new POAs over, so destroy the Policy_ptr's. for (CORBA::ULong i = 0; @@ -138,8 +127,7 @@ main (int argc, char **argv) ++i) { CORBA::Policy_ptr policy = policies[i]; - policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy->destroy (); } CORBA::Any pol; @@ -151,7 +139,6 @@ main (int argc, char **argv) orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE, pol ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creating thirdPOA. @@ -162,34 +149,28 @@ main (int argc, char **argv) PortableServer::POAManager::_nil (), bidir_policy ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creation of childPOA is over. Destroy the Policy objects. for (CORBA::ULong k = 0; k < bidir_policy.length (); ++k) { - bidir_policy[k]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + bidir_policy[k]->destroy (); } // Get the names of all the POAs and print them out. CORBA::String_var root_poa_name = - root_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_name (); CORBA::String_var first_poa_name = - first_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + first_poa->the_name (); CORBA::String_var second_poa_name = - second_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + second_poa->the_name (); CORBA::String_var third_poa_name = - third_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + third_poa->the_name (); ACE_DEBUG ((LM_DEBUG, "%s\n%s\n%s\n%s\n", @@ -200,7 +181,6 @@ main (int argc, char **argv) print_poa (root_poa.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY @@ -209,7 +189,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/Reference_Counted_Servant/server.cpp b/TAO/examples/POA/Reference_Counted_Servant/server.cpp index 5c3bcb3b2b0..67defb749ba 100644 --- a/TAO/examples/POA/Reference_Counted_Servant/server.cpp +++ b/TAO/examples/POA/Reference_Counted_Servant/server.cpp @@ -116,7 +116,6 @@ main (int argc, char **argv) argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int result = parse_args (argc, argv); if (result != 0) @@ -126,18 +125,15 @@ main (int argc, char **argv) CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the POA_var object from Object_var. 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_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); // Create a servant. reference_counted_test_i *servant = 0; @@ -147,17 +143,14 @@ main (int argc, char **argv) -1); // Get Object Reference for the servant object. - test_var test = servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + test_var test = servant->_this (); // This means that the ownership of <servant> now belongs to // the POA. - servant->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + servant->_remove_ref (); // Stringyfy all the object references and print them out. CORBA::String_var ior = orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "%s\n", @@ -167,11 +160,9 @@ main (int argc, char **argv) if (write_result != 0) return write_result; - 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_CATCHANY { @@ -179,7 +170,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/RootPOA/RootPOA.cpp b/TAO/examples/POA/RootPOA/RootPOA.cpp index 687f400c6bb..6d537b36050 100644 --- a/TAO/examples/POA/RootPOA/RootPOA.cpp +++ b/TAO/examples/POA/RootPOA/RootPOA.cpp @@ -24,8 +24,8 @@ #include "ace/Log_Msg.h" -ACE_RCSID (RootPOA, - RootPOA, +ACE_RCSID (RootPOA, + RootPOA, "$Id$") int @@ -37,25 +37,21 @@ main (int argc, char **argv) { // Initilize the ORB CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Resolve the initial references for the name RootPOA thus getting // an object of type CORBA::Object. CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // apply _narrow on the object of type CORBA::Object, to make it // a POA class Object. PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Get the name of the root POA. CORBA::String_var poa_name = - root_poa->the_name (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_name (); ACE_DEBUG ((LM_DEBUG, "The RootPOA is : %s\n", @@ -65,7 +61,6 @@ main (int argc, char **argv) { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception raised"); - ACE_CHECK_RETURN (-1); } ACE_ENDTRY; diff --git a/TAO/examples/POA/TIE/client.cpp b/TAO/examples/POA/TIE/client.cpp index 9f29271ff6d..9970ffd9e87 100644 --- a/TAO/examples/POA/TIE/client.cpp +++ b/TAO/examples/POA/TIE/client.cpp @@ -117,7 +117,6 @@ public: { // Get an object reference from the argument string. CORBA::Object_var object = orb->string_to_object (IOR ACE_ENV_ARG_PARAMETER); - ACE_CHECK; /*if (ACE_ENV_SINGLE_ARG_PARAMETER.exception () != 0) { @@ -127,7 +126,6 @@ public: */ // Try to narrow the object reference to a reference. T_var test = T::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; /*if (ACE_ENV_SINGLE_ARG_PARAMETER.exception () != 0) { @@ -146,8 +144,7 @@ public: for (i = 0; i < iterations ; i++) { // Invoke the doit() method on the reference. - result = test->doit (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + result = test->doit (); } // stop the timer. @@ -179,7 +176,6 @@ main (int argc, char **argv) { // Initialize the ORB CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Initialize options based on command-line arguments. int parse_args_result = parse_args (argc, argv); @@ -191,32 +187,26 @@ main (int argc, char **argv) Test<A, A_var>::run (orb.in (), IOR[i++] ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Test<Outer::B, Outer::B_var>::run (orb.in (), IOR[i++] ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Test<Outer::Inner::C, Outer::Inner::C_var>::run (orb.in (), IOR[i++] ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Test<A, A_var>::run (orb.in (), IOR[i++] ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Test<Outer::B, Outer::B_var>::run (orb.in (), IOR[i++] ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; Test<Outer::Inner::C, Outer::Inner::C_var>::run (orb.in (), IOR[i++] ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY { @@ -224,7 +214,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/TIE/server.cpp b/TAO/examples/POA/TIE/server.cpp index 1c53b7ebb97..2387d245577 100644 --- a/TAO/examples/POA/TIE/server.cpp +++ b/TAO/examples/POA/TIE/server.cpp @@ -34,26 +34,22 @@ main (int argc, char **argv) // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Obtain the RootPOA. CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::strcpy (str, "PortableServer::POA::_narrow"); // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::strcpy (str, "PortableServer::POA::the_POAManager"); // 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 (); // Policies for the firstPOA to be created. @@ -64,13 +60,11 @@ main (int argc, char **argv) // Lifespan policy policies[0] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::strcpy (str, "PortableServer::POA::create_implicit_activation_policy"); // Implicit activation policy policies[1] = root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::strcpy (str, "PortableServer::POA::create_POA"); // Create the firstPOA under the RootPOA. @@ -80,7 +74,6 @@ main (int argc, char **argv) poa_manager.in (), policies ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_OS::strcpy (str,"PortableServer::POA::create_POA"); @@ -91,8 +84,7 @@ main (int argc, char **argv) ++i) { CORBA::Policy_ptr policy = policies[i]; - policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + policy->destroy (); } // Create A_i @@ -121,35 +113,29 @@ main (int argc, char **argv) ACE_OS::strcpy (str, "POA_A::_this"); // Get Object Reference for the a_impl object. - A_var a = a_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + A_var a = a_impl._this (); ACE_OS::strcpy (str, "POA_Outer::B::_this"); // Get Object Reference for the b_impl object. - Outer::B_var b = b_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + Outer::B_var b = b_impl._this (); ACE_OS::strcpy (str, "POA_Outer::Inner::C::_this"); // Get Object Reference for the c_impl object. - Outer::Inner::C_var c = c_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + Outer::Inner::C_var c = c_impl._this (); #if defined (ACE_HAS_USING_KEYWORD) ACE_OS::strcpy (str, "POA_A::_this"); // Get Object Reference for the a_tie_impl object. - A_var a_tie = a_tie_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + A_var a_tie = a_tie_impl._this (); ACE_OS::strcpy (str, "POA_Outer::B::_this"); // Get Object Reference for the a_tie_impl object. - Outer::B_var b_tie = b_tie_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + Outer::B_var b_tie = b_tie_impl._this (); ACE_OS::strcpy (str, "POA_Outer::C::_this"); // Get Object Reference for the c_tie_impl object. - Outer::Inner::C_var c_tie = c_tie_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + Outer::Inner::C_var c_tie = c_tie_impl._this (); #endif /* ACE_HAS_USING_KEYWORD */ @@ -157,23 +143,19 @@ main (int argc, char **argv) // Stringyfy all the object references and print them out. CORBA::String_var first_ior = orb->object_to_string (a.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Stringyfy all the object references and print them out. CORBA::String_var second_ior = orb->object_to_string (b.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Stringyfy all the object references and print them out. CORBA::String_var third_ior = orb->object_to_string (c.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; #if defined (ACE_HAS_USING_KEYWORD) // Stringyfy all the object references and print them out. CORBA::String_var forth_ior = orb->object_to_string (a_tie.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; FILE *output_file_1 = ACE_OS::fopen ("ior_1", "w"); FILE *output_file_2 = ACE_OS::fopen ("ior_2", "w"); @@ -206,13 +188,11 @@ main (int argc, char **argv) // Stringyfy all the object references and print them out. CORBA::String_var fifth_ior = orb->object_to_string (b_tie.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Stringyfy all the object references and print them out. CORBA::String_var sixth_ior = orb->object_to_string (c_tie.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; FILE *output_file_5 = ACE_OS::fopen ("ior_5", "w"); FILE *output_file_6 = ACE_OS::fopen ("ior_6", "w"); @@ -231,11 +211,9 @@ main (int argc, char **argv) #endif /* ACE_HAS_USING_KEYWORD */ - 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_CATCHANY { @@ -243,7 +221,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/POA/TIE/test_i.cpp b/TAO/examples/POA/TIE/test_i.cpp index 1fd4ecbb3ef..bc557892f28 100644 --- a/TAO/examples/POA/TIE/test_i.cpp +++ b/TAO/examples/POA/TIE/test_i.cpp @@ -31,7 +31,7 @@ Tie_i::~Tie_i (void) // Return this->value CORBA::Long -Tie_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Tie_i::doit (void) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->value_; @@ -47,7 +47,7 @@ A_i::A_i (CORBA::Long value, // Return this->value CORBA::Long -A_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +A_i::doit (void) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->value_; @@ -55,7 +55,7 @@ A_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) // Return the Default POA of this Servant PortableServer::POA_ptr -A_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +A_i::_default_POA (void) { return PortableServer::POA::_duplicate (this->poa_.in ()); } @@ -70,7 +70,7 @@ Outer_i::B_i::B_i (CORBA::Long value, // Return this->value CORBA::Long -Outer_i::B_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Outer_i::B_i::doit (void) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->value_; @@ -78,7 +78,7 @@ Outer_i::B_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) // Return the Default POA of this Servant PortableServer::POA_ptr -Outer_i::B_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Outer_i::B_i::_default_POA (void) { return PortableServer::POA::_duplicate (this->poa_.in ()); } @@ -93,7 +93,7 @@ Outer_i::Inner_i::C_i::C_i (CORBA::Long value, // Return this->value CORBA::Long -Outer_i::Inner_i::C_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Outer_i::Inner_i::C_i::doit (void) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->value_; @@ -101,7 +101,7 @@ Outer_i::Inner_i::C_i::doit (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) // Return the Default POA of this Servant PortableServer::POA_ptr -Outer_i::Inner_i::C_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Outer_i::Inner_i::C_i::_default_POA (void) { return PortableServer::POA::_duplicate (this->poa_.in ()); } diff --git a/TAO/examples/POA/TIE/test_i.h b/TAO/examples/POA/TIE/test_i.h index 0f211e53d6a..b2a456bc0bf 100644 --- a/TAO/examples/POA/TIE/test_i.h +++ b/TAO/examples/POA/TIE/test_i.h @@ -27,7 +27,7 @@ public: virtual ~Tie_i (void); // Simple doit method - virtual CORBA::Long doit (ACE_ENV_SINGLE_ARG_DECL) + virtual CORBA::Long doit (void) ACE_THROW_SPEC ((CORBA::SystemException)); protected: @@ -43,11 +43,11 @@ public: PortableServer::POA_ptr poa); // Simple doit method - virtual CORBA::Long doit (ACE_ENV_SINGLE_ARG_DECL) + virtual CORBA::Long doit (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Returns the Default POA of this Servant object - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL); + virtual PortableServer::POA_ptr _default_POA (void); protected: @@ -69,11 +69,11 @@ public: PortableServer::POA_ptr poa); // Simple doit method - virtual CORBA::Long doit (ACE_ENV_SINGLE_ARG_DECL) + virtual CORBA::Long doit (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Returns the Default POA of this Servant object - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL); + virtual PortableServer::POA_ptr _default_POA (void); protected: @@ -95,11 +95,11 @@ public: PortableServer::POA_ptr poa); // Simple doit method - virtual CORBA::Long doit (ACE_ENV_SINGLE_ARG_DECL) + virtual CORBA::Long doit (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Returns the Default POA of this Servant object - virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL); + virtual PortableServer::POA_ptr _default_POA (void); protected: |