summaryrefslogtreecommitdiff
path: root/TAO/examples/Content_Server
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-01-24 15:39:09 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-01-24 15:39:09 +0000
commitc801f87e59c00f72bdeb5ce7bd0d276674665bac (patch)
tree70bff03d1cf156ecf05ee4c5c338d8ce423e64ee /TAO/examples/Content_Server
parent98c0b37d4714ff774fc3ada8c9ee893c719af714 (diff)
downloadATCD-c801f87e59c00f72bdeb5ce7bd0d276674665bac.tar.gz
Wed Jan 24 14:00:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/examples/Content_Server')
-rw-r--r--TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp10
-rw-r--r--TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.h2
-rw-r--r--TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp5
-rw-r--r--TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.cpp20
-rw-r--r--TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.h4
-rw-r--r--TAO/examples/Content_Server/AMI_Iterator/client.cpp23
-rw-r--r--TAO/examples/Content_Server/AMI_Iterator/server.cpp20
-rw-r--r--TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp32
-rw-r--r--TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h8
-rw-r--r--TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp13
-rw-r--r--TAO/examples/Content_Server/AMI_Observer/Callback_i.h2
-rw-r--r--TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp5
-rw-r--r--TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp18
-rw-r--r--TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h2
-rw-r--r--TAO/examples/Content_Server/AMI_Observer/client.cpp23
-rw-r--r--TAO/examples/Content_Server/AMI_Observer/server.cpp20
-rw-r--r--TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp11
-rw-r--r--TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.h2
-rw-r--r--TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp5
-rw-r--r--TAO/examples/Content_Server/SMI_Iterator/client.cpp14
-rw-r--r--TAO/examples/Content_Server/SMI_Iterator/server.cpp20
21 files changed, 69 insertions, 190 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 95aa978da82..bca599a7b34 100644
--- a/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp
+++ b/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.cpp
@@ -106,28 +106,24 @@ Content_Iterator_i::next_chunk (CORBA::ULongLong offset,
}
void
-Content_Iterator_i::destroy (ACE_ENV_SINGLE_ARG_DECL)
+Content_Iterator_i::destroy (void)
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_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->_default_POA ();
// Get the object ID associated with this servant.
PortableServer::ObjectId_var oid =
poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Now deactivate the iterator object.
poa->deactivate_object (oid.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Decrease the reference count on our selves.
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->_remove_ref ();
}
int
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 4bf25d1a660..0c4662a8bea 100644
--- a/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.h
+++ b/TAO/examples/Content_Server/AMI_Iterator/Content_Iterator_i.h
@@ -58,7 +58,7 @@ public:
// This operation returns the next <chunk> of the file starting at
// <offset>. If there are no more bindings, false is returned.
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
+ virtual void destroy (void)
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 214b818cfd3..cf838b5cf04 100644
--- a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp
+++ b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Factory_i.cpp
@@ -36,7 +36,6 @@ Iterator_Factory_i::get_iterator (const char *pathname,
Content_Iterator_i (pathname,
file_status.st_size),
CORBA::NO_MEMORY ());
- ACE_CHECK;
if (iterator_servant->init () != 0)
{
@@ -51,14 +50,12 @@ Iterator_Factory_i::get_iterator (const char *pathname,
// Activate the Content_Iterator object.
Web_Server::Content_Iterator_var iterator =
- iterator_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ iterator_servant->_this ();
Web_Server::Metadata_Type *tmp = 0;
ACE_NEW_THROW_EX (tmp,
Web_Server::Metadata_Type,
CORBA::NO_MEMORY ());
- ACE_CHECK;
metadata = tmp;
diff --git a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.cpp b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.cpp
index 85f0cdd68fb..5459b383a4a 100644
--- a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.cpp
+++ b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.cpp
@@ -60,7 +60,6 @@ Iterator_Handler::next_chunk (CORBA::Boolean pending_data,
this->contents_->sendc_next_chunk (this->ami_handler_.in (),
this->offset_
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
else
@@ -74,7 +73,6 @@ Iterator_Handler::next_chunk (CORBA::Boolean pending_data,
// Done with the iterator, so destroy it.
this->contents_->sendc_destroy (this->ami_handler_.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// File retrieval has completed, so spawn an external viewer to
// display its contents.
@@ -83,12 +81,11 @@ Iterator_Handler::next_chunk (CORBA::Boolean pending_data,
}
}
void
-Iterator_Handler::destroy (ACE_ENV_SINGLE_ARG_DECL)
+Iterator_Handler::destroy (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Deactivate this reply handler.
- this->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->deactivate ();
}
@@ -109,17 +106,14 @@ Iterator_Handler::run (int *request_count,
this->initialize_content_iterator (pathname,
factory
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Activate this Reply Handler.
- this->ami_handler_ = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->ami_handler_ = this->_this ();
// Begin the asynchronous invocation.
this->contents_->sendc_next_chunk (this->ami_handler_.in (),
this->offset_
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
void
@@ -135,7 +129,6 @@ Iterator_Handler::initialize_content_iterator
this->contents_,
this->metadata_
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Create a temporary file to store the retrieved data.
ACE_FILE_Connector connector;
@@ -155,22 +148,19 @@ Iterator_Handler::initialize_content_iterator
}
void
-Iterator_Handler::deactivate (ACE_ENV_SINGLE_ARG_DECL)
+Iterator_Handler::deactivate (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Get the POA used when activating the Reply Handler object.
PortableServer::POA_var poa =
- this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->_default_POA ();
// Get the object ID associated with this servant.
PortableServer::ObjectId_var oid =
poa->servant_to_id (this ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Now deactivate the iterator object.
poa->deactivate_object (oid.in () ACE_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 2f65d26faab..18a3fe780c6 100644
--- a/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.h
+++ b/TAO/examples/Content_Server/AMI_Iterator/Iterator_Handler.h
@@ -62,7 +62,7 @@ public:
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException)) {}
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ virtual void destroy (void)
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void destroy_excep (
@@ -93,7 +93,7 @@ private:
Web_Server::Error_Result));
// Initialize the Content Iterator used to retrieve the file.
- void deactivate (ACE_ENV_SINGLE_ARG_DECL)
+ void deactivate (void)
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 4f4368cca67..0eb4957a1ab 100644
--- a/TAO/examples/Content_Server/AMI_Iterator/client.cpp
+++ b/TAO/examples/Content_Server/AMI_Iterator/client.cpp
@@ -41,28 +41,23 @@ main (int argc, char *argv[])
argv,
"Mighty ORB"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Get the Root POA.
CORBA::Object_var obj =
orb->resolve_initial_references ("RootPOA"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var poa =
PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Activate the POA manager.
PortableServer::POAManager_var mgr = poa->the_POAManager ();
- mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ mgr->activate ();
// Get an Iterator_Factory reference.
Web_Server::Iterator_Factory_var factory =
::get_iterator (orb.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (CORBA::is_nil (factory.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -84,30 +79,25 @@ main (int argc, char *argv[])
&request_count,
factory.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Run the ORB event loop.
while (request_count > 0)
{
CORBA::Boolean more_work;
- more_work = orb->work_pending (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ more_work = orb->work_pending ();
if (more_work)
{
- orb->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->perform_work ();
}
else
ACE_OS::sleep (tv);
}
orb->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->destroy ();
}
ACE_CATCH (Web_Server::Error_Result, exc)
{
@@ -142,12 +132,10 @@ get_iterator (CORBA::ORB_ptr o
CORBA::Object_var obj =
orb->resolve_initial_references ("NameService"
ACE_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_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ());
if (CORBA::is_nil (obj.in ()))
{
@@ -163,7 +151,6 @@ get_iterator (CORBA::ORB_ptr o
name[0].kind = CORBA::string_dup ("");
obj = nc->resolve (name ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ());
Web_Server::Iterator_Factory_ptr factory =
Web_Server::Iterator_Factory::_narrow (obj.in ());
@@ -189,7 +176,6 @@ void invoke_requests (int argc,
ACE_NEW_THROW_EX (handler,
Iterator_Handler,
CORBA::NO_MEMORY ());
- ACE_CHECK;
// Transfer ownership to the POA.
PortableServer::ServantBase_var tmp (handler);
@@ -199,6 +185,5 @@ void invoke_requests (int argc,
argv[i + 1],
factory.in ()
ACE_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 a1c2d6de7e5..d10a5183eb3 100644
--- a/TAO/examples/Content_Server/AMI_Iterator/server.cpp
+++ b/TAO/examples/Content_Server/AMI_Iterator/server.cpp
@@ -8,8 +8,8 @@
#include "Iterator_Factory_i.h"
-ACE_RCSID (AMI_Iterator,
- server,
+ACE_RCSID (AMI_Iterator,
+ server,
"$Id$")
int
@@ -23,39 +23,32 @@ main (int argc, char *argv[])
argv,
"Mighty ORB"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Get the Root POA.
CORBA::Object_var obj =
orb->resolve_initial_references ("RootPOA"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var poa =
PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Activate the POA manager.
PortableServer::POAManager_var mgr = poa->the_POAManager ();
- mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ mgr->activate ();
// 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_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ factory_servant._this ();
// Get a reference to the Name Service.
obj = orb->resolve_initial_references ("NameService"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Narrow to a Naming Context
CosNaming::NamingContext_var nc =
CosNaming::NamingContext::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Create a name.
CosNaming::Name name;
@@ -64,12 +57,10 @@ main (int argc, char *argv[])
name[0].kind = CORBA::string_dup ("");
nc->bind (name, factory.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Some debugging output.
CORBA::String_var IOR = orb->object_to_string (factory.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Bound <%s> to <%s> in Name Service.\n"),
name[0].id.in (),
@@ -79,8 +70,7 @@ main (int argc, char *argv[])
ACE_TEXT ("Accepting requests.\n")));
// Accept requests.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->run ();
}
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 832e96b6732..46f8d6fbe57 100644
--- a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp
+++ b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp
@@ -28,13 +28,12 @@ Callback_Handler::~Callback_Handler (void)
}
void
-Callback_Handler::next_chunk (ACE_ENV_SINGLE_ARG_DECL)
+Callback_Handler::next_chunk (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
if (this->last_chunk_ == 1)
{
- this->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->deactivate ();
return;
}
@@ -81,7 +80,6 @@ Callback_Handler::next_chunk (ACE_ENV_SINGLE_ARG_DECL)
this->chunk_.in (),
this->last_chunk_
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
void
@@ -95,11 +93,9 @@ Callback_Handler::next_chunk_excep
ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
{
- this->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->deactivate ();
- excep_holder->raise_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ excep_holder->raise_exception ();
}
ACE_CATCHANY
{
@@ -111,27 +107,24 @@ Callback_Handler::next_chunk_excep
}
void
-Callback_Handler::run (ACE_ENV_SINGLE_ARG_DECL)
+Callback_Handler::run (void)
ACE_THROW_SPEC ((CORBA::SystemException,
Web_Server::Error_Result))
{
// Open the file to be downloaded
- this->open_file (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->open_file ();
// Activate this Reply Handler.
- this->ami_handler_ = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->ami_handler_ = this->_this ();
// 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_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->next_chunk ();
}
void
-Callback_Handler::open_file (ACE_ENV_SINGLE_ARG_DECL)
+Callback_Handler::open_file (void)
ACE_THROW_SPEC ((CORBA::SystemException,
Web_Server::Error_Result))
{
@@ -149,23 +142,20 @@ Callback_Handler::open_file (ACE_ENV_SINGLE_ARG_DECL)
}
void
-Callback_Handler::deactivate (ACE_ENV_SINGLE_ARG_DECL)
+Callback_Handler::deactivate (void)
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_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ PortableServer::POA_var poa = this->_default_POA ();
// Get the object ID associated with this servant.
PortableServer::ObjectId_var oid =
poa->servant_to_id (this
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Now deactivate the AMI_CallbackHandler object.
poa->deactivate_object (oid.in () ACE_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 db3f8bb2656..9c06a9a2315 100644
--- a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h
+++ b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h
@@ -77,7 +77,7 @@ public:
// Constructor that creates a content iterator corresponding to the
// name of the file being retrieved from the web server.
- virtual void next_chunk (ACE_ENV_SINGLE_ARG_DECL)
+ virtual void next_chunk (void)
ACE_THROW_SPEC ((CORBA::SystemException));
// The callback for this reply handler.
@@ -85,7 +85,7 @@ public:
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
- void run (ACE_ENV_SINGLE_ARG_DECL)
+ void run (void)
ACE_THROW_SPEC ((CORBA::SystemException,
Web_Server::Error_Result));
// Activate and run this Reply Handler. The contents (not the
@@ -98,12 +98,12 @@ private:
// Destructor (private to ensure that Callback_Handler is allocated
// on the heap).
- void open_file (ACE_ENV_SINGLE_ARG_DECL)
+ void open_file (void)
ACE_THROW_SPEC ((CORBA::SystemException,
Web_Server::Error_Result));
// Open the file to be uploaded to the client callback.
- void deactivate (ACE_ENV_SINGLE_ARG_DECL)
+ void deactivate (void)
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 15755e55328..9698c81020c 100644
--- a/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp
+++ b/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp
@@ -98,8 +98,7 @@ Callback_i::next_chunk (const Web_Server::Chunk_Type & chunk_data,
if (this->metadata_received ())
{
(void) this->file_io_.close ();
- this->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->deactivate ();
(void) this->spawn_viewer ();
}
@@ -131,8 +130,7 @@ Callback_i::metadata (const Web_Server::Metadata_Type &metadata)
// an external viewer to display it.
if (this->content_received ())
{
- this->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->deactivate ();
(void) this->spawn_viewer ();
}
@@ -278,19 +276,16 @@ Callback_i::spawn_viewer (void)
}
void
-Callback_i::deactivate (ACE_ENV_SINGLE_ARG_DECL)
+Callback_i::deactivate (void)
{
// Get the POA used when activating the Reply Handler object.
- PortableServer::POA_var poa = this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ PortableServer::POA_var poa = this->_default_POA ();
// Get the object ID associated with this servant.
PortableServer::ObjectId_var oid =
poa->servant_to_id (this
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Now deactivate the iterator object.
poa->deactivate_object (oid.in () ACE_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 38ca7d43272..84365c8ece3 100644
--- a/TAO/examples/Content_Server/AMI_Observer/Callback_i.h
+++ b/TAO/examples/Content_Server/AMI_Observer/Callback_i.h
@@ -92,7 +92,7 @@ private:
private:
- void deactivate (ACE_ENV_SINGLE_ARG_DECL);
+ void deactivate (void);
// 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 4b6f0db6c37..98f8c0b2b6a 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
@@ -44,14 +44,12 @@ Push_Iterator_Factory_i::register_callback
Callback_Handler (pathname,
client_callback),
CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
// Transfer ownership to the POA.
PortableServer::ServantBase_var tmp (handler);
// Start sending data to the client callback object.
- handler->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
+ handler->run ();
ACE_stat file_status;
if (ACE_OS::stat (pathname,
@@ -64,7 +62,6 @@ Push_Iterator_Factory_i::register_callback
ACE_NEW_THROW_EX (meta_tmp,
Web_Server::Metadata_Type,
CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
Web_Server::Metadata_Type_var metadata = meta_tmp;
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 96a7b7c0b88..32c5eaded4d 100644
--- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp
+++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp
@@ -32,8 +32,7 @@ Push_Iterator_Handler::register_callback
this->callback_servant_->metadata (metadata);
// This handler is no longer needed, so deactivate it.
- this->deactivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->deactivate ();
}
void
@@ -47,44 +46,37 @@ Push_Iterator_Handler::run (int *request_count,
ACE_NEW_THROW_EX (this->callback_servant_,
Callback_i (request_count),
CORBA::NO_MEMORY ());
- ACE_CHECK;
// Pass ownership of the Callback servant to the POA.
PortableServer::ServantBase_var tmp (this->callback_servant_);
// Activate the Callback.
this->callback_ =
- this->callback_servant_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->callback_servant_->_this ();
// Activate this Reply Handler.
this->ami_handler_ =
- this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->_this ();
// Register the client callback with the server asynchronously.
factory->sendc_register_callback (this->ami_handler_.in (),
pathname,
this->callback_.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
void
-Push_Iterator_Handler::deactivate (ACE_ENV_SINGLE_ARG_DECL)
+Push_Iterator_Handler::deactivate (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Get the POA used when activating the Reply Handler object.
- PortableServer::POA_var poa = this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ PortableServer::POA_var poa = this->_default_POA ();
// Get the object ID associated with this servant.
PortableServer::ObjectId_var oid =
poa->servant_to_id (this
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Now deactivate the AMI_CallbackHandler object.
poa->deactivate_object (oid.in () ACE_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 8b8254550da..be8d8f70d5f 100644
--- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h
+++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h
@@ -89,7 +89,7 @@ private:
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException)) {}
- void deactivate (ACE_ENV_SINGLE_ARG_DECL)
+ void deactivate (void)
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 986c828875a..c669d955cb3 100644
--- a/TAO/examples/Content_Server/AMI_Observer/client.cpp
+++ b/TAO/examples/Content_Server/AMI_Observer/client.cpp
@@ -42,28 +42,23 @@ main (int argc, char *argv[])
argv,
"Mighty ORB"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Get the Root POA.
CORBA::Object_var obj =
orb->resolve_initial_references ("RootPOA"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var poa =
PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Activate the POA manager.
PortableServer::POAManager_var mgr = poa->the_POAManager ();
- mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ mgr->activate ();
// Get an Iterator_Factory reference.
Web_Server::Iterator_Factory_var factory =
::get_iterator (orb.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (CORBA::is_nil (factory.in ()))
{
@@ -85,7 +80,6 @@ main (int argc, char *argv[])
&request_count,
factory.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// 1 millisecond delay to reduce "busy waiting" in ORB event
// loop.
@@ -96,23 +90,19 @@ main (int argc, char *argv[])
{
CORBA::Boolean more_work;
- more_work = orb->work_pending (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ more_work = orb->work_pending ();
if (more_work)
{
- orb->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->perform_work ();
}
else
ACE_OS::sleep (tv);
}
orb->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- //orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- //ACE_TRY_CHECK;
+ //orb->destroy ();
}
ACE_CATCH (Web_Server::Error_Result, exc)
{
@@ -147,12 +137,10 @@ get_iterator (CORBA::ORB_ptr o
CORBA::Object_var obj =
orb->resolve_initial_references ("NameService"
ACE_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_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ());
if (CORBA::is_nil (obj.in ()))
{
@@ -168,7 +156,6 @@ get_iterator (CORBA::ORB_ptr o
name[0].kind = CORBA::string_dup ("");
obj = nc->resolve (name ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ());
Web_Server::Iterator_Factory_ptr factory =
Web_Server::Iterator_Factory::_narrow (obj.in ());
@@ -194,7 +181,6 @@ void invoke_requests (int argc,
ACE_NEW_THROW_EX (handler,
Push_Iterator_Handler,
CORBA::NO_MEMORY ());
- ACE_CHECK;
// Transfer ownership to the POA.
PortableServer::ServantBase_var tmp (handler);
@@ -204,6 +190,5 @@ void invoke_requests (int argc,
argv[i + 1],
factory.in ()
ACE_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 83388bc3fb9..478c54e838f 100644
--- a/TAO/examples/Content_Server/AMI_Observer/server.cpp
+++ b/TAO/examples/Content_Server/AMI_Observer/server.cpp
@@ -7,8 +7,8 @@
#include "Push_Web_ServerS.h"
#include "Push_Iterator_Factory_i.h"
-ACE_RCSID (AMI_Observer,
- server,
+ACE_RCSID (AMI_Observer,
+ server,
"$Id$")
int
@@ -22,38 +22,31 @@ main (int argc, char *argv[])
argv,
"Mighty ORB"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Get the Root POA.
CORBA::Object_var obj =
orb->resolve_initial_references ("RootPOA"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var poa =
PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Activate the POA manager.
PortableServer::POAManager_var mgr = poa->the_POAManager ();
- mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ mgr->activate ();
// Create the Iterator_Factory servant and object.
Push_Iterator_Factory_i factory_servant;
Web_Server::Iterator_Factory_var factory =
- factory_servant._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ factory_servant._this ();
// Get a reference to the Name Service.
obj = orb->resolve_initial_references ("NameService"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Narrow to a Naming Context
CosNaming::NamingContext_var nc =
CosNaming::NamingContext::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Create a name.
CosNaming::Name name;
@@ -62,12 +55,10 @@ main (int argc, char *argv[])
name[0].kind = CORBA::string_dup ("");
nc->bind (name, factory.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Some debugging output.
CORBA::String_var IOR = orb->object_to_string (factory.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Bound <%s> to <%s> in Name Service.\n"),
name[0].id.in (),
@@ -77,8 +68,7 @@ main (int argc, char *argv[])
ACE_TEXT ("Accepting requests.\n")));
// Accept requests.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->run ();
}
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 4ca7e00bedb..3c7394da19f 100644
--- a/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp
+++ b/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.cpp
@@ -36,7 +36,6 @@ Content_Iterator_i::next_chunk (CORBA::ULongLong offset,
ACE_NEW_THROW_EX (tmp,
Web_Server::Chunk_Type,
CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (false);
chunk = tmp;
@@ -118,28 +117,24 @@ Content_Iterator_i::next_chunk (CORBA::ULongLong offset,
}
void
-Content_Iterator_i::destroy (ACE_ENV_SINGLE_ARG_DECL)
+Content_Iterator_i::destroy (void)
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_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ PortableServer::POA_var poa = this->_default_POA ();
// Get the object ID associated with this servant.
PortableServer::ObjectId_var oid = poa->servant_to_id (this
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Now deactivate the iterator object.
poa->deactivate_object (oid.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
// Decrease the reference count on our selves.
- this->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ this->_remove_ref ();
}
int
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 8af8f5f900f..bccde71b77a 100644
--- a/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.h
+++ b/TAO/examples/Content_Server/SMI_Iterator/Content_Iterator_i.h
@@ -58,7 +58,7 @@ public:
// This operation returns the next <chunk> of the file starting at
// <offset>. If there are no more bindings, false is returned.
- virtual void destroy (ACE_ENV_SINGLE_ARG_DECL)
+ virtual void destroy (void)
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 fce34dc3dcd..a0d6ff3fd56 100644
--- a/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp
+++ b/TAO/examples/Content_Server/SMI_Iterator/Iterator_Factory_i.cpp
@@ -34,7 +34,6 @@ Iterator_Factory_i::get_iterator (const char *pathname,
Content_Iterator_i (pathname,
file_status.st_size),
CORBA::NO_MEMORY ());
- ACE_CHECK;
if (iterator_servant->init () != 0)
{
@@ -53,14 +52,12 @@ Iterator_Factory_i::get_iterator (const char *pathname,
// Activate the Content_Iterator object.
Web_Server::Content_Iterator_var iterator =
- iterator_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ iterator_servant->_this ();
Web_Server::Metadata_Type *tmp = 0;
ACE_NEW_THROW_EX (tmp,
Web_Server::Metadata_Type,
CORBA::NO_MEMORY ());
- ACE_CHECK;
metadata = tmp;
diff --git a/TAO/examples/Content_Server/SMI_Iterator/client.cpp b/TAO/examples/Content_Server/SMI_Iterator/client.cpp
index dcec6b9a578..4d20536d2ee 100644
--- a/TAO/examples/Content_Server/SMI_Iterator/client.cpp
+++ b/TAO/examples/Content_Server/SMI_Iterator/client.cpp
@@ -47,18 +47,15 @@ main (int argc, char *argv[])
argv,
"Mighty ORB"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Get a reference to the Name Service.
CORBA::Object_var obj =
orb->resolve_initial_references ("NameService"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Narrow to a Naming Context
CosNaming::NamingContext_var nc =
CosNaming::NamingContext::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (CORBA::is_nil (obj.in ()))
{
@@ -75,7 +72,6 @@ main (int argc, char *argv[])
name[0].kind = CORBA::string_dup ("");
obj = nc->resolve (name ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Now narrow to an Iterator_Factory reference.
Web_Server::Iterator_Factory_var factory =
@@ -99,7 +95,6 @@ main (int argc, char *argv[])
contents,
metadata
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ACE_DEBUG ((LM_INFO,
ACE_TEXT ("File <%s> has the following ")
@@ -113,20 +108,16 @@ main (int argc, char *argv[])
int result = ::retrieve_data (metadata->content_type.in (),
contents.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (result != 0)
return -1;
// Done with the Content_Iterator, so destroy it.
- contents->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ contents->destroy ();
orb->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- // orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- // ACE_TRY_CHECK;
+ // orb->destroy ();
}
ACE_CATCH (Web_Server::Error_Result, exc)
{
@@ -185,7 +176,6 @@ int retrieve_data (const char *content_type,
for (;;)
{
rc = contents->next_chunk (offset, chunk ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
if (!rc)
break;
diff --git a/TAO/examples/Content_Server/SMI_Iterator/server.cpp b/TAO/examples/Content_Server/SMI_Iterator/server.cpp
index 701dccbeac0..8ad0bb7d646 100644
--- a/TAO/examples/Content_Server/SMI_Iterator/server.cpp
+++ b/TAO/examples/Content_Server/SMI_Iterator/server.cpp
@@ -8,8 +8,8 @@
#include "Iterator_Factory_i.h"
-ACE_RCSID (SMI_Iterator,
- server,
+ACE_RCSID (SMI_Iterator,
+ server,
"$Id$")
int
@@ -23,39 +23,32 @@ main (int argc, char *argv[])
argv,
"Mighty ORB"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Get the Root POA.
CORBA::Object_var obj =
orb->resolve_initial_references ("RootPOA"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var poa =
PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Activate the POA manager.
PortableServer::POAManager_var mgr = poa->the_POAManager ();
- mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ mgr->activate ();
// 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_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ factory_servant._this ();
// Get a reference to the Name Service.
obj = orb->resolve_initial_references ("NameService"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Narrow to a Naming Context
CosNaming::NamingContext_var nc;
nc = CosNaming::NamingContext::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Create a name.
CosNaming::Name name;
@@ -64,12 +57,10 @@ main (int argc, char *argv[])
name[0].kind = CORBA::string_dup ("");
nc->bind (name, factory.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Some debugging output.
CORBA::String_var IOR = orb->object_to_string (factory.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Bound <%s> to <%s> in Name Service.\n"),
name[0].id.in (),
@@ -79,8 +70,7 @@ main (int argc, char *argv[])
ACE_TEXT ("Accepting requests.\n")));
// Accept requests.
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->run ();
}
ACE_CATCHANY
{