OrbServerImpl::~OrbServerImpl()
{
+ _orb->destroy();
log_info("done\n");
}
ret_val = NULL;
try {
// get nameservice reference
- log_debug("started\n");
- ns_obj = _orb->resolve_initial_references(CONST_NAME_SERVICE_NAME);
+ //log_debug("started\n");
+ ns_obj = _orb->resolve_initial_references("NameService");
if (CORBA::is_nil(ns_obj) == false) {
// get naming service context
- ns_cntx = CosNaming::NamingContext::_narrow(ns_obj);
- if (CORBA::is_nil(ns_cntx) == false) {
+ ns_cntx = CosNaming::NamingContext::_narrow(ns_obj.in());
+ if (CORBA::is_nil(ns_cntx.in()) == false) {
cntx_dta.length(1);
cntx_dta[0].id = CORBA::string_dup(service_name_param);
cntx_dta[0].kind = CORBA::string_dup(service_kind_param);
catch(CosNaming::NamingContext::AlreadyBound& ex) {
log_error("Failed to get naming service context for %s. Context with same name already exist.\n", service_name_param);
}
+ //CORBA::release(ns_cntx);
}
else {
log_error("Failed to get naming service context for %s. Could not narrow the name service.\n", service_name_param);
catch(CORBA::SystemException& ex) {
log_error("Failed to get naming service context for %s, system error.\n", service_name_param);
}
- log_debug("done\n");
+ //log_debug("done\n");
return ret_val;
}