Problems with NameService
- From: Marcus Lunzenauer <marcus lunzenauer osnanet de>
- To: orbit-list gnome org
- Subject: Problems with NameService
- Date: Fri, 18 Jun 2004 08:37:44 +0200
I have two applications, a service A and a "client" B. Service A binds itself to the NameService. B resolves it. When I restart B, it cannot resolve A anymore..
This is how this happens.
1.)
I start my service A which bind successfully to the NameService.
2.)
Second I start my client B, which resolves successfully the service A and calls some functions at A.
3.)
Now I exit the client gracefully, while the service A is still running.
4.)
Using name-client-2 I can now see, that service A is still bound.
5.)
I start the client B again, for debugging purposes I let it sleep for about 10 seconds right before the next step.
Using name-client-2 I still see service A.
6.)
After sleeping, client B does this:
debug(DEBUG_SCHEDULER, "short break");
sleep(10);
debug(DEBUG_SCHEDULER, "awake");
// get scheduler
gchar *sched_id[] = {"ua", "services", "Scheduler", NULL};
debug(DEBUG_SCHEDULER, "Resolving service reference from name-service with id "
"\"%s/%s/%s\"", sched_id[0], sched_id[1], sched_id[2]);
scheduler = (ua_services_Scheduler) nameservice_lib_name_service_resolve(name_service, sched_id, ev);
While the function nameservice_lib_name_service_resolve is the same as the function etk_name_service_resolve from the examples-toolkit.c
(see http://www.gnome.org/projects/ORBit2/orbit-docs/orbit/x998.html Example 35).
7.)
In line 233 in examples-toolkit.c
retval = CosNaming_NamingContext_resolve (name_service, name, ev);
an exception is raised:
CosNaming_NamingContext_NotFound Exception
why: CosNaming_NamingContext_missing_node
rest_of_name: Scheduler
8.)
Using name-client-2 I can't see service A anymore.
In my client's code I do not unbind anything, just:
int
main(int argc, char *argv[]){
CORBA_Environment ev[1];
CORBA_exception_init(ev);
// server_init right from the examples
// see http://www.gnome.org/projects/ORBit2/orbit-docs/orbit/x316.html#AEN406 ex.3
server_init(&argc, argv, &global_orb, &root_poa, ev);
etk_abort_if_exception(ev, "failed ORB init");
// get name_service
name_service = (CosNaming_NamingContext) CORBA_ORB_resolve_initial_references(global_orb, "NameService", ev);
etk_abort_if_exception(ev, "failed resolving name-service");
debug(DEBUG_SCHEDULER, "short break");
sleep(10);
debug(DEBUG_SCHEDULER, "awake");
[..see above,,]
I am quite confused, as I NEVER even wrote the word unbind.. There is no way I can tell, what the problem is.
I really hope that someone on this list can help me finding this problem.
BTW: my ORBIT2 Version is the latest 2.10.2.
Utterly despaired,
Marcus Lunzenauer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]