From cf1fac39bb3c932f0b21cde9af3f942d9bdc419e Mon Sep 17 00:00:00 2001 From: caremoli Date: Wed, 16 Jan 2008 08:26:46 +0000 Subject: [PATCH] CCAR: remove orb destroy and delete servant at exit --- src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx | 5 ++++- src/Utils/Utils_ORB_INIT.cxx | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx index a2544b6ce..c48e4afd9 100644 --- a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx +++ b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx @@ -34,6 +34,7 @@ #include #include #include +#include //# include "utilities.h" /*!\class DESTRUCTEUR_GENERIQUE_ @@ -111,11 +112,13 @@ public : typedef PortableServer::ServantBase TServant; if(_PtrObjet){ if(TServant* aServant = dynamic_cast(_PtrObjet)){ - //cerr << "DESTRUCTEUR_GENERIQUE_::operator() deleting ServantBase's _PtrObjet" << endl; + std::cerr << "WARNING: automatic destruction for servant is no more used. It's too late in exit. Use explicit call" << std::endl; + /* PortableServer::POA_var aPOA = aServant->_default_POA(); PortableServer::ObjectId_var anObjectId = aPOA->servant_to_id(aServant); aPOA->deactivate_object(anObjectId.in()); aServant->_remove_ref(); + */ }else{ //cerr << "DESTRUCTEUR_GENERIQUE_::operator() deleting _PtrObjet" << endl; TYPE* aPtr = static_cast(_PtrObjet); diff --git a/src/Utils/Utils_ORB_INIT.cxx b/src/Utils/Utils_ORB_INIT.cxx index 1cb869e11..3eea5aef3 100644 --- a/src/Utils/Utils_ORB_INIT.cxx +++ b/src/Utils/Utils_ORB_INIT.cxx @@ -40,13 +40,16 @@ ORB_INIT::~ORB_INIT() { if ( ! CORBA::is_nil( _orb ) ) { + std::cerr << "WARNING: destroy is no more called at exit. Use explicit call." << std::endl; //std::cerr << "appel _orb->destroy()" << std::endl; + /* try { _orb->destroy() ; } catch(...) { MESSAGE("Caught CORBA::Exception."); } + */ //std::cerr << "retour _orb->destroy()" << std::endl; } } -- 2.39.2