summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp')
-rw-r--r--TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp
index 723b735a437..e5923faebd6 100644
--- a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp
+++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service_i.cpp
@@ -33,17 +33,19 @@ Life_Cycle_Service_i::~Life_Cycle_Service_i (void)
CORBA::Boolean
-Life_Cycle_Service_i::supports (const CosLifeCycle::Key &,
- CORBA::Environment &)
+Life_Cycle_Service_i::supports (const CosLifeCycle::Key &factory_key,
+ CORBA::Environment &TAO_IN_ENV_there)
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 &ACE_TRY_ENV)
+ CORBA::Environment &TAO_IN_ENV_there)
ACE_THROW_SPEC ((CORBA::SystemException,
CosLifeCycle::NoFactory,
CosLifeCycle::InvalidCriteria,
@@ -59,8 +61,12 @@ 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 (ACE_TRY_ENV);
- ACE_CHECK_RETURN (0);
+ CORBA::String filter = criteria_Evaluator.getFilter (TAO_IN_ENV_there);
+
+ if (TAO_IN_ENV_there.exception() != 0)
+ {
+ return 0;
+ }
ACE_DEBUG ((LM_DEBUG, "Life_Cycle_Service_i:create_object: query(%s) will be called.\n",filter));
@@ -81,25 +87,24 @@ 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))
- ACE_THROW_RETURN (CosLifeCycle::NoFactory (factory_key), 0);
+ { // throw a NoFactory exception
+ TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key));
+ return 0;
+ }
else
{
- 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));
+ 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;
}
- ACE_ENDTRY;
- ACE_CHECK_RETURN (0);
if (CORBA::is_nil (genericFactory_var.in()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -111,8 +116,7 @@ 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,
- ACE_TRY_ENV);
- ACE_CHECK_RETURN (0);
+ TAO_IN_ENV_there);
ACE_DEBUG ((LM_DEBUG,
"Life_Cycle_Service_i::create_object: Forwarded request.\n"));
@@ -139,10 +143,9 @@ Life_Cycle_Service_i::register_factory (const char * name,
const char * location,
const char * description,
CORBA::Object_ptr object,
- CORBA::Environment &)
+ CORBA::Environment &TAO_IN_ENV_there)
ACE_THROW_SPEC (( CORBA::SystemException))
{
-
if (factory_trader_ptr_ == 0)
{
ACE_NEW (factory_trader_ptr_, Factory_Trader());
@@ -159,6 +162,3 @@ Life_Cycle_Service_i::register_factory (const char * name,
" description: %s\n",
name, location, description));
}
-
-
-