diff options
Diffstat (limited to 'TAO/examples/Content_Server')
24 files changed, 251 insertions, 252 deletions
diff --git a/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp b/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp index 8b253015f81..a382f854632 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp +++ b/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp @@ -25,8 +25,8 @@ Content_Iterator_i::~Content_Iterator_i (void) CORBA::Boolean Content_Iterator_i::next_chunk (CORBA::ULong offset, - Web_Server::Chunk_Type_out chunk, - CORBA::Environment &) + Web_Server::Chunk_Type_out chunk + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { // Initialize/allocate the Chunk_Type sequence @@ -105,23 +105,23 @@ Content_Iterator_i::next_chunk (CORBA::ULong offset, } void -Content_Iterator_i::destroy (CORBA::Environment &ACE_TRY_ENV) +Content_Iterator_i::destroy (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { (void) this->file_io_.close (); // Get the POA used when activating the Content_Iterator object. PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); + this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Get the object ID associated with this servant. PortableServer::ObjectId_var oid = - poa->servant_to_id (this, ACE_TRY_ENV); + poa->servant_to_id (this TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Now deactivate the iterator object. - poa->deactivate_object (oid.in (), ACE_TRY_ENV); + poa->deactivate_object (oid.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Decrease the reference count on our selves. diff --git a/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.h b/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.h index 9d6792bdd6c..edf2fae0b71 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.h +++ b/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.h @@ -62,13 +62,13 @@ public: // Destructor virtual CORBA::Boolean next_chunk (CORBA::ULong offset, - Web_Server::Chunk_Type_out chunk, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Chunk_Type_out chunk + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // This operation returns the next <chunk> of the file starting at // <offset>. If there are no more bindings, false is returned. - virtual void destroy (CORBA::Environment &ACE_TRY_ENV) + virtual void destroy (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // Destroy the iterator. diff --git a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp index b6a863158de..b7bac2b09f6 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp +++ b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp @@ -11,8 +11,8 @@ ACE_RCSID (AMI_Iterator, Iterator_Factory_i, "$Id$") void Iterator_Factory_i::get_iterator (const char *pathname, Web_Server::Content_Iterator_out contents, - Web_Server::Metadata_Type_out metadata, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Metadata_Type_out metadata + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { ACE_DEBUG ((LM_DEBUG, @@ -44,7 +44,7 @@ Iterator_Factory_i::get_iterator (const char *pathname, // Activate the Content_Iterator object. Web_Server::Content_Iterator_var iterator = - iterator_servant->_this (ACE_TRY_ENV); + iterator_servant->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; Web_Server::Metadata_Type *tmp = 0; @@ -52,7 +52,7 @@ Iterator_Factory_i::get_iterator (const char *pathname, Web_Server::Metadata_Type, CORBA::NO_MEMORY ()); ACE_CHECK; - + metadata = tmp; if (this->modification_date (&file_status, diff --git a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.h b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.h index 3cd99dddc0d..71599ff6347 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.h +++ b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.h @@ -44,8 +44,8 @@ public: virtual void get_iterator (const char *pathname, Web_Server::Content_Iterator_out contents, - Web_Server::Metadata_Type_out metadata, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Metadata_Type_out metadata + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)); // This factory method returns a <Content_Iterator> that can be used diff --git a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.cpp b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.cpp index 4892f086435..46f896a5c8c 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.cpp +++ b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.cpp @@ -29,8 +29,8 @@ Iterator_Handler::~Iterator_Handler (void) void Iterator_Handler::next_chunk (CORBA::Boolean pending_data, - const Web_Server::Chunk_Type &chunk_data, - CORBA::Environment &ACE_TRY_ENV) + const Web_Server::Chunk_Type &chunk_data + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { if (pending_data) @@ -52,8 +52,8 @@ Iterator_Handler::next_chunk (CORBA::Boolean pending_data, this->offset_ += chunk->length (); this->contents_->sendc_next_chunk (this->ami_handler_.in (), - this->offset_, - ACE_TRY_ENV); + this->offset_ + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } @@ -66,8 +66,8 @@ Iterator_Handler::next_chunk (CORBA::Boolean pending_data, (*this->request_count_)--; // No more data. // Done with the iterator, so destroy it. - this->contents_->sendc_destroy (this->ami_handler_.in (), - ACE_TRY_ENV); + this->contents_->sendc_destroy (this->ami_handler_.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // File retrieval has completed, so spawn an external viewer to @@ -77,11 +77,11 @@ Iterator_Handler::next_chunk (CORBA::Boolean pending_data, } } void -Iterator_Handler::destroy (CORBA::Environment &ACE_TRY_ENV) +Iterator_Handler::destroy (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Deactivate this reply handler. - this->deactivate (ACE_TRY_ENV); + this->deactivate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } @@ -89,8 +89,8 @@ Iterator_Handler::destroy (CORBA::Environment &ACE_TRY_ENV) void Iterator_Handler::run (int *request_count, const char *pathname, - Web_Server::Iterator_Factory_ptr factory, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Iterator_Factory_ptr factory + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { @@ -101,34 +101,34 @@ Iterator_Handler::run (int *request_count, ACE_THROW (CORBA::BAD_PARAM ()); // Initialize the Content Iterator this->initialize_content_iterator (pathname, - factory, - ACE_TRY_ENV); + factory + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Activate this Reply Handler. - this->ami_handler_ = this->_this (ACE_TRY_ENV); + this->ami_handler_ = this->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Begin the asynchronous invocation. this->contents_->sendc_next_chunk (this->ami_handler_.in (), - this->offset_, - ACE_TRY_ENV); + this->offset_ + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void Iterator_Handler::initialize_content_iterator (const char *pathname, - Web_Server::Iterator_Factory_ptr factory, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Iterator_Factory_ptr factory + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { // Obtain a Content Iterator for the desired file. factory->get_iterator (pathname, this->contents_, - this->metadata_, - ACE_TRY_ENV); + this->metadata_ + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Create a temporary file to store the retrieved data. @@ -149,21 +149,21 @@ Iterator_Handler::initialize_content_iterator } void -Iterator_Handler::deactivate (CORBA::Environment &ACE_TRY_ENV) +Iterator_Handler::deactivate (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Get the POA used when activating the Reply Handler object. PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); + this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Get the object ID associated with this servant. PortableServer::ObjectId_var oid = - poa->servant_to_id (this, ACE_TRY_ENV); + poa->servant_to_id (this TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Now deactivate the iterator object. - poa->deactivate_object (oid.in (), ACE_TRY_ENV); + poa->deactivate_object (oid.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK; } diff --git a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.h b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.h index 400549e2a2c..e64986ca215 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.h +++ b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.h @@ -63,27 +63,27 @@ public: // name of the file being retrieved from the web server. virtual void next_chunk (CORBA::Boolean pending_data, - const Web_Server::Chunk_Type & chunk, - CORBA::Environment &ACE_TRY_ENV) + const Web_Server::Chunk_Type & chunk + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); virtual void next_chunk_excep ( - Web_Server::AMI_Content_IteratorExceptionHolder *, - CORBA::Environment &) + Web_Server::AMI_Content_IteratorExceptionHolder * + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) {} - virtual void destroy (CORBA::Environment &) + virtual void destroy (TAO_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)); virtual void destroy_excep ( - Web_Server::AMI_Content_IteratorExceptionHolder *, - CORBA::Environment &) + Web_Server::AMI_Content_IteratorExceptionHolder * + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) {} void run (int *request_count, const char *pathname, - Web_Server::Iterator_Factory_ptr factory, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Iterator_Factory_ptr factory + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)); // Activate and run this Reply Handler. The contents (not the @@ -97,13 +97,13 @@ private: // on the heap). void initialize_content_iterator (const char *pathname, - Web_Server::Iterator_Factory_ptr factory, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Iterator_Factory_ptr factory + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)); // Initialize the Content Iterator used to retrieve the file. - void deactivate (CORBA::Environment &ACE_TRY_ENV) + void deactivate (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // Deactivate this reply handler. diff --git a/TAO/examples/Content_Server/AMI_Iterator/client.cpp b/TAO/examples/Content_Server/AMI_Iterator/client.cpp index c92a676ecad..3ac86a85b96 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/client.cpp +++ b/TAO/examples/Content_Server/AMI_Iterator/client.cpp @@ -12,20 +12,20 @@ ACE_RCSID (AMI_Iterator, client, "$Id$") // Obtain reference to Iterator_Factory Web_Server::Iterator_Factory_ptr -get_iterator (CORBA::ORB_ptr orb, - CORBA::Environment &ACE_TRY_ENV); +get_iterator (CORBA::ORB_ptr orb + TAO_ENV_ARG_DECL); // Perform file requests void invoke_requests (int argc, char *argv[], int *request_count, - Web_Server::Iterator_Factory_ptr f, - CORBA::Environment &ACE_TRY_ENV); + Web_Server::Iterator_Factory_ptr f + TAO_ENV_ARG_DECL); int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { if (argc < 2) @@ -36,29 +36,29 @@ main (int argc, char *argv[]) // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "Mighty ORB", - ACE_TRY_ENV); + "Mighty ORB" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the Root POA. CORBA::Object_var obj = - orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = - PortableServer::POA::_narrow (obj.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Activate the POA manager. PortableServer::POAManager_var mgr = poa->the_POAManager (); - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Get an Iterator_Factory reference. Web_Server::Iterator_Factory_var factory = - ::get_iterator (orb.in (), - ACE_TRY_ENV); + ::get_iterator (orb.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (factory.in ())) @@ -79,8 +79,8 @@ main (int argc, char *argv[]) ::invoke_requests (argc, argv, &request_count, - factory.in (), - ACE_TRY_ENV); + factory.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Run the ORB event loop. @@ -88,22 +88,22 @@ main (int argc, char *argv[]) { CORBA::Boolean more_work; - more_work = orb->work_pending (ACE_TRY_ENV); + more_work = orb->work_pending (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; if (more_work) { - orb->perform_work (ACE_TRY_ENV); + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } else ACE_OS::sleep (tv); } - orb->shutdown (0, ACE_TRY_ENV); + orb->shutdown (0 TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCH (Web_Server::Error_Result, exc) @@ -130,20 +130,20 @@ main (int argc, char *argv[]) } Web_Server::Iterator_Factory_ptr -get_iterator (CORBA::ORB_ptr o, - CORBA::Environment &ACE_TRY_ENV) +get_iterator (CORBA::ORB_ptr o + TAO_ENV_ARG_DECL) { CORBA::ORB_var orb = CORBA::ORB::_duplicate (o); // Get a reference to the Name Service. CORBA::Object_var obj = - orb->resolve_initial_references ("NameService", - ACE_TRY_ENV); + orb->resolve_initial_references ("NameService" + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ()); // Narrow to a Naming Context CosNaming::NamingContext_var nc = - CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + CosNaming::NamingContext::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ()); if (CORBA::is_nil (obj.in ())) @@ -159,7 +159,7 @@ get_iterator (CORBA::ORB_ptr o, name[0].id = CORBA::string_dup ("Iterator_Factory"); name[0].kind = CORBA::string_dup (""); - obj = nc->resolve (name, ACE_TRY_ENV); + obj = nc->resolve (name TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ()); Web_Server::Iterator_Factory_ptr factory = @@ -171,8 +171,8 @@ get_iterator (CORBA::ORB_ptr o, void invoke_requests (int argc, char *argv[], int *request_count, - Web_Server::Iterator_Factory_ptr f, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Iterator_Factory_ptr f + TAO_ENV_ARG_DECL) { Web_Server::Iterator_Factory_var factory = Web_Server::Iterator_Factory::_duplicate (f); @@ -194,8 +194,8 @@ void invoke_requests (int argc, // This ends up being an AMI call, so it won't block. handler->run (request_count, argv[i + 1], - factory.in (), - ACE_TRY_ENV); + factory.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } } diff --git a/TAO/examples/Content_Server/AMI_Iterator/server.cpp b/TAO/examples/Content_Server/AMI_Iterator/server.cpp index 3db1745290b..c711edf8594 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/server.cpp +++ b/TAO/examples/Content_Server/AMI_Iterator/server.cpp @@ -13,46 +13,46 @@ ACE_RCSID (AMI_Iterator, server, "$Id$") int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "Mighty ORB", - ACE_TRY_ENV); + "Mighty ORB" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the Root POA. CORBA::Object_var obj = - orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = - PortableServer::POA::_narrow (obj.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Activate the POA manager. PortableServer::POAManager_var mgr = poa->the_POAManager (); - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Create the Iterator_Factory servant and object. // It activates and deactivates the Content_Iterator object. Iterator_Factory_i factory_servant; Web_Server::Iterator_Factory_var factory = - factory_servant._this (ACE_TRY_ENV); + factory_servant._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Get a reference to the Name Service. - obj = orb->resolve_initial_references ("NameService", - ACE_TRY_ENV); + obj = orb->resolve_initial_references ("NameService" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Narrow to a Naming Context CosNaming::NamingContext_var nc = - CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + CosNaming::NamingContext::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Create a name. @@ -61,12 +61,12 @@ main (int argc, char *argv[]) name[0].id = CORBA::string_dup ("Iterator_Factory"); name[0].kind = CORBA::string_dup (""); - nc->bind (name, factory.in (), ACE_TRY_ENV); + nc->bind (name, factory.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Some debugging output. - CORBA::String_var IOR = orb->object_to_string (factory.in (), - ACE_TRY_ENV); + CORBA::String_var IOR = orb->object_to_string (factory.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Bound <%s> to <%s> in Name Service.\n"), @@ -77,7 +77,7 @@ main (int argc, char *argv[]) ACE_TEXT ("Accepting requests.\n"))); // Accept requests. - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp index 0ecfbdf5dbb..61774035f58 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp @@ -28,12 +28,12 @@ Callback_Handler::~Callback_Handler (void) } void -Callback_Handler::next_chunk (CORBA::Environment &ACE_TRY_ENV) +Callback_Handler::next_chunk (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { if (this->last_chunk_ == 1) { - this->deactivate (ACE_TRY_ENV); + this->deactivate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; return; @@ -79,26 +79,26 @@ Callback_Handler::next_chunk (CORBA::Environment &ACE_TRY_ENV) this->callback_->sendc_next_chunk (this->ami_handler_.in (), this->chunk_.in (), - this->last_chunk_, - ACE_TRY_ENV); + this->last_chunk_ + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void Callback_Handler::next_chunk_excep - (Web_Server::AMI_CallbackExceptionHolder *excep_holder, - CORBA::Environment &) + (Web_Server::AMI_CallbackExceptionHolder *excep_holder + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { this->last_chunk_ = 1; - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { - this->deactivate (ACE_TRY_ENV); + this->deactivate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - excep_holder->raise_next_chunk (ACE_TRY_ENV); + excep_holder->raise_next_chunk (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -111,27 +111,27 @@ Callback_Handler::next_chunk_excep } void -Callback_Handler::run (CORBA::Environment &ACE_TRY_ENV) +Callback_Handler::run (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { // Open the file to be downloaded - this->open_file (ACE_TRY_ENV); + this->open_file (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Activate this Reply Handler. - this->ami_handler_ = this->_this (ACE_TRY_ENV); + this->ami_handler_ = this->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Begin the asynchronous invocation. Note that the AMI // "sendc_next_chunk()" call is done within the following call, // since data must first be read into the Chunk. - this->next_chunk (ACE_TRY_ENV); + this->next_chunk (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } void -Callback_Handler::open_file (CORBA::Environment &ACE_TRY_ENV) +Callback_Handler::open_file (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { @@ -149,23 +149,23 @@ Callback_Handler::open_file (CORBA::Environment &ACE_TRY_ENV) } void -Callback_Handler::deactivate (CORBA::Environment &ACE_TRY_ENV) +Callback_Handler::deactivate (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Close the file that was sent to the client. (void) this->file_io_.close (); // Get the POA used when activating the Reply Handler object. - PortableServer::POA_var poa = this->_default_POA (ACE_TRY_ENV); + PortableServer::POA_var poa = this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Get the object ID associated with this servant. PortableServer::ObjectId_var oid = - poa->servant_to_id (this, - ACE_TRY_ENV); + poa->servant_to_id (this + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Now deactivate the AMI_CallbackHandler object. - poa->deactivate_object (oid.in (), ACE_TRY_ENV); + poa->deactivate_object (oid.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK; } diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h index 01b8aadacd5..fe87b50c854 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h +++ b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h @@ -87,15 +87,15 @@ public: // Constructor that creates a content iterator corresponding to the // name of the file being retrieved from the web server. - virtual void next_chunk (CORBA::Environment &ACE_TRY_ENV) + virtual void next_chunk (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // The callback for this reply handler. - virtual void next_chunk_excep (Web_Server::AMI_CallbackExceptionHolder *, - CORBA::Environment &) + virtual void next_chunk_excep (Web_Server::AMI_CallbackExceptionHolder * + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)); - void run (CORBA::Environment &ACE_TRY_ENV) + void run (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)); // Activate and run this Reply Handler. The contents (not the @@ -108,12 +108,12 @@ private: // Destructor (private to ensure that Callback_Handler is allocated // on the heap). - void open_file (CORBA::Environment &ACE_TRY_ENV) + void open_file (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)); // Open the file to be uploaded to the client callback. - void deactivate (CORBA::Environment &ACE_TRY_ENV) + void deactivate (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // Deactivate this reply handler. diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp b/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp index 1c379a57417..a6299288c56 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp @@ -46,8 +46,8 @@ Callback_i::~Callback_i (void) void Callback_i::next_chunk (const Web_Server::Chunk_Type & chunk_data, - CORBA::Boolean last_chunk, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Boolean last_chunk + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { if (!last_chunk) @@ -93,7 +93,7 @@ Callback_i::next_chunk (const Web_Server::Chunk_Type & chunk_data, if (this->metadata_received ()) { (void) this->file_io_.close (); - this->deactivate (ACE_TRY_ENV); + this->deactivate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; (void) this->spawn_viewer (); @@ -104,7 +104,7 @@ Callback_i::next_chunk (const Web_Server::Chunk_Type & chunk_data, void Callback_i::metadata (const Web_Server::Metadata_Type &metadata) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { { @@ -126,7 +126,7 @@ Callback_i::metadata (const Web_Server::Metadata_Type &metadata) // an external viewer to display it. if (this->content_received ()) { - this->deactivate (ACE_TRY_ENV); + this->deactivate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; (void) this->spawn_viewer (); @@ -273,19 +273,19 @@ Callback_i::spawn_viewer (void) } void -Callback_i::deactivate (CORBA::Environment &ACE_TRY_ENV) +Callback_i::deactivate (TAO_ENV_SINGLE_ARG_DECL) { // Get the POA used when activating the Reply Handler object. - PortableServer::POA_var poa = this->_default_POA (ACE_TRY_ENV); + PortableServer::POA_var poa = this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Get the object ID associated with this servant. PortableServer::ObjectId_var oid = - poa->servant_to_id (this, - ACE_TRY_ENV); + poa->servant_to_id (this + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Now deactivate the iterator object. - poa->deactivate_object (oid.in (), ACE_TRY_ENV); + poa->deactivate_object (oid.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK; } diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback_i.h b/TAO/examples/Content_Server/AMI_Observer/Callback_i.h index 1a14d9ae55e..7a9ea118094 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback_i.h +++ b/TAO/examples/Content_Server/AMI_Observer/Callback_i.h @@ -71,8 +71,8 @@ public: // Constructor virtual void next_chunk (const Web_Server::Chunk_Type &chunk, - CORBA::Boolean last_chunk, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Boolean last_chunk + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // This operation returns the next <chunk> of the file starting at // <offset>. If there are no more bindings, false is returned. @@ -102,7 +102,7 @@ private: private: - void deactivate (CORBA::Environment &ACE_TRY_ENV); + void deactivate (TAO_ENV_SINGLE_ARG_DECL); // Deactivate this Callback servant. private: diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp index 3ebf7564bfd..aa7b3e0e064 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp @@ -11,8 +11,8 @@ ACE_RCSID (AMI_Observer, Push_Iterator_Factory_i, "$Id$") Web_Server::Metadata_Type * Push_Iterator_Factory_i::register_callback (const char *pathname, - Web_Server::Callback_ptr client_callback, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Callback_ptr client_callback + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { if (CORBA::is_nil (client_callback)) // @@ Will it ever be nil? @@ -43,7 +43,7 @@ Push_Iterator_Factory_i::register_callback PortableServer::ServantBase_var tmp (handler); // Start sending data to the client callback object. - handler->run (ACE_TRY_ENV); + handler->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); ACE_stat file_status; diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.h b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.h index 22f193e940a..ee2d114c915 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.h +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.h @@ -52,8 +52,8 @@ class Push_Iterator_Factory_i : public: Web_Server::Metadata_Type *register_callback (const char *pathname, - Web_Server::Callback_ptr client_callback, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Callback_ptr client_callback + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)); // This registration method passes a <Callback> that the Web server diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp index 4cf2a709de5..f2b0cee21e2 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp @@ -25,22 +25,22 @@ Push_Iterator_Handler::~Push_Iterator_Handler (void) void Push_Iterator_Handler::register_callback - (const Web_Server::Metadata_Type &metadata, - CORBA::Environment &ACE_TRY_ENV) + (const Web_Server::Metadata_Type &metadata + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { this->callback_servant_->metadata (metadata); // This handler is no longer needed, so deactivate it. - this->deactivate (ACE_TRY_ENV); + this->deactivate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } void Push_Iterator_Handler::run (int *request_count, const char *pathname, - Web_Server::Iterator_Factory_ptr factory, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Iterator_Factory_ptr factory + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { @@ -54,37 +54,37 @@ Push_Iterator_Handler::run (int *request_count, // Activate the Callback. this->callback_ = - this->callback_servant_->_this (ACE_TRY_ENV); + this->callback_servant_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Activate this Reply Handler. this->ami_handler_ = - this->_this (ACE_TRY_ENV); + this->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Register the client callback with the server asynchronously. factory->sendc_register_callback (this->ami_handler_.in (), pathname, - this->callback_.in (), - ACE_TRY_ENV); + this->callback_.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Push_Iterator_Handler::deactivate (CORBA::Environment &ACE_TRY_ENV) +Push_Iterator_Handler::deactivate (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Get the POA used when activating the Reply Handler object. - PortableServer::POA_var poa = this->_default_POA (ACE_TRY_ENV); + PortableServer::POA_var poa = this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Get the object ID associated with this servant. PortableServer::ObjectId_var oid = - poa->servant_to_id (this, - ACE_TRY_ENV); + poa->servant_to_id (this + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Now deactivate the AMI_CallbackHandler object. - poa->deactivate_object (oid.in (), ACE_TRY_ENV); + poa->deactivate_object (oid.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK; } diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h index 0f2ca884e16..caa91026a62 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h @@ -72,8 +72,8 @@ public: void run (int *request_count, const char *pathname, - Web_Server::Iterator_Factory_ptr factory, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Iterator_Factory_ptr factory + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)); // Activate and run this Reply Handler. The contents (not the @@ -88,18 +88,18 @@ private: // on the heap). virtual void register_callback - (const Web_Server::Metadata_Type &metadata, - CORBA::Environment &ACE_TRY_ENV) + (const Web_Server::Metadata_Type &metadata + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // AMI callback that is invoked when a response from the // corresponding server method is received. virtual void register_callback_excep - (Web_Server::AMI_Iterator_FactoryExceptionHolder *, - CORBA::Environment &) + (Web_Server::AMI_Iterator_FactoryExceptionHolder * + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) {} - void deactivate (CORBA::Environment &ACE_TRY_ENV) + void deactivate (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // Deactivate this handler. diff --git a/TAO/examples/Content_Server/AMI_Observer/client.cpp b/TAO/examples/Content_Server/AMI_Observer/client.cpp index 8c1df79a463..306a86b7910 100644 --- a/TAO/examples/Content_Server/AMI_Observer/client.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/client.cpp @@ -12,20 +12,20 @@ ACE_RCSID (AMI_Observer, client, "$Id$") // Obtain reference to Iterator_Factory Web_Server::Iterator_Factory_ptr -get_iterator (CORBA::ORB_ptr orb, - CORBA::Environment &ACE_TRY_ENV); +get_iterator (CORBA::ORB_ptr orb + TAO_ENV_ARG_DECL); // Perform file requests void invoke_requests (int argc, char *argv[], int *request_count, - Web_Server::Iterator_Factory_ptr f, - CORBA::Environment &ACE_TRY_ENV); + Web_Server::Iterator_Factory_ptr f + TAO_ENV_ARG_DECL); int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { if (argc < 2) @@ -37,29 +37,29 @@ main (int argc, char *argv[]) // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "Mighty ORB", - ACE_TRY_ENV); + "Mighty ORB" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the Root POA. CORBA::Object_var obj = - orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = - PortableServer::POA::_narrow (obj.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Activate the POA manager. PortableServer::POAManager_var mgr = poa->the_POAManager (); - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Get an Iterator_Factory reference. Web_Server::Iterator_Factory_var factory = - ::get_iterator (orb.in (), - ACE_TRY_ENV); + ::get_iterator (orb.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (factory.in ())) @@ -80,8 +80,8 @@ main (int argc, char *argv[]) ::invoke_requests (argc, argv, &request_count, - factory.in (), - ACE_TRY_ENV); + factory.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // 1 millisecond delay to reduce "busy waiting" in ORB event @@ -93,22 +93,22 @@ main (int argc, char *argv[]) { CORBA::Boolean more_work; - more_work = orb->work_pending (ACE_TRY_ENV); + more_work = orb->work_pending (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; if (more_work) { - orb->perform_work (ACE_TRY_ENV); + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } else ACE_OS::sleep (tv); } - orb->shutdown (0, ACE_TRY_ENV); + orb->shutdown (0 TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - //orb->destroy (ACE_TRY_ENV); + //orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); //ACE_TRY_CHECK; } ACE_CATCH (Web_Server::Error_Result, exc) @@ -135,20 +135,20 @@ main (int argc, char *argv[]) } Web_Server::Iterator_Factory_ptr -get_iterator (CORBA::ORB_ptr o, - CORBA::Environment &ACE_TRY_ENV) +get_iterator (CORBA::ORB_ptr o + TAO_ENV_ARG_DECL) { CORBA::ORB_var orb = CORBA::ORB::_duplicate (o); // Get a reference to the Name Service. CORBA::Object_var obj = - orb->resolve_initial_references ("NameService", - ACE_TRY_ENV); + orb->resolve_initial_references ("NameService" + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ()); // Narrow to a Naming Context CosNaming::NamingContext_var nc = - CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + CosNaming::NamingContext::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ()); if (CORBA::is_nil (obj.in ())) @@ -164,7 +164,7 @@ get_iterator (CORBA::ORB_ptr o, name[0].id = CORBA::string_dup ("Push_Iterator_Factory"); name[0].kind = CORBA::string_dup (""); - obj = nc->resolve (name, ACE_TRY_ENV); + obj = nc->resolve (name TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ()); Web_Server::Iterator_Factory_ptr factory = @@ -176,8 +176,8 @@ get_iterator (CORBA::ORB_ptr o, void invoke_requests (int argc, char *argv[], int *request_count, - Web_Server::Iterator_Factory_ptr f, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Iterator_Factory_ptr f + TAO_ENV_ARG_DECL) { Web_Server::Iterator_Factory_var factory = Web_Server::Iterator_Factory::_duplicate (f); @@ -199,8 +199,8 @@ void invoke_requests (int argc, // This ends up being an AMI call, so it won't block. handler->run (request_count, argv[i + 1], - factory.in (), - ACE_TRY_ENV); + factory.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } } diff --git a/TAO/examples/Content_Server/AMI_Observer/server.cpp b/TAO/examples/Content_Server/AMI_Observer/server.cpp index 501b2db71d9..5a59ffd5e91 100644 --- a/TAO/examples/Content_Server/AMI_Observer/server.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/server.cpp @@ -12,45 +12,45 @@ ACE_RCSID (AMI_Observer, server, "$Id$") int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "Mighty ORB", - ACE_TRY_ENV); + "Mighty ORB" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the Root POA. CORBA::Object_var obj = - orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = - PortableServer::POA::_narrow (obj.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Activate the POA manager. PortableServer::POAManager_var mgr = poa->the_POAManager (); - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Create the Iterator_Factory servant and object. Push_Iterator_Factory_i factory_servant; Web_Server::Iterator_Factory_var factory = - factory_servant._this (ACE_TRY_ENV); + factory_servant._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Get a reference to the Name Service. - obj = orb->resolve_initial_references ("NameService", - ACE_TRY_ENV); + obj = orb->resolve_initial_references ("NameService" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Narrow to a Naming Context CosNaming::NamingContext_var nc = - CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + CosNaming::NamingContext::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Create a name. @@ -59,12 +59,12 @@ main (int argc, char *argv[]) name[0].id = CORBA::string_dup ("Push_Iterator_Factory"); name[0].kind = CORBA::string_dup (""); - nc->bind (name, factory.in (), ACE_TRY_ENV); + nc->bind (name, factory.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Some debugging output. - CORBA::String_var IOR = orb->object_to_string (factory.in (), - ACE_TRY_ENV); + CORBA::String_var IOR = orb->object_to_string (factory.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Bound <%s> to <%s> in Name Service.\n"), @@ -75,7 +75,7 @@ main (int argc, char *argv[]) ACE_TEXT ("Accepting requests.\n"))); // Accept requests. - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp b/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp index 428cf5cee73..ffa637debb2 100644 --- a/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp +++ b/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp @@ -26,8 +26,8 @@ Content_Iterator_i::~Content_Iterator_i (void) CORBA::Boolean Content_Iterator_i::next_chunk (CORBA::ULong offset, - Web_Server::Chunk_Type_out chunk, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Chunk_Type_out chunk + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Initialize/allocate the Chunk_Type sequence @@ -117,23 +117,23 @@ Content_Iterator_i::next_chunk (CORBA::ULong offset, } void -Content_Iterator_i::destroy (CORBA::Environment &ACE_TRY_ENV) +Content_Iterator_i::destroy (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { (void) this->file_io_.close (); // Get the POA used when activating the Content_Iterator object. - PortableServer::POA_var poa = this->_default_POA (ACE_TRY_ENV); + PortableServer::POA_var poa = this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Get the object ID associated with this servant. - PortableServer::ObjectId_var oid = poa->servant_to_id (this, - ACE_TRY_ENV); + PortableServer::ObjectId_var oid = poa->servant_to_id (this + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Now deactivate the iterator object. - poa->deactivate_object (oid.in (), ACE_TRY_ENV); + poa->deactivate_object (oid.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Decrease the reference count on our selves. diff --git a/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.h b/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.h index 849125f546d..09bbfa3ddc0 100644 --- a/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.h +++ b/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.h @@ -62,13 +62,13 @@ public: // Destructor virtual CORBA::Boolean next_chunk (CORBA::ULong offset, - Web_Server::Chunk_Type_out chunk, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Chunk_Type_out chunk + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // This operation returns the next <chunk> of the file starting at // <offset>. If there are no more bindings, false is returned. - virtual void destroy (CORBA::Environment &ACE_TRY_ENV) + virtual void destroy (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); // Destroy the iterator. diff --git a/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp b/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp index b5e6f2dbc8c..4257ddb5581 100644 --- a/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp +++ b/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp @@ -11,8 +11,8 @@ ACE_RCSID (SMI_Iterator, Iterator_Factory_i, "$Id$") void Iterator_Factory_i::get_iterator (const char *pathname, Web_Server::Content_Iterator_out contents, - Web_Server::Metadata_Type_out metadata, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Metadata_Type_out metadata + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { ACE_DEBUG ((LM_DEBUG, @@ -50,7 +50,7 @@ Iterator_Factory_i::get_iterator (const char *pathname, // Activate the Content_Iterator object. Web_Server::Content_Iterator_var iterator = - iterator_servant->_this (ACE_TRY_ENV); + iterator_servant->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; Web_Server::Metadata_Type *tmp = 0; diff --git a/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.h b/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.h index 8a7dbb7dffb..adad7bc5b1e 100644 --- a/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.h +++ b/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.h @@ -46,9 +46,8 @@ public: virtual void get_iterator (const char *pathname, Web_Server::Content_Iterator_out contents, - Web_Server::Metadata_Type_out metadata, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()) + Web_Server::Metadata_Type_out metadata + TAO_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)); // This factory method returns a <Content_Iterator> that can be used diff --git a/TAO/examples/Content_Server/SMI_Iterator/client.cpp b/TAO/examples/Content_Server/SMI_Iterator/client.cpp index 67867bf4035..c6c3e47d613 100644 --- a/TAO/examples/Content_Server/SMI_Iterator/client.cpp +++ b/TAO/examples/Content_Server/SMI_Iterator/client.cpp @@ -13,8 +13,8 @@ ACE_RCSID(SMI_Iterator, client, "$Id$") // Retrieve the data from the server int retrieve_data (const char *content_type, - Web_Server::Content_Iterator_ptr contents, - CORBA::Environment &ACE_TRY_ENV); + Web_Server::Content_Iterator_ptr contents + TAO_ENV_ARG_DECL); // Map content type to viewer. @@ -29,7 +29,7 @@ int spawn_viewer (const char *content_type, int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { if (argc < 2) @@ -40,19 +40,19 @@ main (int argc, char *argv[]) // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "Mighty ORB", - ACE_TRY_ENV); + "Mighty ORB" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get a reference to the Name Service. CORBA::Object_var obj = - orb->resolve_initial_references ("NameService", - ACE_TRY_ENV); + orb->resolve_initial_references ("NameService" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Narrow to a Naming Context CosNaming::NamingContext_var nc = - CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + CosNaming::NamingContext::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (obj.in ())) @@ -69,7 +69,7 @@ main (int argc, char *argv[]) name[0].id = CORBA::string_dup ("Iterator_Factory"); name[0].kind = CORBA::string_dup (""); - obj = nc->resolve (name, ACE_TRY_ENV); + obj = nc->resolve (name TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Now narrow to an Iterator_Factory reference. @@ -92,8 +92,8 @@ main (int argc, char *argv[]) Web_Server::Metadata_Type_var metadata; factory->get_iterator (pathname, contents, - metadata, - ACE_TRY_ENV); + metadata + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_INFO, @@ -106,21 +106,21 @@ main (int argc, char *argv[]) metadata->content_type.in ())); int result = ::retrieve_data (metadata->content_type.in (), - contents.in (), - ACE_TRY_ENV); + contents.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return -1; // Done with the Content_Iterator, so destroy it. - contents->destroy (ACE_TRY_ENV); + contents->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - orb->shutdown (0, ACE_TRY_ENV); + orb->shutdown (0 TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - // orb->destroy (ACE_TRY_ENV); + // orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); // ACE_TRY_CHECK; } ACE_CATCH (Web_Server::Error_Result, exc) @@ -148,8 +148,8 @@ main (int argc, char *argv[]) int retrieve_data (const char *content_type, - Web_Server::Content_Iterator_ptr iterator, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Content_Iterator_ptr iterator + TAO_ENV_ARG_DECL) { Web_Server::Content_Iterator_var contents = Web_Server::Content_Iterator::_duplicate (iterator); @@ -179,7 +179,7 @@ int retrieve_data (const char *content_type, for (;;) { - rc = contents->next_chunk (offset, chunk, ACE_TRY_ENV); + rc = contents->next_chunk (offset, chunk TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (!rc) diff --git a/TAO/examples/Content_Server/SMI_Iterator/server.cpp b/TAO/examples/Content_Server/SMI_Iterator/server.cpp index 63ec2db16cf..0ff14a044c1 100644 --- a/TAO/examples/Content_Server/SMI_Iterator/server.cpp +++ b/TAO/examples/Content_Server/SMI_Iterator/server.cpp @@ -13,46 +13,46 @@ ACE_RCSID(SMI_Iterator, server, "$Id$") int main (int argc, char *argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - "Mighty ORB", - ACE_TRY_ENV); + "Mighty ORB" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the Root POA. CORBA::Object_var obj = - orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = - PortableServer::POA::_narrow (obj.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Activate the POA manager. PortableServer::POAManager_var mgr = poa->the_POAManager (); - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Create the Iterator_Factory servant and object. // It activates and deactivates the Content_Iterator object. Iterator_Factory_i factory_servant; Web_Server::Iterator_Factory_var factory = - factory_servant._this (ACE_TRY_ENV); + factory_servant._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Get a reference to the Name Service. - obj = orb->resolve_initial_references ("NameService", - ACE_TRY_ENV); + obj = orb->resolve_initial_references ("NameService" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Narrow to a Naming Context CosNaming::NamingContext_var nc; - nc = CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + nc = CosNaming::NamingContext::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Create a name. @@ -61,12 +61,12 @@ main (int argc, char *argv[]) name[0].id = CORBA::string_dup ("Iterator_Factory"); name[0].kind = CORBA::string_dup (""); - nc->bind (name, factory.in (), ACE_TRY_ENV); + nc->bind (name, factory.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Some debugging output. - CORBA::String_var IOR = orb->object_to_string (factory.in (), - ACE_TRY_ENV); + CORBA::String_var IOR = orb->object_to_string (factory.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Bound <%s> to <%s> in Name Service.\n"), @@ -77,7 +77,7 @@ main (int argc, char *argv[]) ACE_TEXT ("Accepting requests.\n"))); // Accept requests. - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY |