}
Session_ServerThread* aServerThread
= new Session_ServerThread(argc, argv, _orb,_root_poa,_GUIMutex);
- _serverThreads.push_back(aServerThread);
+ _serverThreads.push_front(aServerThread);
aServerThread->Init();
}
argv[0] = "Session";
Session_ServerThread* aServerThread
= new Session_ServerThread(argc, argv, _orb,_root_poa,_GUIMutex);
- _serverThreads.push_back(aServerThread);
+ _serverThreads.push_front(aServerThread);
aServerThread->Init();
}
+//=============================================================================
+/*!
+ * Destruction des classes serveur dans l'ordre inverse de creation
+ */
+//=============================================================================
+
+void Session_ServerLauncher::KillAll()
+{
+ MESSAGE("Session_ServerLauncher::KillAll()");
+ list<Session_ServerThread*>::iterator itServ;
+ for (itServ = _serverThreads.begin(); itServ !=_serverThreads.end(); itServ++)
+ {
+ delete (*itServ);
+ }
+}
SALOME_ModuleCatalogImpl* Catalogue_i
= new SALOME_ModuleCatalogImpl(argc, argv);
- MESSAGE("---");
+
// Tell the POA that the objects are ready to accept requests.
_root_poa->activate_object (Catalogue_i);
- MESSAGE("---");
CORBA::Object_ptr myCata = Catalogue_i->_this();
- MESSAGE("---");
_NS->Register(myCata ,"/Kernel/ModulCatalog");
- MESSAGE("---");
}
catch(CORBA::SystemException&)
{
PortableServer::ObjectId_var myStudyManager_iid
= _root_poa->activate_object(myStudyManager_i);
-
myStudyManager_i->register_name("/myStudyManager");
}
catch(CORBA::SystemException&)
Registry::Components_var varComponents;
try
{
- //RegistryService *ptrRegistry = SINGLETON_<RegistryService>::Instance();
- RegistryService *ptrRegistry = new RegistryService();
+ RegistryService *ptrRegistry = SINGLETON_<RegistryService>::Instance();
ptrRegistry->SessionName( ptrSessionName );
varComponents = ptrRegistry->_this();
// The RegistryService must not already exist.
PortableServer::ImplicitActivationPolicy_var implicitActivation =
_root_poa->create_implicit_activation_policy(
PortableServer::NO_IMPLICIT_ACTIVATION);
- MESSAGE("---");
// default = NO_IMPLICIT_ACTIVATION
PortableServer::ThreadPolicy_var threadPolicy =
_root_poa->create_thread_policy(PortableServer::ORB_CTRL_MODEL);
// default = ORB_CTRL_MODEL, other choice SINGLE_THREAD_MODEL
- MESSAGE("---");
// create policy list
CORBA::PolicyList policyList;
_duplicate(implicitActivation);
policyList[1] = PortableServer::ThreadPolicy::
_duplicate(threadPolicy);
- MESSAGE("---");
PortableServer::POAManager_var nil_mgr
= PortableServer::POAManager::_nil();
policyList);
//with nil_mgr instead of pman,
//a new POA manager is created with the new POA
- MESSAGE("---");
// destroy policy objects
implicitActivation->destroy();
threadPolicy->destroy();
- MESSAGE("---");
// obtain the factory poa manager
PortableServer::POAManager_var pmanfac = factory_poa->the_POAManager();
MESSAGE("pmanfac->activate()");
}
- MESSAGE("---");
char *containerName = "";
if (argc >1)
{