ORBit questions



Hi!

I'm using ORBit to learn about CORBA and GNOME, and there is one thing
which
bothers me: when the server cease to exist (either by telling the POA to
deactivate the object or by violent death), the client which already had
a reference on the object is then stuck when it uses the object.

I haven't been able to find any doc on the subject.

On the server side, I have:
<--------------------------------------------------------------->
  orb = (CORBA_ORB) gnome_CORBA_init("ring-client", "0.1", argc,
                                     argv, 
				       0, &ev);

    POA_Ring__init(&poa_ring_servant, &ev);

    poa = (PortableServer_POA)CORBA_ORB_resolve_initial_references(orb,
"RootPOA", &ev);
 
PortableServer_POAManager_activate(PortableServer_POA__get_the_POAManager(poa,
&ev), &ev);
    PortableServer_POA_activate_object_with_id(poa,
                                               &objid,
&poa_ring_servant, &ev);

    ring = PortableServer_POA_servant_to_reference(poa,
						   &poa_ring_servant,
						   &ev);
    if (!ring) {
      printf("Cannot get objref\n");
      return 1;
    }

    retval = CORBA_ORB_object_to_string(orb, ring, &ev);
    ofp = fopen("ring.ior","w");
    fprintf(ofp,"%s", retval);
    fclose(ofp);

    CORBA_free(retval);

    app = create_gui(ring, &poa_ring_servant);
    gtk_widget_show_all(app);

    gtk_text_insert(GTK_TEXT(poa_ring_servant.text), 
		    NULL, NULL, NULL, 
		    "Fichier ring.ior écrit.\n"
		    "Attente de requêtes...\n\n", -1);

    gtk_main();

<---------------------------------------------------------------->

Is there something I understand wrong, or do I have
other ways for the client to use the object?

I'm using ORBit 0.5.1, gnome libs 1.0.58 and gnome-core 1.1.9 (Mandrake
7.1).

Thanks a lot,

Vivien




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]