Hello, I am developing a distributed application using CORBA.
My client application in aix 5.2.0.0 works properly when the server application is up . The server application run on windows.
If the server is down, then run the client app and get the following:
"
uncaught MICO exception: IDL:omg.org/CORBA/COMM_FAILURE:1.0
(0, not-completed)
IOT/Abort trap(coredump)
"
In my prougramm the functions is :
int
lookup()
{
// ORB initialization
CORBA::ORB_var orb = CORBA::ORB_init(num,
opt);
// Acquire a reference
to the Naming Service
CORBA::Object_var nsobj
= orb->resolve_initial_references("NameService");
CosNaming::NamingContext_var
nc = CosNaming::NamingContext::_narrow(nsobj);
if(CORBA::is_nil(nc))
{
cerr <<
"oops, I cannot access the Naming Service!" << endl;
return(-1);
}
// Construct Naming Service
name
CosNaming::Name name;
name.length(1);
name[0].id = CORBA::string_dup("upSendMsg");
// "upSendMsg" is the name of Naming Service
name[0].kind = CORBA::string_dup("");
// try to find that node
in the Naming Service tree
CORBA::Object_var obj;
#ifdef HAVE_EXCEPTIONS
try
{
obj = nc->resolve(name);
}
catch(CosNaming::NamingContext::NotFound
&exc)
{
cout <<
"NotFound exception." << endl;
return(-1);
}
catch(CosNaming::NamingContext::CannotProceed
&exc)
{
cout <<
"CannotProceed exception." << endl;
return(-1);
}
catch (CosNaming::NamingContext::InvalidName
&exc)
{
cout <<
"InvalidName exception." << endl;
return(-1);
}
catch (CosNaming::NamingContext::AlreadyBound
&exc)
{
cout <<
"AlreadyBound exception." << endl;
return(-1);
}
catch (CosNaming::NamingContext::NotEmpty
&exc)
{
cout <<
"NotEmpty exception." << endl;
return(-1);
}
catch (...)
{
cerr <<
"Cannot find EventChannel !" << endl;
cout <<
"Cannot find EventChannel !" << endl;
return(-1);
}
#else
obj = nc->resolve(name);
wcout<<"here
is "<<endl;
#endif
wcout<<"here
is "<<endl;
// The Naming Service
returns a generic reference as a CORBA::Object
// We need to narrow this
to the desired type
up = UpSendMsgInterface::_narrow(obj);
return( 0 );
}
I trace , enven the
server is not active , the client also can run at "UpSendMsgInterface::_narrow"
I am so sad at this. :(
================================================================================
My question is why the client can not
catch exception when the server is not up .
Cause I must do other things when
the server is not up.
Thank you in advance and friendly greetings.
I so hope you can help me as soon as
you can. :)
regards!
_______________________________________________ Mico-devel mailing list [email protected] http://www.mico.org/mailman/listinfo/mico-devel
