summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-30 08:19:36 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-30 08:19:36 +0000
commitb0bbf079849e434467a6dbda4cdf686c2cab7f76 (patch)
tree81587e8b17cc5d197dd1ed8c5c2ab61a22e9cc89 /TAO
parent076935a35b645b5745e2073b60fe05880b4f05eb (diff)
downloadATCD-b0bbf079849e434467a6dbda4cdf686c2cab7f76.tar.gz
Exception handling stuff
Diffstat (limited to 'TAO')
-rw-r--r--TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp20
-rw-r--r--TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.h4
-rw-r--r--TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp90
-rw-r--r--TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp91
-rw-r--r--TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.h4
-rw-r--r--TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp50
-rw-r--r--TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h6
-rw-r--r--TAO/orbsvcs/Trading_Service/Trading_Service.cpp317
-rw-r--r--TAO/orbsvcs/Trading_Service/Trading_Service.h6
-rw-r--r--TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp216
-rw-r--r--TAO/orbsvcs/tests/Trading/Offer_Exporter.h20
-rw-r--r--TAO/orbsvcs/tests/Trading/Offer_Importer.cpp93
-rw-r--r--TAO/orbsvcs/tests/Trading/Offer_Importer.h8
-rw-r--r--TAO/orbsvcs/tests/Trading/Service_Type_Exporter.cpp165
-rw-r--r--TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h16
-rw-r--r--TAO/orbsvcs/tests/Trading/TT_Info.cpp45
-rw-r--r--TAO/orbsvcs/tests/Trading/TT_Info.h3
-rw-r--r--TAO/orbsvcs/tests/Trading/colocated_test.cpp86
-rw-r--r--TAO/orbsvcs/tests/Trading/export_test.cpp102
-rw-r--r--TAO/orbsvcs/tests/Trading/import_test.cpp22
20 files changed, 681 insertions, 683 deletions
diff --git a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp
index ad8cddd58a5..19738fe304a 100644
--- a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp
+++ b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp
@@ -27,7 +27,7 @@ Criteria_Evaluator::~Criteria_Evaluator ()
}
LifeCycleService::Criteria_Evaluator::SeqNamedValuePair *
-Criteria_Evaluator::getInitialization (CORBA::Environment &env)
+Criteria_Evaluator::getInitialization (CORBA::Environment &ACE_TRY_ENV)
{
LifeCycleService::Criteria_Evaluator::SeqNamedValuePair_ptr sequence_ptr = 0;
@@ -35,10 +35,9 @@ Criteria_Evaluator::getInitialization (CORBA::Environment &env)
this->getCriteriaMember ("initialization");
if (any_ptr == 0)
- {
- env.exception (new LifeCycleService::Criteria_Evaluator::NotAvailable ("No initialization member found.\n"));
- return 0;
- }
+ ACE_THROW_RETURN (LifeCycleService::Criteria_Evaluator::NotAvailable
+ ("No initialization member found.\n"),
+ 0);
*any_ptr >>= sequence_ptr;
@@ -46,17 +45,16 @@ Criteria_Evaluator::getInitialization (CORBA::Environment &env)
}
char *
-Criteria_Evaluator::getFilter (CORBA::Environment &env)
+Criteria_Evaluator::getFilter (CORBA::Environment &ACE_TRY_ENV)
{
CORBA::String string;
CORBA::Any value;
CORBA::Any_ptr any_ptr = this->getCriteriaMember ("filter");
if (any_ptr == 0)
- {
- env.exception (new LifeCycleService::Criteria_Evaluator::NotAvailable ("No filter member found.\n"));
- return 0;
- }
+ ACE_THROW_RETURN (LifeCycleService::Criteria_Evaluator::NotAvailable
+ ("No filter member found.\n"),
+ 0);
*any_ptr >>= string;
return string;
}
@@ -77,6 +75,8 @@ Criteria_Evaluator::getCriteriaMember (const char *member_name)
criteria_[i].name) == 0)
{
CORBA::Any_ptr value_ptr;
+
+ // @@ We should use ACE_NEW_THROW_EX + ACE_CHECK_RETURN here.
ACE_NEW_RETURN (value_ptr,
CORBA::Any(criteria_[i].value),
0);
diff --git a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.h b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.h
index 9bd63602442..b55af2bd9e0 100644
--- a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.h
+++ b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.h
@@ -28,9 +28,9 @@ public:
Criteria_Evaluator (const CosLifeCycle::Criteria &criteria);
~Criteria_Evaluator (void);
- LifeCycleService::Criteria_Evaluator::SeqNamedValuePair * getInitialization (CORBA::Environment &_tao_environment);
+ LifeCycleService::Criteria_Evaluator::SeqNamedValuePair * getInitialization (CORBA::Environment &);
- char * getFilter (CORBA::Environment &_tao_environment);
+ char * getFilter (CORBA::Environment &);
LifeCycleService::Criteria_Evaluator::SeqNamedValuePair * getLogicalLocation (CORBA::Environment &)
{
diff --git a/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp b/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp
index f70a833fc5d..103fb35a510 100644
--- a/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp
+++ b/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.cpp
@@ -34,7 +34,7 @@ Factory_Trader::Factory_Trader ()
trading_Components_ptr_ (0),
support_Attributes_ptr_(0)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
int argc = 0;
// create the trader
@@ -45,18 +45,19 @@ Factory_Trader::Factory_Trader ()
// this pointer is deleted when the trader_ptr is deleted
// Set the service type repository
- support_Attributes_ptr_->type_repos (this->repository_._this (TAO_TRY_ENV));
- TAO_CHECK_ENV;
+ support_Attributes_ptr_->type_repos (this->repository_._this (ACE_TRY_ENV));
+ ACE_TRY_CHECK;
// Add the "Factory" type to the repository
this->add_type ();
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- ACE_ERROR ((LM_ERROR, "Factory_Trader constructor: Failed adding a new type."));
- TAO_TRY_ENV.print_exception ("Factory_Trader constructor: Exception.\n");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Factory_Trader constructor: Failed adding a new type.\n");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ // @@ ACE_CHECK? No way to pass back any exceptions.
}
Factory_Trader::~Factory_Trader ()
@@ -68,7 +69,7 @@ Factory_Trader::~Factory_Trader ()
void
Factory_Trader::add_type ()
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// define the new type
CosTradingRepos::ServiceTypeRepository::PropStruct propStruct_name;
@@ -99,24 +100,16 @@ Factory_Trader::add_type ()
GENERIC_FACTORY_INTERFACE_REPOSITORY_ID,
propStructSeq,
superTypeSeq,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (CORBA::UserException, userex)
+ ACE_CATCHANY
{
- ACE_UNUSED_ARG (userex);
- TAO_TRY_ENV.print_exception ("Factory_Trader::init: User Exception.\n");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Factory_Trader::init.\n");
}
- TAO_CATCH (CORBA::SystemException, sysex)
- {
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("Factory_Trader::init: System Exception.\n");
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "Factory_Trader::init: Failed adding a new type."));
- }
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ // @@ ACE_CHECK
}
@@ -126,7 +119,7 @@ Factory_Trader::_cxx_export (const char * name,
const char * description,
const CORBA::Object_ptr object_ptr)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
if (CORBA::is_nil(object_ptr))
{
@@ -149,34 +142,26 @@ Factory_Trader::_cxx_export (const char * name,
// invoke the export method on the Register interface of the Trading Service
register_ptr->_cxx_export (CORBA::Object::_duplicate (object_ptr),
- CORBA::string_dup("Factory"),
- propertySeq,
- TAO_TRY_ENV);
+ CORBA::string_dup("Factory"),
+ propertySeq,
+ ACE_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCH (CORBA::UserException, userex)
- {
- ACE_UNUSED_ARG (userex);
- TAO_TRY_ENV.print_exception ("Factory_Trader::export: User Exception.\n");
+ ACE_TRY_CHECK;
}
- TAO_CATCH (CORBA::SystemException, sysex)
+ ACE_CATCHANY
{
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("Factory_Trader::export: System Exception.\n");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Factory_Trader::export: Failed to export factory.\n");
}
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "Factory_Trader::export: Failed to export factory.\n"));
- }
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ // @@ ACE_CHECK*
}
CORBA::Object_ptr
Factory_Trader::query (const CORBA::String constraint)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
CosTrading::Lookup::SpecifiedProps specifiedProps;
specifiedProps._d(CosTrading::Lookup::all);
@@ -203,8 +188,8 @@ Factory_Trader::query (const CORBA::String constraint)
CosTrading::OfferSeq_out(offerSeq_ptr), // results
CosTrading::OfferIterator_out(offerIterator_ptr), // more results
CosTrading::PolicyNameSeq_out(policyNameSeq_ptr), // Policies
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Initialize
CORBA::Object_ptr object_ptr = 0;
@@ -234,20 +219,11 @@ Factory_Trader::query (const CORBA::String constraint)
}
return object_ptr;
}
- TAO_CATCH (CORBA::UserException, userex)
- {
- ACE_UNUSED_ARG (userex);
- TAO_TRY_ENV.print_exception ("Factory_Trader::query: User Exception");
- }
- TAO_CATCH (CORBA::SystemException, sysex)
- {
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("Factory_Trader::query: System Exception");
- }
- TAO_CATCHANY
+ ACE_CATCHANY
{
- ACE_ERROR ((LM_ERROR, "Factory_Trader::query: Failed.\n"));
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Factory_Trader::query: Failed.\n");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ // @@ ACE_CHECK_RETURN (?)
return 0;
}
diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp
index c187953e7bc..c76406a16e5 100644
--- a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp
+++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.cpp
@@ -26,40 +26,36 @@ Life_Cycle_Service_Server::Life_Cycle_Service_Server (void)
Life_Cycle_Service_Server::~Life_Cycle_Service_Server (void)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
// Unbind the Factory Finder.
CosNaming::Name generic_Factory_Name (2);
generic_Factory_Name.length (2);
generic_Factory_Name[0].id = CORBA::string_dup ("LifeCycle_Service");
- this->namingContext_var_->unbind (generic_Factory_Name,TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->namingContext_var_->unbind (generic_Factory_Name, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (CORBA::SystemException, sysex)
+ ACE_CATCHANY
{
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("System Exception");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "User Exception");
}
- TAO_CATCH (CORBA::UserException, userex)
- {
- ACE_UNUSED_ARG (userex);
- TAO_TRY_ENV.print_exception ("User Exception");
- }
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
int
Life_Cycle_Service_Server::init (int argc,
char *argv[],
- CORBA::Environment& env)
+ CORBA::Environment& ACE_TRY_ENV)
{
if (this->orb_manager_.init (argc,
argv,
- env) == -1)
+ ACE_TRY_ENV) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"init"),
-1);
+ // @@ Oh well. This should actually come before "if".
+ ACE_CHECK_RETURN (-1);
// Copy them, because parse_args expects them there.
this->argc_ = argc;
@@ -75,32 +71,25 @@ Life_Cycle_Service_Server::init (int argc,
// Activate the object.
CORBA::String_var str =
this->orb_manager_.activate (this->life_Cycle_Service_i_ptr_,
- env);
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
// Failure while activating the Factory Finder object
- // @@ TODO Is this the right way to check this? Shouldn't env
- // contain an exception?
- if (env.exception () != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "init: Failure while activating the LifeCycle Service Impl.\n"),
- -1);
-
ACE_DEBUG ((LM_DEBUG,
"The IOR is: <%s>\n",
str.in ()));
// Register the LifeCycle Service with the Naming Service.
- TAO_TRY
+ ACE_TRY
{
ACE_DEBUG ((LM_DEBUG,
"Trying to get a reference to the Naming Service.\n"));
// Get the Naming Service object reference.
CORBA::Object_var namingObj_var =
- orb_manager_.orb()->resolve_initial_references ("NameService");
- TAO_CHECK_ENV;
+ orb_manager_.orb()->resolve_initial_references ("NameService", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (CORBA::is_nil (namingObj_var.in ()))
ACE_ERROR ((LM_ERROR,
@@ -108,14 +97,14 @@ Life_Cycle_Service_Server::init (int argc,
// Narrow the object reference to a Naming Context.
namingContext_var_ = CosNaming::NamingContext::_narrow (namingObj_var.in (),
- TAO_TRY_ENV);
+ ACE_TRY_ENV);
+
+ ACE_TRY_CHECK;
if (CORBA::is_nil (namingContext_var_.in ()))
ACE_ERROR ((LM_ERROR,
" (%P|%t) Unable get the Naming Service.\n"));
-
- TAO_CHECK_ENV;
ACE_DEBUG ((LM_DEBUG,
"Have a proper reference to the Naming Service.\n"));
@@ -123,19 +112,22 @@ Life_Cycle_Service_Server::init (int argc,
life_Cycle_Service_Name.length (1);
life_Cycle_Service_Name[0].id = CORBA::string_dup ("Life_Cycle_Service");
+ CORBA::Object_ptr tmp = this->life_Cycle_Service_i_ptr_->_this(ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
namingContext_var_->bind (life_Cycle_Service_Name,
- this->life_Cycle_Service_i_ptr_->_this(TAO_TRY_ENV),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ tmp,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG,
"Bound the LifeCycle Service to the Naming Context.\n"));
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Life_Cycle_Service_Server::init");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
@@ -144,6 +136,7 @@ Life_Cycle_Service_Server::init (int argc,
int
Life_Cycle_Service_Server::run (CORBA::Environment &)
{
+
if (orb_manager_.orb()->run () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
@@ -193,31 +186,27 @@ main (int argc, char *argv [])
ACE_DEBUG ((LM_DEBUG,
"\n\tIDL_LifeCycleService: Life_Cycle_Service_Server \n\n"));
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
- if (life_Cycle_Service_Server.init (argc,
- argv,
- TAO_TRY_ENV) == -1)
+ int check = life_Cycle_Service_Server.init (argc,
+ argv,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ if (check)
return 1;
else
{
- life_Cycle_Service_Server.run (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ life_Cycle_Service_Server.run (ACE_TRY_ENV);
+ ACE_TRY_CHECK
}
}
- TAO_CATCH (CORBA::SystemException, sysex)
- {
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("System Exception");
- return -1;
- }
- TAO_CATCH (CORBA::UserException, userex)
+ ACE_CATCHANY
{
- ACE_UNUSED_ARG (userex);
- TAO_TRY_ENV.print_exception ("User Exception");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "main");
return -1;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.h b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.h
index 8691ee6547d..7e103fabe55 100644
--- a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.h
+++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.h
@@ -39,10 +39,10 @@ public:
int init (int argc,
char *argv[],
- CORBA::Environment& env);
+ CORBA::Environment& ACE_TRY_ENV);
// Initialize the Server state - parsing arguments and ...
- int run (CORBA::Environment& env);
+ int run (CORBA::Environment& ACE_TRY_ENV);
// Run the orb.
u_int parse_args (void);
diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp
index 09de8a3a22c..723b735a437 100644
--- a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp
+++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp
@@ -33,19 +33,17 @@ Life_Cycle_Service_i::~Life_Cycle_Service_i (void)
CORBA::Boolean
-Life_Cycle_Service_i::supports (const CosLifeCycle::Key &factory_key,
- CORBA::Environment &TAO_IN_ENV_there)
+Life_Cycle_Service_i::supports (const CosLifeCycle::Key &,
+ CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- ACE_UNUSED_ARG (factory_key);
- ACE_UNUSED_ARG (TAO_IN_ENV_there);
return 0;
}
CORBA::Object_ptr
Life_Cycle_Service_i::create_object (const CosLifeCycle::Key &factory_key,
const CosLifeCycle::Criteria &the_criteria,
- CORBA::Environment &TAO_IN_ENV_there)
+ CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosLifeCycle::NoFactory,
CosLifeCycle::InvalidCriteria,
@@ -61,12 +59,8 @@ Life_Cycle_Service_i::create_object (const CosLifeCycle::Key &factory_key,
ACE_DEBUG ((LM_DEBUG, "Life_Cycle_Service_i:create_object: getFilter will be called.\n"));
- CORBA::String filter = criteria_Evaluator.getFilter (TAO_IN_ENV_there);
-
- if (TAO_IN_ENV_there.exception() != 0)
- {
- return 0;
- }
+ CORBA::String filter = criteria_Evaluator.getFilter (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
ACE_DEBUG ((LM_DEBUG, "Life_Cycle_Service_i:create_object: query(%s) will be called.\n",filter));
@@ -87,24 +81,25 @@ Life_Cycle_Service_i::create_object (const CosLifeCycle::Key &factory_key,
// Check if it is a valid Generic Factory reference
if (CORBA::is_nil (genericFactoryObj_ptr))
- { // throw a NoFactory exception
- TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key));
- return 0;
- }
+ ACE_THROW_RETURN (CosLifeCycle::NoFactory (factory_key), 0);
else
{
- CORBA::Environment env_here;
-
- CosLifeCycle::GenericFactory_var genericFactory_var =
- CosLifeCycle::GenericFactory::_narrow (genericFactoryObj_ptr,
- env_here);
-
- // see if there is an exception, if yes then throw the NoFactory exception
- if (env_here.exception () != 0) // throw a NoFactory exception
- {
- TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key));
- return 0;
+ CosLifeCycle::GenericFactory_var genericFactory_var;
+ ACE_TRY
+ {
+ genericFactory_var =
+ CosLifeCycle::GenericFactory::_narrow (genericFactoryObj_ptr,
+ ACE_TRY_ENV);
+ // ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ // see if there is an exception, if yes then throw the
+ // NoFactory exception throw a NoFactory exception
+ ACE_TRY_THROW (CosLifeCycle::NoFactory (factory_key));
}
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (0);
if (CORBA::is_nil (genericFactory_var.in()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -116,7 +111,8 @@ Life_Cycle_Service_i::create_object (const CosLifeCycle::Key &factory_key,
// Now retrieve the Object obj ref corresponding to the key.
CORBA::Object_var object_var = genericFactory_var->create_object (factory_key,
the_criteria,
- TAO_IN_ENV_there);
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
ACE_DEBUG ((LM_DEBUG,
"Life_Cycle_Service_i::create_object: Forwarded request.\n"));
diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h
index 4ad461ee3c0..0e1a1c971bd 100644
--- a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h
+++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.h
@@ -30,14 +30,14 @@ public:
~Life_Cycle_Service_i (void);
CORBA::Boolean supports (const CosLifeCycle::Key &factory_key,
- CORBA::Environment &_env_there)
+ CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException));
// Returns true if the Generic Factory is able to forward a request
// for creating an object described by the <factory_key>.
CORBA::Object_ptr create_object (const CosLifeCycle::Key &factory_key,
const CosLifeCycle::Criteria &the_criteria,
- CORBA::Environment &_env_there)
+ CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosLifeCycle::NoFactory,
CosLifeCycle::InvalidCriteria,
@@ -50,7 +50,7 @@ public:
const char * location,
const char * description,
CORBA::Object_ptr object,
- CORBA::Environment &_env_there)
+ CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC (( CORBA::SystemException));
// Registers a factory with specified properties
diff --git a/TAO/orbsvcs/Trading_Service/Trading_Service.cpp b/TAO/orbsvcs/Trading_Service/Trading_Service.cpp
index bdb8d3cd6cc..a64ee6111c7 100644
--- a/TAO/orbsvcs/Trading_Service/Trading_Service.cpp
+++ b/TAO/orbsvcs/Trading_Service/Trading_Service.cpp
@@ -64,72 +64,62 @@ Trading_Service::~Trading_Service (void)
}
int
-Trading_Service::init (int argc, char* argv[])
+Trading_Service::init (int argc, char* argv[], CORBA::Environment &ACE_TRY_ENV)
{
- TAO_TRY
- {
- this->orb_manager_.init (argc, argv, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->orb_manager_.init (argc, argv, ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
- if (this->parse_args (argc, argv) == -1)
- return -1;
+ if (this->parse_args (argc, argv) == -1)
+ return -1;
- CORBA::ORB_ptr orb = this->orb_manager_.orb ();
+ CORBA::ORB_ptr orb = this->orb_manager_.orb ();
- // Create a Trader Object and set its Service Type Repository.
- auto_ptr<TAO_Trader_Factory::TAO_TRADER> auto_trader (TAO_Trader_Factory::create_trader (argc, argv));
- this->trader_ = auto_trader;
- TAO_Support_Attributes_i& sup_attr = this->trader_->support_attributes ();
- TAO_Trading_Components_i& trd_comp = this->trader_->trading_components ();
- sup_attr.type_repos (this->type_repos_._this (TAO_TRY_ENV));
- TAO_CHECK_ENV;
+ // Create a Trader Object and set its Service Type Repository.
+ auto_ptr<TAO_Trader_Factory::TAO_TRADER> auto_trader (TAO_Trader_Factory::create_trader (argc, argv));
+ this->trader_ = auto_trader;
+ TAO_Support_Attributes_i& sup_attr = this->trader_->support_attributes ();
+ TAO_Trading_Components_i& trd_comp = this->trader_->trading_components ();
+ sup_attr.type_repos (this->type_repos_._this (ACE_TRY_ENV));
+ ACE_CHECK_RETURN (-1);
// The Spec says: return a reference to the Lookup interface
// from the resolve_initial_references method.
- CosTrading::Lookup_ptr lookup = trd_comp.lookup_if ();
- this->ior_ = orb->object_to_string (lookup, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Dump the ior to a file.
- if (this->ior_output_file_ != 0)
- {
- ACE_OS::fprintf (this->ior_output_file_, "%s", this->ior_.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
+ CosTrading::Lookup_ptr lookup = trd_comp.lookup_if ();
+ this->ior_ = orb->object_to_string (lookup, ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
- if (this->federate_)
- {
- // Only become a multicast server if we're the only trader
- // on the multicast network.
- // @@ Could do other things. For example, every timeout
- // period try to federate again, but let's not hardcode that
- // policy.
- if (this->bootstrap_to_federation () == -1)
- this->init_multicast_server ();
- }
- else
- this->init_multicast_server ();
- }
- TAO_CATCHANY
+ // Dump the ior to a file.
+ if (this->ior_output_file_ != 0)
{
- TAO_TRY_ENV.print_exception ("Trading Service");
+ ACE_OS::fprintf (this->ior_output_file_, "%s", this->ior_.in ());
+ ACE_OS::fclose (this->ior_output_file_);
}
- TAO_ENDTRY;
+ if (this->federate_)
+ {
+ // Only become a multicast server if we're the only trader
+ // on the multicast network.
+ // @@ Could do other things. For example, every timeout
+ // period try to federate again, but let's not hardcode that
+ // policy.
+ if (this->bootstrap_to_federation (ACE_TRY_ENV) == -1)
+ this->init_multicast_server ();
+ }
+ else
+ this->init_multicast_server ();
return 0;
}
int
-Trading_Service::run (void)
+Trading_Service::run (CORBA::Environment &ACE_TRY_ENV)
{
int return_value;
- CORBA::Environment TAO_IN_ENV;
Trading_Shutdown trading_shutdown (*this);
// Run the Trading Service.
- return_value = this->orb_manager_.run (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN (TAO_IN_ENV, -1);
+ return_value = this->orb_manager_.run (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
return return_value;
}
@@ -183,7 +173,7 @@ Trading_Service::init_multicast_server (void)
}
int
-Trading_Service::bootstrap_to_federation (void)
+Trading_Service::bootstrap_to_federation (CORBA::Environment &ACE_TRY_ENV)
{
// If all traders follow this strategy, it creates a complete graph
// of all known traders on a multicast network.
@@ -199,87 +189,79 @@ Trading_Service::bootstrap_to_federation (void)
"Unable to link to other traders.\n"),
-1);
- TAO_TRY
+ ACE_DEBUG ((LM_DEBUG, "*** Narrowing the lookup interface.\n"));
+ CosTrading::Lookup_var lookup_if =
+ CosTrading::Lookup::_narrow (trading_obj.in (), ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ ACE_DEBUG ((LM_DEBUG, "*** Obtaining the link interface.\n"));
+ CosTrading::Link_var link_if = lookup_if->link_if (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ TAO_Trading_Components_i& trd_comp =
+ this->trader_->trading_components ();
+ CosTrading::Lookup_ptr our_lookup = trd_comp.lookup_if ();
+ CosTrading::Link_ptr our_link = trd_comp.link_if ();
+
+ ACE_DEBUG ((LM_DEBUG, "*** Linking found trader to self.\n"));
+ link_if->add_link (this->name_.in (),
+ our_lookup,
+ CosTrading::always,
+ CosTrading::always,
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ ACE_DEBUG ((LM_DEBUG, "*** Linking self to found trader.\n"));
+ our_link->add_link ("Bootstrap",
+ lookup_if.in (),
+ CosTrading::always,
+ CosTrading::always,
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ ACE_DEBUG ((LM_DEBUG, "*** Retrieving list of known linked traders.\n"));
+ CosTrading::LinkNameSeq_var link_name_seq =
+ link_if->list_links (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ ACE_DEBUG ((LM_DEBUG, "*** Linking self to all linked traders.\n"));
+ for (int i = link_name_seq->length () - 1; i >= 0; i--)
{
- ACE_DEBUG ((LM_DEBUG, "*** Narrowing the lookup interface.\n"));
- CosTrading::Lookup_var lookup_if =
- CosTrading::Lookup::_narrow (trading_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "*** Obtaining the link interface.\n"));
- CosTrading::Link_var link_if = lookup_if->link_if (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- TAO_Trading_Components_i& trd_comp =
- this->trader_->trading_components ();
- CosTrading::Lookup_ptr our_lookup = trd_comp.lookup_if ();
- CosTrading::Link_ptr our_link = trd_comp.link_if ();
-
- ACE_DEBUG ((LM_DEBUG, "*** Linking found trader to self.\n"));
- link_if->add_link (this->name_.in (),
- our_lookup,
- CosTrading::always,
- CosTrading::always,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "*** Linking self to found trader.\n"));
- our_link->add_link ("Bootstrap",
- lookup_if.in (),
- CosTrading::always,
- CosTrading::always,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "*** Retrieving list of known linked traders.\n"));
- CosTrading::LinkNameSeq_var link_name_seq =
- link_if->list_links (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "*** Linking self to all linked traders.\n"));
- for (int i = link_name_seq->length () - 1; i >= 0; i--)
+ // Avoid linking to ourselves.
+ if (ACE_OS::strcmp (ACE_static_cast (const char*, link_name_seq[i]),
+ this->name_.in ()) != 0)
{
- // Avoid linking to ourselves.
- if (ACE_OS::strcmp (ACE_static_cast (const char*, link_name_seq[i]),
- this->name_.in ()) != 0)
- {
- ACE_DEBUG ((LM_DEBUG, "*** Getting info for link %s.\n",
- ACE_static_cast (const char*, link_name_seq[i])));
- CosTrading::Link::LinkInfo_var link_info =
- link_if->describe_link (link_name_seq[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CosTrading::Lookup_ptr remote_lookup;
- remote_lookup = link_info->target.in ();
-
- ACE_DEBUG ((LM_DEBUG, "*** Retrieving its link interface.\n"));
- CosTrading::Link_var remote_link =
- remote_lookup->link_if (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "*** Creating a link to me from it.\n"));
- remote_link->add_link (this->name_.in (),
- our_lookup,
- CosTrading::always,
- CosTrading::always,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- ACE_DEBUG ((LM_DEBUG, "*** Creating a link to it from me.\n"));
- our_link->add_link (link_name_seq[i],
- remote_lookup,
- CosTrading::always,
- CosTrading::always,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
+ ACE_DEBUG ((LM_DEBUG, "*** Getting info for link %s.\n",
+ ACE_static_cast (const char*, link_name_seq[i])));
+ CosTrading::Link::LinkInfo_var link_info =
+ link_if->describe_link (link_name_seq[i], ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ CosTrading::Lookup_ptr remote_lookup;
+ remote_lookup = link_info->target.in ();
+
+ ACE_DEBUG ((LM_DEBUG, "*** Retrieving its link interface.\n"));
+ CosTrading::Link_var remote_link =
+ remote_lookup->link_if (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ ACE_DEBUG ((LM_DEBUG, "*** Creating a link to me from it.\n"));
+ remote_link->add_link (this->name_.in (),
+ our_lookup,
+ CosTrading::always,
+ CosTrading::always,
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ ACE_DEBUG ((LM_DEBUG, "*** Creating a link to it from me.\n"));
+ our_link->add_link (link_name_seq[i],
+ remote_lookup,
+ CosTrading::always,
+ CosTrading::always,
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
}
}
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("Trading Service");
- }
- TAO_ENDTRY;
return 0;
}
@@ -287,55 +269,55 @@ Trading_Service::bootstrap_to_federation (void)
int
Trading_Service::shutdown (void)
{
- CORBA::Environment TAO_IN_ENV;
-
- if (this->trader_.get () != 0)
+ ACE_TRY_NEW_ENV
{
- TAO_Trading_Components_i& trd_comp
- = this->trader_->trading_components ();
- CosTrading::Link_ptr our_link = trd_comp.link_if ();
+ if (this->trader_.get () != 0)
+ {
+ TAO_Trading_Components_i& trd_comp
+ = this->trader_->trading_components ();
+ CosTrading::Link_ptr our_link = trd_comp.link_if ();
- CosTrading::LinkNameSeq_var link_name_seq =
- our_link->list_links (TAO_IN_ENV);
+ CosTrading::LinkNameSeq_var link_name_seq =
+ our_link->list_links (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- ACE_DEBUG ((LM_DEBUG, "*** Unlinking from federated traders.\n"));
- for (int i = link_name_seq->length () - 1; i >= 0; i--)
- {
- TAO_TRY
+ ACE_DEBUG ((LM_DEBUG, "*** Unlinking from federated traders.\n"));
+ for (int i = link_name_seq->length () - 1; i >= 0; i--)
{
ACE_DEBUG ((LM_DEBUG, "*** Describing the next link.\n"));
CosTrading::Link::LinkInfo_var link_info =
- our_link->describe_link (link_name_seq[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
+ our_link->describe_link (link_name_seq[i], ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
ACE_DEBUG ((LM_DEBUG, "*** Removing link to %s.\n",
ACE_static_cast (const char*, link_name_seq[i])));
- our_link->remove_link (link_name_seq[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
+ our_link->remove_link (link_name_seq[i], ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
CosTrading::Lookup_ptr remote_lookup;
remote_lookup = link_info->target.in ();
-
+
ACE_DEBUG ((LM_DEBUG, "*** Retrieving its link interface.\n"));
CosTrading::Link_var remote_link =
- remote_lookup->link_if (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
+ remote_lookup->link_if (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
ACE_DEBUG ((LM_DEBUG, "*** Removing its link to us.\n"));
-
+
if (this->bootstrapper_)
- remote_link->remove_link ("Bootstrap", TAO_TRY_ENV);
+ remote_link->remove_link ("Bootstrap", ACE_TRY_ENV);
else
- remote_link->remove_link (this->name_.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- // TAO_TRY_ENV.print_exception ("Trading Service");
+ remote_link->remove_link (this->name_.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
}
- TAO_ENDTRY;
}
}
+ ACE_CATCHANY
+ {
+ // ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Trading Service shutting down");
+ }
+ ACE_ENDTRY;
return 0;
}
@@ -386,15 +368,28 @@ main (int argc, char** argv)
{
Trading_Service trader;
- if (trader.init (argc, argv) != -1)
- trader.run ();
- else
+ ACE_TRY_NEW_ENV
{
- ACE_ERROR_RETURN ((LM_ERROR,
- "Failed to initialize the trader.\n"),
- -1);
- }
+ int check = trader.init (argc, argv, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (check != -1)
+ {
+ trader.run (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Failed to initialize the trader.\n"),
+ -1);
+ }
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Trading Service");
+ }
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/orbsvcs/Trading_Service/Trading_Service.h b/TAO/orbsvcs/Trading_Service/Trading_Service.h
index d52d80be5f2..d11c6a2a54a 100644
--- a/TAO/orbsvcs/Trading_Service/Trading_Service.h
+++ b/TAO/orbsvcs/Trading_Service/Trading_Service.h
@@ -56,10 +56,10 @@ public:
~Trading_Service (void);
// Destructor
- int init (int argc, char* argv[]);
+ int init (int argc, char* argv[], CORBA::Environment &ACE_TRY_ENV);
// Initialize the Trading Service with arguments.
- int run (void);
+ int run (CORBA::Environment &ACE_TRY_ENV);
// Run the Trading Service.
int shutdown (void);
@@ -69,7 +69,7 @@ private:
int init_multicast_server (void);
// Enable the Trading Service to answer multicast requests for its IOR.
- int bootstrap_to_federation (void);
+ int bootstrap_to_federation (CORBA::Environment &ACE_TRY_ENV);
// Bootstrap to another trader, and attach to its trader network.
int parse_args (int& argc, char *argv[]);
diff --git a/TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp b/TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp
index 24bbefea8b8..3e31835682d 100644
--- a/TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp
+++ b/TAO/orbsvcs/tests/Trading/Offer_Exporter.cpp
@@ -8,18 +8,18 @@ ACE_RCSID(Trading, Offer_Exporter, "$Id$")
TAO_Offer_Exporter::
TAO_Offer_Exporter (CosTrading::Lookup_ptr lookup_if,
CORBA::Boolean verbose,
- CORBA::Environment& TAO_IN_ENV)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
: verbose_ (verbose)
{
// Initialize the offer sequences and structures.
- this->create_offers ();
+ this->create_offers (ACE_TRY_ENV);
// Obtain the necessary trading service interfaces.
- this->register_ = lookup_if->register_if (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
- this->admin_ = lookup_if->admin_if (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ this->register_ = lookup_if->register_if (ACE_TRY_ENV);
+ ACE_CHECK;
+ this->admin_ = lookup_if->admin_if (ACE_TRY_ENV);
+ // ACE_CHECK;
}
TAO_Offer_Exporter::~TAO_Offer_Exporter (void)
@@ -33,7 +33,7 @@ TAO_Offer_Exporter::~TAO_Offer_Exporter (void)
}
void
-TAO_Offer_Exporter::export_offers (CORBA::Environment& TAO_IN_ENV)
+TAO_Offer_Exporter::export_offers (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::Register::InvalidObjectRef,
CosTrading::IllegalServiceType,
@@ -54,13 +54,13 @@ TAO_Offer_Exporter::export_offers (CORBA::Environment& TAO_IN_ENV)
this->props_fs_[i][4].value <<= "Default";
}
- this->export_to (this->register_.in (), TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ this->export_to (this->register_.in (), ACE_TRY_ENV);
+ // ACE_CHECK;
}
void
TAO_Offer_Exporter::export_to (CosTrading::Register_ptr reg,
- CORBA::Environment& TAO_IN_ENV)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::Register::InvalidObjectRef,
CosTrading::IllegalServiceType,
@@ -72,38 +72,47 @@ TAO_Offer_Exporter::export_to (CosTrading::Register_ptr reg,
CosTrading::MissingMandatoryProperty,
CosTrading::DuplicatePropertyName))
{
- TAO_TRY
+ ACE_TRY
{
for (int i = 0; i < NUM_OFFERS; i++)
{
+ CORBA::Object_ptr offer_obj= this->plotter_[i]._this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
CosTrading::OfferId_var offer_id =
- reg->_cxx_export (this->plotter_[i]._this (TAO_TRY_ENV),
+ reg->_cxx_export (offer_obj,
TT_Info::INTERFACE_NAMES[1],
this->props_plotters_[i],
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (this->verbose_)
{
ACE_DEBUG ((LM_DEBUG, "Registered offer id: %s.\n", offer_id.in ()));
}
- offer_id = reg->_cxx_export (this->printer_[i]._this (TAO_TRY_ENV),
+ offer_obj = this->printer_[i]._this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ offer_id = reg->_cxx_export (offer_obj,
TT_Info::INTERFACE_NAMES[2],
this->props_printers_[i],
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (this->verbose_)
{
ACE_DEBUG ((LM_DEBUG, "Registered offer id: %s.\n", offer_id.in ()));
}
- offer_id = reg->_cxx_export (this->fs_[i]._this (TAO_TRY_ENV),
+ offer_obj = this->fs_[i]._this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ offer_id = reg->_cxx_export (offer_obj,
TT_Info::INTERFACE_NAMES[3],
this->props_fs_[i],
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK
if (this->verbose_)
{
@@ -111,16 +120,17 @@ TAO_Offer_Exporter::export_to (CosTrading::Register_ptr reg,
}
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::export_offers");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Exporter::export_offers");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ // ACE_CHECK;
}
void
-TAO_Offer_Exporter::export_offers_to_all (CORBA::Environment& TAO_IN_ENV)
+TAO_Offer_Exporter::export_offers_to_all (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::Register::InvalidObjectRef,
CosTrading::IllegalServiceType,
@@ -139,8 +149,8 @@ TAO_Offer_Exporter::export_offers_to_all (CORBA::Environment& TAO_IN_ENV)
ACE_DEBUG ((LM_DEBUG, "Obtaining link interface.\n"));
}
- CosTrading::Link_var link_if = this->register_->link_if (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ CosTrading::Link_var link_if = this->register_->link_if (ACE_TRY_ENV);
+ ACE_CHECK;
if (this->verbose_)
{
@@ -148,8 +158,8 @@ TAO_Offer_Exporter::export_offers_to_all (CORBA::Environment& TAO_IN_ENV)
" linked to the root trader.\n"));
}
- CosTrading::LinkNameSeq_var link_name_seq = link_if->list_links (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ CosTrading::LinkNameSeq_var link_name_seq = link_if->list_links (ACE_TRY_ENV);
+ ACE_CHECK;
if (this->verbose_)
{
@@ -159,7 +169,7 @@ TAO_Offer_Exporter::export_offers_to_all (CORBA::Environment& TAO_IN_ENV)
for (int i = link_name_seq->length () - 1; i >= 0; i--)
{
- TAO_TRY
+ ACE_TRY
{
if (this->verbose_)
{
@@ -168,7 +178,8 @@ TAO_Offer_Exporter::export_offers_to_all (CORBA::Environment& TAO_IN_ENV)
}
CosTrading::Link::LinkInfo_var link_info =
- link_if->describe_link (link_name_seq[i], TAO_IN_ENV);
+ link_if->describe_link (link_name_seq[i], ACE_TRY_ENV);
+ ACE_TRY_CHECK;
for (int j = 0; j < NUM_OFFERS; j++)
{
@@ -183,19 +194,20 @@ TAO_Offer_Exporter::export_offers_to_all (CORBA::Environment& TAO_IN_ENV)
ACE_static_cast (const char*, link_name_seq[i])));
}
- this->export_to (link_info->target_reg.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->export_to (link_info->target_reg.in (), ACE_TRY_ENV);
+ //ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
+ // @@ IGNORE??
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
}
void
-TAO_Offer_Exporter::withdraw_offers (CORBA::Environment& TAO_IN_ENV)
+TAO_Offer_Exporter::withdraw_offers (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalOfferId,
CosTrading::UnknownOfferId,
@@ -203,33 +215,33 @@ TAO_Offer_Exporter::withdraw_offers (CORBA::Environment& TAO_IN_ENV)
{
ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Exporter::Withdrawing all offers.\n"));
- TAO_TRY
+ ACE_TRY
{
CORBA::ULong length;
- CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (TAO_IN_ENV);
- TAO_CHECK_ENV;
+ CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (offer_id_seq.ptr () != 0)
{
length = offer_id_seq->length ();
for (CORBA::ULong i = 0; i < length; i++)
{
- this->register_->withdraw (offer_id_seq[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->register_->withdraw (offer_id_seq[i], ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::withdraw_offers");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Exporter::withdraw_offers");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
void
-TAO_Offer_Exporter::describe_offers (CORBA::Environment& TAO_IN_ENV)
+TAO_Offer_Exporter::describe_offers (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalOfferId,
CosTrading::UnknownOfferId,
@@ -237,11 +249,11 @@ TAO_Offer_Exporter::describe_offers (CORBA::Environment& TAO_IN_ENV)
{
ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Exporter::Describing all offers.\n"));
- TAO_TRY
+ ACE_TRY
{
CORBA::ULong length;
- CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (TAO_IN_ENV);
- TAO_CHECK_ENV;
+ CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (offer_id_seq.ptr () != 0)
{
@@ -253,29 +265,30 @@ TAO_Offer_Exporter::describe_offers (CORBA::Environment& TAO_IN_ENV)
for (CORBA::ULong i = 0; i < length; i++)
{
CosTrading::Register::OfferInfo_var offer_info =
- this->register_->describe (offer_id_seq[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->register_->describe (offer_id_seq[i], ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (this->verbose_)
{
ACE_DEBUG ((LM_DEBUG, "Offer Id: %s\n", (const char *) offer_id_seq[i]));
ACE_DEBUG ((LM_DEBUG, "Service Type: %s\n", offer_info->type.in ()));
- TT_Info::dump_properties (offer_info->properties, 0);
+ TT_Info::dump_properties (offer_info->properties, 0, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "------------------------------\n"));
}
}
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::describe_offers");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Exporter::describe_offers");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
void
-TAO_Offer_Exporter::modify_offers (CORBA::Environment& TAO_IN_ENV)
+TAO_Offer_Exporter::modify_offers (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::NotImplemented,
CosTrading::IllegalOfferId,
@@ -291,10 +304,10 @@ TAO_Offer_Exporter::modify_offers (CORBA::Environment& TAO_IN_ENV)
{
ACE_DEBUG ((LM_DEBUG, "*** TAO_Offer_Exporter::Modifying all offers.\n"));
- TAO_TRY
+ ACE_TRY
{
- CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (TAO_IN_ENV);
- TAO_CHECK_ENV;
+ CosTrading::OfferIdSeq_var offer_id_seq = this->grab_offerids (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (offer_id_seq.ptr () != 0)
{
@@ -315,22 +328,22 @@ TAO_Offer_Exporter::modify_offers (CORBA::Environment& TAO_IN_ENV)
this->register_->modify (offer_id_seq[i],
del_list,
modify_list,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::modify_offers");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Exporter::modify_offers");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
void
TAO_Offer_Exporter::
-withdraw_offers_using_constraints (CORBA::Environment& TAO_IN_ENV)
+withdraw_offers_using_constraints (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
@@ -345,36 +358,37 @@ withdraw_offers_using_constraints (CORBA::Environment& TAO_IN_ENV)
if (this->verbose_)
ACE_DEBUG ((LM_DEBUG, "Constraint: %s\n", constraint));
- TAO_TRY
+ ACE_TRY
{
this->register_->
withdraw_using_constraint (TT_Info::INTERFACE_NAMES[TT_Info::PLOTTER],
constraint,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
this->register_->
withdraw_using_constraint (TT_Info::INTERFACE_NAMES[TT_Info::PRINTER],
constraint,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
this->register_->
withdraw_using_constraint (TT_Info::INTERFACE_NAMES[TT_Info::FILESYSTEM],
constraint,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::withdraw_using_constraint");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "TAO_Offer_Exporter::withdraw_using_constraint");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
CosTrading::OfferIdSeq*
-TAO_Offer_Exporter::grab_offerids (CORBA::Environment& TAO_IN_ENV)
+TAO_Offer_Exporter::grab_offerids (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::NotImplemented))
{
@@ -382,7 +396,7 @@ TAO_Offer_Exporter::grab_offerids (CORBA::Environment& TAO_IN_ENV)
ACE_DEBUG ((LM_DEBUG, "TAO_Offer_Exporter::Grabbing all offer ids.\n"));
CosTrading::OfferIdSeq_ptr offer_id_seq;
- TAO_TRY
+ ACE_TRY
{
CORBA::ULong length = NUM_OFFERS;
CosTrading::OfferIdIterator_ptr offer_id_iter;
@@ -390,8 +404,8 @@ TAO_Offer_Exporter::grab_offerids (CORBA::Environment& TAO_IN_ENV)
this->admin_->list_offers (NUM_OFFERS,
CosTrading::OfferIdSeq_out (offer_id_seq),
CosTrading::OfferIdIterator_out (offer_id_iter),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if ((! CORBA::is_nil (offer_id_iter)) && offer_id_seq != 0)
{
@@ -404,8 +418,8 @@ TAO_Offer_Exporter::grab_offerids (CORBA::Environment& TAO_IN_ENV)
any_left =
offer_id_iter->next_n (length,
CosTrading::OfferIdSeq_out (id_seq),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
int offers = id_seq->length ();
int old_length = offer_id_seq->length ();
@@ -418,8 +432,8 @@ TAO_Offer_Exporter::grab_offerids (CORBA::Environment& TAO_IN_ENV)
}
while (any_left);
- offer_id_iter->destroy (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_id_iter->destroy (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
if (this->verbose_)
@@ -429,18 +443,21 @@ TAO_Offer_Exporter::grab_offerids (CORBA::Environment& TAO_IN_ENV)
ACE_DEBUG ((LM_DEBUG, "Offer Id: %s\n", (const char *)(*offer_id_seq)[j]));
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Offer_Exporter::grab_offerids");
- TAO_RETHROW_RETURN (offer_id_seq);
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "TAO_Offer_Exporter::grab_offerids");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ // @@ redundant.
+ // ACE_CHECK_RETURN (offer_id_seq);
return offer_id_seq;
}
void
-TAO_Offer_Exporter::create_offers (void)
+TAO_Offer_Exporter::create_offers (CORBA::Environment &ACE_TRY_ENV)
{
const int QUEUE_SIZE = 4;
@@ -451,7 +468,6 @@ TAO_Offer_Exporter::create_offers (void)
TAO_Trader_Test::StringSeq string_seq (QUEUE_SIZE);
TAO_Trader_Test::ULongSeq ulong_seq (QUEUE_SIZE);
- CORBA::Environment TAO_IN_ENV;
CosTradingDynamic::DynamicProp* dp_user_queue;
CosTradingDynamic::DynamicProp* dp_file_queue;
CosTradingDynamic::DynamicProp* dp_space_left;
@@ -514,10 +530,13 @@ TAO_Offer_Exporter::create_offers (void)
this->props_plotters_[i][8].value <<= TT_Info::MODEL_NUMBERS[i];
this->props_plotters_[i][9].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_USER_QUEUE];
this->props_plotters_[i][9].
- value.replace (CosTradingDynamic::_tc_DynamicProp, dp_user_queue, 1, TAO_IN_ENV);
+ value.replace (CosTradingDynamic::_tc_DynamicProp, dp_user_queue, 1, ACE_TRY_ENV);
+ ACE_CHECK;
+
this->props_plotters_[i][10].name = TT_Info::PLOTTER_PROPERTY_NAMES[TT_Info::PLOTTER_FILE_SIZES_PENDING];
this->props_plotters_[i][10].
- value.replace (CosTradingDynamic::_tc_DynamicProp, dp_file_queue, 1, TAO_IN_ENV);
+ value.replace (CosTradingDynamic::_tc_DynamicProp, dp_file_queue, 1, ACE_TRY_ENV);
+ ACE_CHECK;
}
// Initialize printers
@@ -575,10 +594,12 @@ TAO_Offer_Exporter::create_offers (void)
this->props_printers_[i][9].value <<= (CORBA::UShort) i;
this->props_printers_[i][10].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_USER_QUEUE];
this->props_printers_[i][10].
- value.replace (CosTradingDynamic::_tc_DynamicProp, dp_user_queue, 1, TAO_IN_ENV);
+ value.replace (CosTradingDynamic::_tc_DynamicProp, dp_user_queue, 1, ACE_TRY_ENV);
+ ACE_CHECK;
this->props_printers_[i][11].name = TT_Info::PRINTER_PROPERTY_NAMES[TT_Info::PRINTER_FILE_SIZES_PENDING];
this->props_printers_[i][11].
- value.replace (CosTradingDynamic::_tc_DynamicProp, dp_file_queue, 1, TAO_IN_ENV);
+ value.replace (CosTradingDynamic::_tc_DynamicProp, dp_file_queue, 1, ACE_TRY_ENV);
+ ACE_CHECK;
}
// Initialize FileSystem
@@ -616,7 +637,8 @@ TAO_Offer_Exporter::create_offers (void)
this->props_fs_[i][6].value <<= (CORBA::UShort) (i + 1);
this->props_fs_[i][7].name = TT_Info::FILESYSTEM_PROPERTY_NAMES[TT_Info::SPACE_REMAINING];
this->props_fs_[i][7].
- value.replace (CosTradingDynamic::_tc_DynamicProp, dp_space_left, 1, TAO_IN_ENV);
+ value.replace (CosTradingDynamic::_tc_DynamicProp, dp_space_left, 1, ACE_TRY_ENV);
+ ACE_CHECK;
}
}
diff --git a/TAO/orbsvcs/tests/Trading/Offer_Exporter.h b/TAO/orbsvcs/tests/Trading/Offer_Exporter.h
index de4e98abb00..dfe4070df25 100644
--- a/TAO/orbsvcs/tests/Trading/Offer_Exporter.h
+++ b/TAO/orbsvcs/tests/Trading/Offer_Exporter.h
@@ -25,12 +25,12 @@ public:
TAO_Offer_Exporter (CosTrading::Lookup_ptr lookup_if,
CORBA::Boolean verbose,
- CORBA::Environment& env)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException));
~TAO_Offer_Exporter (void);
- void export_offers (CORBA::Environment& env)
+ void export_offers (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::Register::InvalidObjectRef,
CosTrading::IllegalServiceType,
@@ -43,7 +43,7 @@ public:
CosTrading::DuplicatePropertyName));
// Export a number of offers to the Trading Service.
- void export_offers_to_all (CORBA::Environment& env)
+ void export_offers_to_all (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::Register::InvalidObjectRef,
CosTrading::IllegalServiceType,
@@ -57,21 +57,21 @@ public:
// Export a number of offers to all traders accessible by the
// bootstrapped trader.
- void withdraw_offers (CORBA::Environment& env)
+ void withdraw_offers (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalOfferId,
CosTrading::UnknownOfferId,
CosTrading::Register::ProxyOfferId));
// Withdraw all exported offers.
- void describe_offers (CORBA::Environment& env)
+ void describe_offers (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalOfferId,
CosTrading::UnknownOfferId,
CosTrading::Register::ProxyOfferId));
// Describe all the offers registered with the bootstrapped trader.
- void modify_offers (CORBA::Environment& env)
+ void modify_offers (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::NotImplemented,
CosTrading::IllegalOfferId,
@@ -86,7 +86,7 @@ public:
CosTrading::DuplicatePropertyName));
// Remove some properties and change some properties in each offer.
- void withdraw_offers_using_constraints (CORBA::Environment& env)
+ void withdraw_offers_using_constraints (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
@@ -96,15 +96,15 @@ public:
private:
- CosTrading::OfferIdSeq* grab_offerids (CORBA::Environment& env)
+ CosTrading::OfferIdSeq* grab_offerids (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::NotImplemented));
- void create_offers (void);
+ void create_offers (CORBA::Environment &ACE_TRY_ENV);
// Fill in each of the offer structures.
void export_to (CosTrading::Register_ptr reg,
- CORBA::Environment& _env)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::Register::InvalidObjectRef,
CosTrading::IllegalServiceType,
diff --git a/TAO/orbsvcs/tests/Trading/Offer_Importer.cpp b/TAO/orbsvcs/tests/Trading/Offer_Importer.cpp
index 92880472e2f..0f0f8127c2f 100644
--- a/TAO/orbsvcs/tests/Trading/Offer_Importer.cpp
+++ b/TAO/orbsvcs/tests/Trading/Offer_Importer.cpp
@@ -12,7 +12,7 @@ TAO_Offer_Importer::TAO_Offer_Importer (CosTrading::Lookup_ptr lookup_if,
}
void
-TAO_Offer_Importer::perform_queries (CORBA::Environment& TAO_IN_ENV)
+TAO_Offer_Importer::perform_queries (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
@@ -34,12 +34,12 @@ TAO_Offer_Importer::perform_queries (CORBA::Environment& TAO_IN_ENV)
policies.return_card (16*NUM_OFFERS);
policies.link_follow_rule (CosTrading::always);
- this->perform_queries_with_policies (policies, TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ this->perform_queries_with_policies (policies, ACE_TRY_ENV);
+ // ACE_CHECK;
}
void
-TAO_Offer_Importer::perform_directed_queries (CORBA::Environment& TAO_IN_ENV)
+TAO_Offer_Importer::perform_directed_queries (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
@@ -63,16 +63,16 @@ TAO_Offer_Importer::perform_directed_queries (CORBA::Environment& TAO_IN_ENV)
if (this->verbose_)
ACE_DEBUG ((LM_DEBUG, "Obtaining link interface.\n"));
- CosTrading::Link_var link_if = this->lookup_->link_if (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ CosTrading::Link_var link_if = this->lookup_->link_if (ACE_TRY_ENV);
+ ACE_CHECK;
if (this->verbose_)
{
ACE_DEBUG ((LM_DEBUG, "Obtaining references to traders directly"
" linked to the root trader.\n"));
}
- CosTrading::LinkNameSeq_var link_name_seq = link_if->list_links (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ CosTrading::LinkNameSeq_var link_name_seq = link_if->list_links (ACE_TRY_ENV);
+ ACE_CHECK;
if (link_name_seq->length () > 0)
{
@@ -83,15 +83,15 @@ TAO_Offer_Importer::perform_directed_queries (CORBA::Environment& TAO_IN_ENV)
}
CosTrading::Link::LinkInfo_var link_info =
- link_if->describe_link (link_name_seq[0], TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ link_if->describe_link (link_name_seq[0], ACE_TRY_ENV);
+ ACE_CHECK;
CosTrading::Lookup_ptr lookup_if = link_info->target.in ();
- CosTrading::Link_var link_if2 = lookup_if->link_if (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ CosTrading::Link_var link_if2 = lookup_if->link_if (ACE_TRY_ENV);
+ ACE_CHECK;
- CosTrading::LinkNameSeq_var link_name_seq2 = link_if2->list_links (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ CosTrading::LinkNameSeq_var link_name_seq2 = link_if2->list_links (ACE_TRY_ENV);
+ ACE_CHECK;
if (link_name_seq2->length () > 0)
{
@@ -117,8 +117,8 @@ TAO_Offer_Importer::perform_directed_queries (CORBA::Environment& TAO_IN_ENV)
policies.starting_trader (new CosTrading::TraderName
(2, 2, trader_name, 1));
- this->perform_queries_with_policies (policies, TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ this->perform_queries_with_policies (policies, ACE_TRY_ENV);
+ ACE_CHECK;
}
}
else
@@ -138,7 +138,7 @@ TAO_Offer_Importer::perform_directed_queries (CORBA::Environment& TAO_IN_ENV)
void
TAO_Offer_Importer::
perform_queries_with_policies (const TAO_Policy_Creator& policies,
- CORBA::Environment& TAO_IN_ENV)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
@@ -151,7 +151,7 @@ perform_queries_with_policies (const TAO_Policy_Creator& policies,
CosTrading::DuplicatePropertyName,
CosTrading::DuplicatePolicyName))
{
- TAO_TRY
+ ACE_TRY
{
CosTrading::Lookup::SpecifiedProps desired_props;
@@ -190,8 +190,8 @@ perform_queries_with_policies (const TAO_Policy_Creator& policies,
offer_seq_out,
offer_iterator_out,
limits_applied_out,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CosTrading::OfferSeq_var offer_seq (offer_seq_ptr);
CosTrading::OfferIterator_var offer_iterator (offer_iterator_ptr);
@@ -202,8 +202,8 @@ perform_queries_with_policies (const TAO_Policy_Creator& policies,
ACE_DEBUG ((LM_DEBUG, "*** Results:\n\n"));
this->display_results (*offer_seq_ptr,
offer_iterator_ptr,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (limits_applied_out->length () > 0)
ACE_DEBUG ((LM_DEBUG, "*** Limits Applied:\n\n"));
@@ -217,21 +217,21 @@ perform_queries_with_policies (const TAO_Policy_Creator& policies,
}
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Offer_Importer::perform_queries");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Importer::perform_queries");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
void
TAO_Offer_Importer::display_results (const CosTrading::OfferSeq& offer_seq,
CosTrading::OfferIterator_ptr offer_iterator,
- CORBA::Environment& TAO_IN_ENV) const
+ CORBA::Environment& ACE_TRY_ENV) const
ACE_THROW_SPEC ((CORBA::SystemException))
{
- TAO_TRY
+ ACE_TRY
{
CORBA::ULong length = 0, i = 0;
ACE_DEBUG ((LM_DEBUG, "------------------------------\n"));
@@ -242,13 +242,14 @@ TAO_Offer_Importer::display_results (const CosTrading::OfferSeq& offer_seq,
// Call back to the exported object.
TAO_Trader_Test::Remote_Output_var remote_output =
TAO_Trader_Test::Remote_Output::_narrow (offer_seq[i].reference.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- remote_output->confirm (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ remote_output->confirm (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- TT_Info::dump_properties (offer_seq[i].properties);
+ TT_Info::dump_properties (offer_seq[i].properties, 1, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "------------------------------\n"));
}
@@ -266,8 +267,8 @@ TAO_Offer_Importer::display_results (const CosTrading::OfferSeq& offer_seq,
any_left = offer_iterator->next_n (length,
iter_offers_out,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CosTrading::OfferSeq_var iter_offers (iter_offers_ptr);
for (length = iter_offers->length (), i = 0; i < length; i++)
@@ -275,27 +276,27 @@ TAO_Offer_Importer::display_results (const CosTrading::OfferSeq& offer_seq,
// Call back to the exported object.
TAO_Trader_Test::Remote_Output_var remote_output =
TAO_Trader_Test::Remote_Output::_narrow (offer_seq[i].reference.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- remote_output->confirm (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ remote_output->confirm (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CosTrading::PropertySeq& props = iter_offers[i].properties;
- TT_Info::dump_properties (props);
+ TT_Info::dump_properties (props, 1, ACE_TRY_ENV);
ACE_DEBUG ((LM_DEBUG, "------------------------------\n"));
}
} while (any_left);
- offer_iterator->destroy (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_iterator->destroy (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Offer_Importer::display_results");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Offer_Importer::display_results");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
diff --git a/TAO/orbsvcs/tests/Trading/Offer_Importer.h b/TAO/orbsvcs/tests/Trading/Offer_Importer.h
index c55f8314e3a..a499a4b3f89 100644
--- a/TAO/orbsvcs/tests/Trading/Offer_Importer.h
+++ b/TAO/orbsvcs/tests/Trading/Offer_Importer.h
@@ -32,7 +32,7 @@ public:
TAO_Offer_Importer (CosTrading::Lookup_ptr lookup_if,
CORBA::Boolean verbose = 1);
- void perform_queries (CORBA::Environment& _env)
+ void perform_queries (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
@@ -46,7 +46,7 @@ public:
CosTrading::DuplicatePolicyName));
// Barrage the bootstrapped-to trader with queries.
- void perform_directed_queries (CORBA::Environment& _env)
+ void perform_directed_queries (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
@@ -64,7 +64,7 @@ public:
private:
void perform_queries_with_policies (const TAO_Policy_Creator& policy_manager,
- CORBA::Environment& _env)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
@@ -81,7 +81,7 @@ private:
void display_results (const CosTrading::OfferSeq& offer_seq,
CosTrading::OfferIterator_ptr offer_iterator,
- CORBA::Environment& _env) const
+ CORBA::Environment& ACE_TRY_ENV) const
ACE_THROW_SPEC ((CORBA::SystemException));
// Display the results of the query to the screen.
diff --git a/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.cpp b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.cpp
index e0502e4b1f3..6e5a4744e94 100644
--- a/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.cpp
+++ b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.cpp
@@ -7,43 +7,42 @@ ACE_RCSID(Trading, Service_Type_Exporter, "$Id$")
TAO_Service_Type_Exporter::
TAO_Service_Type_Exporter (CosTrading::Lookup_ptr lookup_if,
CORBA::Boolean verbose,
- CORBA::Environment& TAO_IN_ENV)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
: verbose_ (verbose),
lookup_ (lookup_if)
{
// Obtain the Service Type Repository.
- CosTrading::TypeRepository_var obj = lookup_if->type_repos (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ CosTrading::TypeRepository_var obj = lookup_if->type_repos (ACE_TRY_ENV);
+ ACE_CHECK;
// Narrow the Service Type Repository.
- this->repos_ = CosTradingRepos::ServiceTypeRepository::_narrow (obj.in (), TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ this->repos_ = CosTradingRepos::ServiceTypeRepository::_narrow (obj.in (),
+ ACE_TRY_ENV);
+ ACE_CHECK;
// Build the service type descriptions.
this->create_types ();
}
void
-TAO_Service_Type_Exporter::remove_all_types (CORBA::Environment& TAO_IN_ENV)
+TAO_Service_Type_Exporter::remove_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
CosTradingRepos::ServiceTypeRepository::HasSubTypes))
{
- ACE_UNUSED_ARG (TAO_IN_ENV);
-
ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::removing all"
" types from the Repository.\n"));
for (int i = NUM_TYPES - 1; i >= 0; i--)
{
- TAO_TRY
+ ACE_TRY
{
- this->repos_->remove_type (TT_Info::INTERFACE_NAMES[i], TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->repos_->remove_type (TT_Info::INTERFACE_NAMES[i], ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (CosTrading::UnknownServiceType, excp)
+ ACE_CATCH (CosTrading::UnknownServiceType, excp)
{
if (this->verbose_)
{
@@ -51,18 +50,19 @@ TAO_Service_Type_Exporter::remove_all_types (CORBA::Environment& TAO_IN_ENV)
ACE_DEBUG ((LM_DEBUG, "Service type not yet registered: %s\n", excp.type.in ()));
}
- TAO_TRY_ENV.clear ();
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Service_Type_Exporter::remove_all_types");
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "TAO_Service_Type_Exporter::remove_all_types");
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ ACE_CHECK;
}
}
void
-TAO_Service_Type_Exporter::add_all_types (CORBA::Environment& TAO_IN_ENV)
+TAO_Service_Type_Exporter::add_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTradingRepos::ServiceTypeRepository::ServiceTypeExists,
@@ -76,12 +76,12 @@ TAO_Service_Type_Exporter::add_all_types (CORBA::Environment& TAO_IN_ENV)
{
ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::"
"adding all types to the Repository.\n"));
- this->add_all_types_to (this->repos_.ptr (), TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ this->add_all_types_to (this->repos_.ptr (), ACE_TRY_ENV);
+ // ACE_CHECK;
}
void
-TAO_Service_Type_Exporter::add_all_types_to_all (CORBA::Environment& TAO_IN_ENV)
+TAO_Service_Type_Exporter::add_all_types_to_all (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTradingRepos::ServiceTypeRepository::ServiceTypeExists,
@@ -96,50 +96,57 @@ TAO_Service_Type_Exporter::add_all_types_to_all (CORBA::Environment& TAO_IN_ENV)
"add all types to all repositories.\n"));
ACE_DEBUG ((LM_DEBUG, "Obtaining link interface.\n"));
- CosTrading::Link_var link_if = this->lookup_->link_if (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ CosTrading::Link_var link_if = this->lookup_->link_if (ACE_TRY_ENV);
+ ACE_CHECK;
ACE_DEBUG ((LM_DEBUG, "Obtaining references to traders directly"
" linked to the root trader.\n"));
- CosTrading::LinkNameSeq_var link_name_seq = link_if->list_links (TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
+ CosTrading::LinkNameSeq_var link_name_seq = link_if->list_links (ACE_TRY_ENV);
+ ACE_CHECK;
ACE_DEBUG ((LM_DEBUG, "Exporting service types with each of the linked"
" traders.\n"));
for (int i = link_name_seq->length () - 1; i >= 0; i--)
{
- TAO_TRY
+ CosTradingRepos::ServiceTypeRepository_ptr str = 0;
+ ACE_TRY
{
ACE_DEBUG ((LM_DEBUG, "Getting link information for %s\n",
ACE_static_cast (const char*, link_name_seq[i])));
CosTrading::Link::LinkInfo_var link_info =
- link_if->describe_link (link_name_seq[i], TAO_IN_ENV);
+ link_if->describe_link (link_name_seq[i], ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "Adding service types to %s\n",
ACE_static_cast (const char*, link_name_seq[i])));
CosTrading::TypeRepository_var remote_repos =
- link_info->target->type_repos (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ link_info->target->type_repos (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- CosTradingRepos::ServiceTypeRepository_ptr str =
- CosTradingRepos::ServiceTypeRepository::_narrow (remote_repos.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ str =
+ CosTradingRepos::ServiceTypeRepository::_narrow (remote_repos.in (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- this->add_all_types_to (str, TAO_IN_ENV);
- TAO_CHECK_ENV_RETURN_VOID (TAO_IN_ENV);
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
+ // @@ Seth, Ignore all these exceptions?
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ ACE_CHECK;
+
+ // @@ Seth, But this one?
+ this->add_all_types_to (str, ACE_TRY_ENV);
+ ACE_CHECK;
}
}
void
TAO_Service_Type_Exporter::
add_all_types_to (CosTradingRepos::ServiceTypeRepository_ptr repos,
- CORBA::Environment& TAO_IN_ENV)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTradingRepos::ServiceTypeRepository::ServiceTypeExists,
@@ -152,58 +159,54 @@ add_all_types_to (CosTradingRepos::ServiceTypeRepository_ptr repos,
{
for (int i = 0; i < NUM_TYPES; i++)
{
- TAO_TRY
+ ACE_TRY
{
repos->add_type (TT_Info::INTERFACE_NAMES[i],
this->type_structs_[i].if_name,
this->type_structs_[i].props,
this->type_structs_[i].super_types,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCH (CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, ste)
+ ACE_CATCH (CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, ste)
{
- TAO_TRY_ENV.print_exception ("TAO_Service_Type_Exporter::add_all_types");
+ ACE_PRINT_EXCEPTION (ste, "TAO_Service_Type_Exporter::add_all_types");
if (ste.name.in () != 0)
ACE_DEBUG ((LM_DEBUG, "Invalid name: %s\n", ste.name.in ()));
-
- TAO_TRY_ENV.clear ();
}
- TAO_CATCH (CosTrading::IllegalPropertyName, excp)
+ ACE_CATCH (CosTrading::IllegalPropertyName, excp)
{
- TAO_TRY_ENV.print_exception ("TAO_Service_Type_Exporter::add_all_types");
+ ACE_PRINT_EXCEPTION (excp, "TAO_Service_Type_Exporter::add_all_types");
if (excp.name.in () != 0)
ACE_DEBUG ((LM_DEBUG, "Invalid name: %s\n", excp.name.in ()));
-
- TAO_TRY_ENV.clear ();
}
- TAO_CATCH (CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, vtr)
+ ACE_CATCH (CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, vtr)
{
- TAO_TRY_ENV.print_exception ("TAO_Service_Type_Exporter::add_all_types");
+ ACE_PRINT_EXCEPTION (vtr, "TAO_Service_Type_Exporter::add_all_types");
if (vtr.type_1.in () != 0)
ACE_DEBUG ((LM_DEBUG, "Type One: %s\n", vtr.type_2.in ()));
if (vtr.type_2.in () != 0)
ACE_DEBUG ((LM_DEBUG, "Type Two: %s\n", vtr.type_2.in ()));
-
- TAO_TRY_ENV.clear ();
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Service_Type_Exporter::add_all_types");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "TAO_Service_Type_Exporter::add_all_types");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ ACE_CHECK;
}
}
void
-TAO_Service_Type_Exporter::list_all_types (CORBA::Environment& TAO_IN_ENV)
+TAO_Service_Type_Exporter::list_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- TAO_TRY
+ ACE_TRY
{
CosTradingRepos::ServiceTypeRepository::SpecifiedServiceTypes sst;
ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::"
@@ -211,8 +214,8 @@ TAO_Service_Type_Exporter::list_all_types (CORBA::Environment& TAO_IN_ENV)
sst.all_ (1);
CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq_var type_names =
- this->repos_->list_types (sst, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->repos_->list_types (sst, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
for (int i = type_names->length () - 1; i >= 0; i--)
{
@@ -223,21 +226,23 @@ TAO_Service_Type_Exporter::list_all_types (CORBA::Environment& TAO_IN_ENV)
}
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Service_Type_Exporter::list_all_types");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "TAO_Service_Type_Exporter::list_all_types");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ // ACE_CHECK;
}
void
-TAO_Service_Type_Exporter::describe_all_types (CORBA::Environment& TAO_IN_ENV)
+TAO_Service_Type_Exporter::describe_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType))
{
- TAO_TRY
+ ACE_TRY
{
ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::"
"describing all types in the Repository.\n"));
@@ -246,8 +251,8 @@ TAO_Service_Type_Exporter::describe_all_types (CORBA::Environment& TAO_IN_ENV)
{
CosTradingRepos::ServiceTypeRepository::TypeStruct_var type_struct =
this->repos_->describe_type (TT_Info::INTERFACE_NAMES[i],
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (this->verbose_)
{
@@ -256,21 +261,22 @@ TAO_Service_Type_Exporter::describe_all_types (CORBA::Environment& TAO_IN_ENV)
}
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Service_Type_Exporter::describe_all_types");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "TAO_Service_Type_Exporter::describe_all_types");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
void
-TAO_Service_Type_Exporter::fully_describe_all_types (CORBA::Environment& TAO_IN_ENV)
+TAO_Service_Type_Exporter::fully_describe_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType))
{
- TAO_TRY
+ ACE_TRY
{
ACE_DEBUG ((LM_DEBUG, "*** TAO_Service_Type_Exporter::"
"fully describing all types in the Repository.\n"));
@@ -279,8 +285,8 @@ TAO_Service_Type_Exporter::fully_describe_all_types (CORBA::Environment& TAO_IN_
{
CosTradingRepos::ServiceTypeRepository::TypeStruct_var type_struct =
this->repos_->fully_describe_type (TT_Info::INTERFACE_NAMES[i],
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (this->verbose_)
{
@@ -289,12 +295,13 @@ TAO_Service_Type_Exporter::fully_describe_all_types (CORBA::Environment& TAO_IN_
}
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
- TAO_TRY_ENV.print_exception ("TAO_Service_Type_Exporter::fully_describe_all_types");
- TAO_RETHROW;
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "TAO_Service_Type_Exporter::fully_describe_all_types");
+ ACE_RETHROW;
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
}
void
diff --git a/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h
index a99ab322991..e5645cb087b 100644
--- a/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h
+++ b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h
@@ -24,17 +24,17 @@ public:
TAO_Service_Type_Exporter (CosTrading::Lookup_ptr lookup_if,
CORBA::Boolean verbose,
- CORBA::Environment& _env)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException));
- void remove_all_types (CORBA::Environment& _env)
+ void remove_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType,
CosTradingRepos::ServiceTypeRepository::HasSubTypes));
// Remove all service types from the trading service instance.
- void add_all_types (CORBA::Environment& _env)
+ void add_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTradingRepos::ServiceTypeRepository::ServiceTypeExists,
@@ -46,7 +46,7 @@ public:
CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName));
// Add all the generated service types to the trading service instance.
- void add_all_types_to_all (CORBA::Environment& _env)
+ void add_all_types_to_all (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTradingRepos::ServiceTypeRepository::ServiceTypeExists,
@@ -59,19 +59,19 @@ public:
// Add all the generated service types to all the trading service
// instances linked to the trading service we bootstrapped to.
- void list_all_types (CORBA::Environment& _env)
+ void list_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException));
// List all the service types registered with the trading service
// instance.
- void describe_all_types (CORBA::Environment& _env)
+ void describe_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType));
// Describe all the service types registered with the trading
// service instance.
- void fully_describe_all_types (CORBA::Environment& _env)
+ void fully_describe_all_types (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTrading::UnknownServiceType));
@@ -85,7 +85,7 @@ private:
// Generate the service type description structures.
void add_all_types_to (CosTradingRepos::ServiceTypeRepository_ptr repos,
- CORBA::Environment& _env)
+ CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException,
CosTrading::IllegalServiceType,
CosTradingRepos::ServiceTypeRepository::ServiceTypeExists,
diff --git a/TAO/orbsvcs/tests/Trading/TT_Info.cpp b/TAO/orbsvcs/tests/Trading/TT_Info.cpp
index e3842003ad5..0db27b21843 100644
--- a/TAO/orbsvcs/tests/Trading/TT_Info.cpp
+++ b/TAO/orbsvcs/tests/Trading/TT_Info.cpp
@@ -139,9 +139,9 @@ const char* TT_Info::QUERIES[][3] =
void
TT_Info::dump_properties (const CosTrading::PropertySeq& prop_seq,
- CORBA::Boolean print_dynamic)
+ CORBA::Boolean print_dynamic,
+ CORBA::Environment &ACE_TRY_ENV)
{
- CORBA::Environment env;
TAO_Property_Evaluator prop_eval (prop_seq);
for (int length = prop_seq.length (), k = 0; k < length; k++)
@@ -150,15 +150,15 @@ TT_Info::dump_properties (const CosTrading::PropertySeq& prop_seq,
CORBA::Any* value = 0;
CORBA::TypeCode_ptr tc = 0;
ACE_DEBUG ((LM_DEBUG, "%-15s: ", prop_seq[k].name.in ()));
- TAO_TRY
+ ACE_TRY
{
CORBA::Boolean is_dynamic = prop_eval.is_dynamic_property (k);
- TAO_CHECK_ENV;
+ ACE_TRY_CHECK;
if (print_dynamic || ! is_dynamic)
{
- value = prop_eval.property_value(k, env);
- TAO_CHECK_ENV;
+ value = prop_eval.property_value(k, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
tc = value->type ();
}
@@ -167,15 +167,20 @@ TT_Info::dump_properties (const CosTrading::PropertySeq& prop_seq,
ACE_DEBUG ((LM_DEBUG, "Dynamic Property\n"));
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
+ // @@ Seth, don't pass the exceptions back?
ACE_DEBUG ((LM_DEBUG, "Error retrieving property value.\n"));
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
+ ACE_CHECK;
if (tc == 0)
continue;
- else if (tc->equal (TAO_Trader_Test::_tc_StringSeq, env))
+ int check = tc->equal (TAO_Trader_Test::_tc_StringSeq, ACE_TRY_ENV);
+ ACE_CHECK;
+
+ if (check)
{
TAO_Trader_Test::StringSeq* str_seq;
(*value) >>= str_seq;
@@ -185,18 +190,24 @@ TT_Info::dump_properties (const CosTrading::PropertySeq& prop_seq,
ACE_DEBUG ((LM_DEBUG, "\n"));
}
- else if (tc->equal (TAO_Trader_Test::_tc_ULongSeq, env))
+ else
{
- TAO_Trader_Test::ULongSeq* ulong_seq;
- (*value) >>= ulong_seq;
+ check = tc->equal (TAO_Trader_Test::_tc_ULongSeq, ACE_TRY_ENV);
+ ACE_CHECK;
- for (seq_length = ulong_seq->length (), i = 0; i < seq_length; i++)
- ACE_DEBUG ((LM_DEBUG, "%d ", (*ulong_seq)[i]));
+ if (check)
+ {
+ TAO_Trader_Test::ULongSeq* ulong_seq;
+ (*value) >>= ulong_seq;
- ACE_DEBUG ((LM_DEBUG, "\n"));
+ for (seq_length = ulong_seq->length (), i = 0; i < seq_length; i++)
+ ACE_DEBUG ((LM_DEBUG, "%d ", (*ulong_seq)[i]));
+
+ ACE_DEBUG ((LM_DEBUG, "\n"));
+ }
+ else
+ CORBA::Any::dump (*value);
}
- else
- CORBA::Any::dump (*value);
}
}
diff --git a/TAO/orbsvcs/tests/Trading/TT_Info.h b/TAO/orbsvcs/tests/Trading/TT_Info.h
index 13296b61050..2e346d7e5df 100644
--- a/TAO/orbsvcs/tests/Trading/TT_Info.h
+++ b/TAO/orbsvcs/tests/Trading/TT_Info.h
@@ -15,7 +15,8 @@ class TT_Info
public:
static void dump_properties (const CosTrading::PropertySeq& prop_seq,
- CORBA::Boolean print_dynamic = 1);
+ CORBA::Boolean print_dynamic = 1,
+ CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ());
// Dump the contents of this property sequence.
enum INTERFACES
diff --git a/TAO/orbsvcs/tests/Trading/colocated_test.cpp b/TAO/orbsvcs/tests/Trading/colocated_test.cpp
index fa078177a5c..989a3bbb1ea 100644
--- a/TAO/orbsvcs/tests/Trading/colocated_test.cpp
+++ b/TAO/orbsvcs/tests/Trading/colocated_test.cpp
@@ -29,11 +29,11 @@ parse_args (int argc, char *argv[],
int
main (int argc, char** argv)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
TAO_ORB_Manager orb_manager;
- orb_manager.init (argc, argv, TAO_TRY_ENV);
- TAO_CHECK_ENV
+ orb_manager.init (argc, argv, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Command line argument interpretation.
CORBA::Boolean verbose = 0;
@@ -49,83 +49,83 @@ main (int argc, char** argv)
TAO_Trading_Components_i& trd_comp = trader->trading_components ();
// Set the service type repository
- sup_attr.type_repos (type_repos._this (TAO_TRY_ENV));
- TAO_CHECK_ENV;
+ sup_attr.type_repos (type_repos._this (ACE_TRY_ENV));
+ ACE_TRY_CHECK;
// Run the Service Type Exporter tests
ACE_DEBUG ((LM_DEBUG, "*** Running the Service Type Exporter tests.\n"));
TAO_Service_Type_Exporter type_exporter
(CosTrading::Lookup::_duplicate (trd_comp.lookup_if ()),
verbose,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.remove_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.remove_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.add_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.add_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.list_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.list_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.describe_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.describe_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.fully_describe_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.fully_describe_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Run the Offer Exporter tests
ACE_DEBUG ((LM_DEBUG, "*** Running the Offer Exporter tests.\n"));
TAO_Offer_Exporter offer_exporter
(CosTrading::Lookup::_duplicate (trd_comp.lookup_if ()),
verbose,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.withdraw_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.withdraw_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.export_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.export_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.describe_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.modify_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.modify_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.describe_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.withdraw_offers_using_constraints (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.withdraw_offers_using_constraints (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.describe_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.withdraw_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.withdraw_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.export_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.export_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.describe_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Run the Offer Importer tests
ACE_DEBUG ((LM_DEBUG, "*** Running the Offer Importer tests.\n"));
TAO_Offer_Importer offer_importer
(CosTrading::Lookup::_duplicate (trd_comp.lookup_if ()), verbose);
- offer_importer.perform_queries (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_importer.perform_queries (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "Trader Export Tests Failed"), -1);
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/orbsvcs/tests/Trading/export_test.cpp b/TAO/orbsvcs/tests/Trading/export_test.cpp
index 2a1544a8afc..31d0d9c4f2c 100644
--- a/TAO/orbsvcs/tests/Trading/export_test.cpp
+++ b/TAO/orbsvcs/tests/Trading/export_test.cpp
@@ -13,11 +13,11 @@ ACE_RCSID(Trading, export_test, "$Id$")
int
main (int argc, char** argv)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
TAO_ORB_Manager orb_manager;
- orb_manager.init (argc, argv, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ orb_manager.init (argc, argv, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Command line argument interpretation.
TT_Parse_Args parse_args (argc, argv);
@@ -39,99 +39,99 @@ main (int argc, char** argv)
// Narrow the lookup interface.
ACE_DEBUG ((LM_DEBUG, "*** Narrowing the lookup interface.\n"));
CosTrading::Lookup_var lookup_if =
- CosTrading::Lookup::_narrow (trading_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ CosTrading::Lookup::_narrow (trading_obj.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Run the Service Type Exporter tests
ACE_DEBUG ((LM_DEBUG, "*** Running the Service Type Exporter tests.\n"));
TAO_Service_Type_Exporter type_exporter (lookup_if.in (),
! parse_args.quiet (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.remove_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.remove_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.add_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.add_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.remove_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.remove_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.add_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.add_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (parse_args.federated ())
{
- type_exporter.add_all_types_to_all (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.add_all_types_to_all (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- type_exporter.list_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.list_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.describe_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.describe_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- type_exporter.fully_describe_all_types (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ type_exporter.fully_describe_all_types (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "*** Service Type Exporter tests complete.\n"));
// Run the Offer Exporter tests
ACE_DEBUG ((LM_DEBUG, "*** Running the Offer Exporter tests.\n"));
- TAO_Offer_Exporter offer_exporter (lookup_if.in (), ! parse_args.quiet (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ TAO_Offer_Exporter offer_exporter (lookup_if.in (), ! parse_args.quiet (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// = Test series.
- offer_exporter.withdraw_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.withdraw_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.export_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.export_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.describe_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.modify_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.modify_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.describe_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.withdraw_offers_using_constraints (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.withdraw_offers_using_constraints (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.describe_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.withdraw_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.withdraw_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- offer_exporter.export_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.export_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (parse_args.federated ())
{
- offer_exporter.export_offers_to_all (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.export_offers_to_all (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- offer_exporter.describe_offers (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_exporter.describe_offers (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "*** Offer Exporter tests complete.\n"));
ACE_DEBUG ((LM_DEBUG, "*** Now serving dynamic properties.\n"));
- orb_manager.run (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ orb_manager.run (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR_RETURN ((LM_ERROR, "Trader Export Tests Failed"), -1);
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}
diff --git a/TAO/orbsvcs/tests/Trading/import_test.cpp b/TAO/orbsvcs/tests/Trading/import_test.cpp
index aca979a0e73..07d2a0dbd78 100644
--- a/TAO/orbsvcs/tests/Trading/import_test.cpp
+++ b/TAO/orbsvcs/tests/Trading/import_test.cpp
@@ -8,11 +8,11 @@ ACE_RCSID(Trading, import_test, "$Id$")
int
main (int argc, char** argv)
{
- TAO_TRY
+ ACE_TRY_NEW_ENV
{
TAO_ORB_Manager orb_manager;
- orb_manager.init (argc, argv, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ orb_manager.init (argc, argv, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Command line argument interpretation.
TT_Parse_Args parse_args (argc, argv);
@@ -34,27 +34,27 @@ main (int argc, char** argv)
// Narrow the lookup interface.
ACE_DEBUG ((LM_DEBUG, "*** Narrowing the lookup interface.\n"));
CosTrading::Lookup_var lookup_if =
- CosTrading::Lookup::_narrow (trading_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ CosTrading::Lookup::_narrow (trading_obj.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
// Run the Offer Importer tests
ACE_DEBUG ((LM_DEBUG, "*** Running the Offer Importer tests.\n"));
TAO_Offer_Importer offer_importer (lookup_if.in (), ! parse_args.quiet ());
- offer_importer.perform_queries (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_importer.perform_queries (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
if (parse_args.federated ())
{
- offer_importer.perform_directed_queries (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ offer_importer.perform_directed_queries (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
}
- TAO_CATCHANY
+ ACE_CATCHANY
{
ACE_ERROR_RETURN ((LM_ERROR, "Trader Import Tests Failed."), -1);
}
- TAO_ENDTRY;
+ ACE_ENDTRY;
return 0;
}