- try
- {
- MESSAGE("Container thread started");
-
- // get or create the child POA
-
- PortableServer::POA_var factory_poa;
- try
- {
- factory_poa = _root_poa->find_POA("factory_poa",0);
- // 0 = no activation (already done if exists)
- }
- catch (PortableServer::POA::AdapterNonExistent&)
- {
- MESSAGE("factory_poa does not exists, create...");
- // define policy objects
- PortableServer::ImplicitActivationPolicy_var implicitActivation =
- _root_poa->create_implicit_activation_policy(
- PortableServer::NO_IMPLICIT_ACTIVATION);
- // 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
-
- // create policy list
- CORBA::PolicyList policyList;
- policyList.length(2);
- policyList[0] = PortableServer::ImplicitActivationPolicy::
- _duplicate(implicitActivation);
- policyList[1] = PortableServer::ThreadPolicy::
- _duplicate(threadPolicy);
-
- PortableServer::POAManager_var nil_mgr
- = PortableServer::POAManager::_nil();
- factory_poa = _root_poa->create_POA("factory_poa",
- nil_mgr,
- policyList);
- //with nil_mgr instead of pman,
- //a new POA manager is created with the new POA
-
- // destroy policy objects
- implicitActivation->destroy();
- threadPolicy->destroy();
-
- // obtain the factory poa manager
- PortableServer::POAManager_var pmanfac = factory_poa->the_POAManager();
- pmanfac->activate();
- MESSAGE("pmanfac->activate()");
- }
-
- char *containerName = "";
- if (argc >1)
- {
- containerName = argv[1];
- }
-
- Engines_Container_i * myContainer
- = new Engines_Container_i(_orb, _root_poa, containerName , argc , argv , true , false);
- }
- catch(CORBA::SystemException&)
- {
- INFOS("Caught CORBA::SystemException.");
- }
- catch(PortableServer::POA::WrongPolicy&)
- {
- INFOS("Caught CORBA::WrongPolicyException.");
- }
- catch(PortableServer::POA::ServantAlreadyActive&)
- {
- INFOS("Caught CORBA::ServantAlreadyActiveException");
- }
- catch(CORBA::Exception&)
- {
- INFOS("Caught CORBA::Exception.");
- }
- catch(...)
- {
- INFOS("Caught unknown exception.");
- }
+ try {
+ PortableServer::POA_var root_poa=PortableServer::POA::_the_root_poa();
+ std::cout << "Activate SalomeLauncher ......!!!! " << std::endl;
+ new SALOME_Launcher(_orb,root_poa);
+ }
+ catch(CORBA::SystemException&) {
+ INFOS("Caught CORBA::SystemException.");
+ }
+ catch(PortableServer::POA::WrongPolicy&) {
+ INFOS("Caught CORBA::WrongPolicyException.");
+ }
+ catch(PortableServer::POA::ServantAlreadyActive&) {
+ INFOS("Caught CORBA::ServantAlreadyActiveException");
+ }
+ catch(CORBA::Exception&) {
+ INFOS("Caught CORBA::Exception.");
+ }
+ catch(...) {
+ INFOS("Caught unknown exception.");
+ }