Salome HOME
[EDF30382] : Synchro mecanism to ease test of extreme situations
[modules/kernel.git] / src / TestContainer / TestContainer.cxx
index 2f86fd9420edce0a2038e4d7ec2eb7d11e060371..72c6313c1f5a2768d0dbf338fc6548640af71724 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  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
 #include CORBA_CLIENT_HEADER(SALOME_TestComponent)
 
 #include "SALOME_NamingService.hxx"
+#include "ArgvKeeper.hxx"
 #include "NamingService_WaitForServerReadiness.hxx"
 #include "Basics_Utils.hxx"
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
+#include "OpUtil.hxx"
 #include "Utils_SALOME_Exception.hxx"
 #include "Utils_CommException.hxx"
 
@@ -72,7 +72,7 @@ Engines::TestComponent_ptr create_instance(Engines::Container_ptr iGenFact,
   iGenFact->load_component_Library(componenttName.c_str(),reason);
 #endif
   CORBA::string_free(reason);
-  CORBA::Object_var obj = iGenFact->create_component_instance(componenttName.c_str(), 0);
+  CORBA::Object_var obj = iGenFact->create_component_instance(componenttName.c_str());
   Engines::TestComponent_var anInstance = Engines::TestComponent::_narrow(obj);
   MESSAGE("create anInstance");
   SCRUTE(anInstance->instanceName());
@@ -82,8 +82,8 @@ Engines::TestComponent_ptr create_instance(Engines::Container_ptr iGenFact,
 int main (int argc, char * argv[])
 {
   // Initializing omniORB
-  ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
-  CORBA::ORB_ptr orb = init( argc , argv ) ;
+  SetArgcArgv( argc, argv );
+  CORBA::ORB_ptr orb = KERNEL::GetRefToORB();
   //  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
 
   try