//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
+#define _DEVDEBUG_
#include "SalomeContainerTools.hxx"
#include "SALOME_LifeCycleCORBA.hxx"
#include "SALOME_NamingService.hxx"
bool isEmptyName;
std::string str(sct.getNotNullContainerName(cont,askingNode,isEmptyName));
- DEBTRACE("SalomeContainer::start " << str <<";"<< _sct.getHostName() <<";"<<_type);
+ DEBTRACE("SalomeContainer::start " << str <<";"<< sct.getHostName() );
// Finalize parameters with components found in the container
myparams.mode="get";
try
{
+ DEBTRACE("GiveContainer " << str << " mode " << myparams.mode);
trueCont=contManager->GiveContainer(myparams);
}
catch( const SALOME::SALOME_Exception& ex )
if(!CORBA::is_nil(trueCont))
{
shutdownLevel=3;
- DEBTRACE( "container found: " << str << " " << _shutdownLevel );
+ DEBTRACE( "container found: " << str << " " << shutdownLevel );
}
else
{
shutdownLevel=2;
myparams.mode="start";
- DEBTRACE( "container not found: " << str << " " << _shutdownLevel);
+ DEBTRACE( "container not found: " << str << " " << shutdownLevel);
}
}
{
// --- GiveContainer is used in batch mode to retreive launched containers,
// and is equivalent to StartContainer when not in batch.
+ DEBTRACE("GiveContainer " << str << " mode " << myparams.mode);
trueCont=contManager->GiveContainer(myparams);
}
catch( const SALOME::SALOME_Exception& ex )
}
catch(CORBA::COMM_FAILURE&)
{
- std::cerr << "SalomeContainer::start : CORBA Comm failure detected. Make another try!" << std::endl;
+ //std::cerr << "SalomeContainer::start : CORBA Comm failure detected. Make another try!" << std::endl;
+ DEBTRACE("SalomeContainer::start :" << str << " :CORBA Comm failure detected. Make another try!");
nbTries++;
if(nbTries > 5)
throw Exception("SalomeContainer::start : Unable to launch container in Salome : CORBA Comm failure detected");
if(CORBA::is_nil(trueCont))
throw Exception("SalomeContainer::start : Unable to launch container in Salome. Check your CatalogResources.xml file");
+ // TODO : thread safety!
schelp->setContainer(askingNode,trueCont);
CORBA::String_var containerName(trueCont->name()),hostName(trueCont->getHostName());
- std::cerr << "SalomeContainer launched : " << containerName << " " << hostName << " " << trueCont->getPID() << std::endl;
+ //std::cerr << "SalomeContainer launched : " << containerName << " " << hostName << " " << trueCont->getPID() << std::endl;
+ DEBTRACE("SalomeContainer launched : " << containerName << " " << hostName << " " << trueCont->getPID() );
}
CORBA::Object_ptr SalomeContainerToolsBase::LoadComponent(SalomeContainerHelper *launchModeType, Container *cont, Task *askingNode)