-// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#else
#include <process.h>
#endif
+#include "ArgvKeeper.hxx"
#include "SALOME_Container_Common.hxx"
#include "SALOME_Container_i.hxx"
#include "utilities.h"
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
#include "OpUtil.hxx"
#include "KernelBasis.hxx"
AttachDebugger();
}
+template<class ContainerServant>
int container_common_main(int argc, char* argv[], std::unique_ptr<SALOME_NamingService_Container_Abstract> ns)
{
setSSLMode(ns?!ns->IsTrueNS():false);
// Initialise the ORB.
//SRN: BugID: IPAL9541, it's necessary to set a size of one message to be at least 100Mb
//CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ;
- ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
- ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
- CORBA::ORB_ptr orb = init(argc , argv ) ;
+ SetArgcArgv(argc, argv);
+ CORBA::ORB_ptr orb = KERNEL::GetRefToORB();
// LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
INFOS_COMPILATION;
system(aCommand.str().c_str());
#endif
- new Engines_Container_i(orb, root_poa, containerName , argc , argv, ns.get() );
+ new ContainerServant(orb, root_poa, containerName , argc , argv, ns.get() );
ns.release();
pman->activate();