[orbitcpp-list] Question
Status: Beta
Brought to you by:
philipd
From: Antoine T. <ath...@al...> - 2001-09-07 10:14:52
|
Hello I have a question Is there any known bug with the PortableServer::POA::deactivate_object function Because i have problem thing i don't understand Here's the corresponding code _________________________________________________________________________ CORBA::PolicyList policies; policies.length(3); policies[(CORBA::ULong)0] = rootPOA->create_lifespan_policy(PortableServer::PERSISTENT); policies[1] = rootPOA->create_id_assignment_policy(PortableServer::USER_ID); policies[2] = rootPOA->create_servant_retention_policy(PortableServer::RETAIN); PortableServer::POA_var myrdvPOA = rootPOA->create_POA("myrdv_poa",poa_manager,policies); PortableServer::ObjectId_var sessionManagermanagerId =PortableServer::string_to_ObjectId("MyrdvSessionManager"); PortableServer::ObjectId_var adminDoormanagerId =PortableServer::string_to_ObjectId("MyrdvAdminDoor"); // Create the servants SessionManagerImpl_var sessionManagerServant = new SessionManagerImpl(myrdv, myrdvPOA, statRoot, false); AdminDoorImpl_var adminDoorServant = new AdminDoorImpl(orb, statRoot, myrdv, sessionManagerServant, false); // Activate the servant with the ID on myPOA myrdvPOA->activate_object_with_id(sessionManagermanagerId, sessionManagerServant); myrdvPOA->activate_object_with_id(adminDoormanagerId, adminDoorServant); // Write reference to file CORBA::Object_var ref = myrdvPOA->id_to_reference(sessionManagermanagerId.in()); string string_ref = orb->object_to_string(ref.in()); ofstream refFile(phpdoor_ior.c_str()); refFile << string_ref << endl; refFile.close(); ref = myrdvPOA->id_to_reference(adminDoormanagerId.in()); string_ref = orb->object_to_string(ref.in()); refFile.open(admindoor_ior.c_str()); refFile << string_ref << endl; refFile.close(); CORBA::Object_var reference = myrdvPOA->servant_to_reference(sessionManagerServant); reference = myrdvPOA->servant_to_reference(adminDoorServant); orb->run(); orb->destroy(); unlink(phpdoor_ior.c_str()); unlink(admindoor_ior.c_str()); cout << "Deactivation of adminDoormanager" << endl; try { myrdvPOA->deactivate_object(sessionManagermanagerId.in()); } catch (...) { cout << "catch exception" << endl; } cout << "Deactivation du SessionManager" << endl; try { myrdvPOA->deactivate_object(adminDoormanagerId.in()); } catch (...) { cout << "catch exception" << endl; } poa_manager->deactivate(TRUE, TRUE); ______________________________________________________________ So, the problem is when a want to deactivate my sessionManager or my Admindoor a get an exception, but my program continues and, when a want to deactivate the both objects, the programs freezes at the second deactivation The exception i get is, i think, a CORBA::exception Have anybody got an idea ? Thanks in advance Antoine Thierry - AlphaCentauri |