summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp
diff options
context:
space:
mode:
authortworm <tworm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-15 16:17:43 +0000
committertworm <tworm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-15 16:17:43 +0000
commited55cb8bfbff946940bf53f787edf7bd54d4b6bb (patch)
treefa4251287a4eac08bf6015874c289045d5134527 /TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp
parent644e3d83e5ab2543057019978c9a1b49222dcb0f (diff)
downloadATCD-ed55cb8bfbff946940bf53f787edf7bd54d4b6bb.tar.gz
Added one more test. Added more user friendly diagnostics.
Diffstat (limited to 'TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp')
-rw-r--r--TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp b/TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp
index 314ee898a36..1d43bcb1b3c 100644
--- a/TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp
+++ b/TAO/orbsvcs/tests/Concurrency/CC_naming_service.cpp
@@ -20,7 +20,7 @@
#include "CC_naming_service.h"
-CC_naming_service::CC_naming_service (CORBA::ORB_var orb)
+CC_naming_service::CC_naming_service (CORBA::ORB_var orb, CORBA::Environment &_env)
: naming_context_ (0),
cc_factory_key_ (0),
orb_ (0),
@@ -28,7 +28,10 @@ CC_naming_service::CC_naming_service (CORBA::ORB_var orb)
{
this->orb_ = orb;
- init_naming_service ();
+ int success = init_naming_service ();
+ if(success<0)
+ TAO_THROW (CORBA::INTERNAL (CORBA::COMPLETED_NO));
+
}
CC_naming_service::~CC_naming_service (void)
@@ -78,7 +81,7 @@ CC_naming_service::bind_name (char *n,
CORBA::Environment &_env)
{
ACE_DEBUG ((LM_DEBUG, "CC_Client::bind_name\n"));
-
+
TAO_TRY
{
CosNaming::Name ns_name (1);
@@ -102,7 +105,7 @@ CC_naming_service::get_lock_set_factory (void)
return this->factory_;
}
-int
+int
CC_naming_service::init_naming_service (void)
{
TAO_TRY
@@ -118,17 +121,17 @@ CC_naming_service::init_naming_service (void)
CosNaming::NamingContext::_narrow (naming_obj.in (),
TAO_TRY_ENV);
TAO_CHECK_ENV;
-
+
CORBA::Object_var factory_obj = get_obj_from_name ("CosConcurrency",
"LockSetFactory",
TAO_TRY_ENV);
TAO_CHECK_ENV;
-
+
this->factory_ =
CosConcurrencyControl::LockSetFactory::_narrow
(factory_obj.in (),TAO_TRY_ENV);
TAO_CHECK_ENV;
-
+
if (CORBA::is_nil (this->factory_.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
" could not resolve lock set factory in Naming service\n"),
@@ -140,6 +143,6 @@ CC_naming_service::init_naming_service (void)
return -1;
}
TAO_ENDTRY;
-
+
return 0;
}