MESSAGE("[FindOrStartParallelContainer] Deploying node : " << name);
node->deploy();
}
+
+ MESSAGE ("[FindOrStartParallelContainer] Starting parallel object");
proxy->start();
}
catch(CORBA::SystemException& e)
SALOME_NamingService::SALOME_NamingService(CORBA::ORB_ptr orb)
{
MESSAGE("SALOME_NamingService creation");
- _orb = orb ;
+ _orb = CORBA::ORB::_duplicate(orb);
_initialize_root_context();
}
MESSAGE("SALOME_NamingService initialisation");
Utils_Locker lock (&_myMutex);
- _orb = orb;
+ _orb = CORBA::ORB::_duplicate(orb);
_initialize_root_context();
}
protected:
Utils_Mutex _myMutex;
- CORBA::ORB_ptr _orb;
+ CORBA::ORB_var _orb;
CosNaming::NamingContext_var _root_context, _current_context;
void _initialize_root_context();
system(aCommand);
#endif
- SALOME_NamingService * ns = new SALOME_NamingService(CORBA::ORB::_duplicate(orb));
+ SALOME_NamingService * ns = new SALOME_NamingService(orb);
// Get the proxy
string proxyNameInNS = ns->BuildContainerNameForNS(containerName.c_str(),
hostname.c_str());
proxy_ior,
myid,
root_poa,
- (char*) node_name.c_str(),
- containerName,
- argc, argv);
+ node_name,
+ containerName);
// PaCO++ init
paco_fabrique_manager * pfm = paco_getFabriqueManager();
pfm->register_com("dummy", new paco_dummy_fabrique());
PyGILState_Ensure();
//Delete python container that destroy orb from python (pyCont._orb.destroy())
Py_Finalize();
+ delete proxy_ior;
+ delete ns;
}
catch (PaCO::PACO_Exception& e)
{
proxy_ior,
myid,
root_poa,
- (char*) node_name.c_str(),
- containerName,
- argc, argv);
+ node_name,
+ containerName);
// PaCO++ init
paco_fabrique_manager * pfm = paco_getFabriqueManager();
pfm->register_com("mpi", new paco_mpi_fabrique());
system(aCommand);
#endif
- SALOME_NamingService * ns = new SALOME_NamingService(CORBA::ORB::_duplicate(orb));
+ SALOME_NamingService * ns = new SALOME_NamingService(orb);
// Engines::Container_proxy_impl * proxy =
// new Engines::Container_proxy_impl(orb,
// new paco_omni_fabrique());
ns->Register(pCont, _containerName.c_str());
pman->activate();
orb->run();
+ delete ns;
}
catch (PaCO::PACO_Exception& e)
{
_NS->init_orb(_orb);
}
-Container_proxy_impl_final:: ~Container_proxy_impl_final() {}
+Container_proxy_impl_final:: ~Container_proxy_impl_final() {
+ if (_id)
+ delete _id;
+ if (_NS)
+ delete _NS;
+}
void
Container_proxy_impl_final::Shutdown()
char * ior,
int rank,
PortableServer::POA_ptr poa,
- char *containerName,
+ std::string containerName,
std::string proxy_containerName,
- int argc , char* argv[],
- bool isServantAloneInProcess
- ) :
+ bool isServantAloneInProcess) :
InterfaceParallel_impl(orb,ior,rank),
Engines::PACO_Container_serv(orb,ior,rank),
Engines::PACO_Container_base_serv(orb,ior,rank),
{
// Members init
_pid = getpid();
- _argc = argc ;
- _argv = argv ;
_hostname = Kernel_Utils::GetHostname();
_orb = CORBA::ORB::_duplicate(orb);
_poa = PortableServer::POA::_duplicate(poa);
// Adding this servant to SALOME
_NS = new SALOME_NamingService();
_NS->init_orb(_orb);
- _containerName = _NS->BuildContainerNameForNS(containerName, _hostname.c_str());
+ _containerName = _NS->BuildContainerNameForNS(containerName.c_str(), _hostname.c_str());
_proxy_containerName = proxy_containerName;
- //_NS->Register(container_node, _containerName.c_str());
// Init Python container part
CORBA::String_var sior = _orb->object_to_string(container_node);
virtual public PortableServer::RefCountServantBase
{
public:
- Engines_Parallel_Container_i(CORBA::ORB_ptr orb, char * ior, int rank,
- PortableServer::POA_ptr poa,
- char * containerName ,
- std::string proxy_containerName,
- int argc, char* argv[],
- bool isServantAloneInProcess = true);
+ Engines_Parallel_Container_i(CORBA::ORB_ptr orb,
+ char * ior,
+ int rank,
+ PortableServer::POA_ptr poa,
+ std::string containerName ,
+ std::string proxy_containerName,
+ bool isServantAloneInProcess = true);
+
virtual ~Engines_Parallel_Container_i();
// --- CORBA methods
static void decInstanceCnt(std::string genericRegisterName);
// --- needed for parallel components, Numerical Platon
-
- int getArgc() { return _argc; }
- char **getArgv() { return _argv; }
-
void set_id(PortableServer::ObjectId * id) { _id = id;}
Engines::fileRef_ptr createFileRef(const char* origFileName);
PortableServer::POA_var _poa;
PortableServer::ObjectId * _id;
int _numInstance;
- int _argc;
- char** _argv;
CORBA::Long _pid;
bool _isServantAloneInProcess;
Engines::fileTransfer_var _fileTransfer;