Salome HOME
Move MEDCALC tests into SSL mode
[modules/med.git] / src / MEDCalc / cmp / MEDFactoryClient.cxx
index 56bf3bbb39528c566d5314fb8c3eb499dc096c23..4a5f2ad857acf64c9cf12ab1001ed5a6219d27b1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2021  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -22,7 +22,6 @@
 #include <SALOME_KernelServices.hxx>
 
 #include "MEDFactoryClient.hxx"
-#include "MEDFactory_Component_Generator.hxx"
 
 namespace MEDFactoryClient {
 
@@ -32,18 +31,9 @@ namespace MEDFactoryClient {
   MEDCALC::MEDFactory_ptr getFactory() {
     static MEDCALC::MEDFactory_ptr engine;
     if(CORBA::is_nil(engine)){
-               SALOME_NamingService_Abstract *ns = KERNEL::getNamingService();
-               if (dynamic_cast<SALOME_NamingService *>(ns)) {
-                       Engines::EngineComponent_var component =
-                       KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","MEDFactory" );
-                       engine = MEDCALC::MEDFactory::_narrow(component);
-               }
-               else {
-                       Engines::EngineComponent_var component = RetrieveMEDFactoryInstance();
-                       CORBA::Object_var comp2 = CORBA::Object::_narrow(component);
-                       KERNEL::RegisterCompo("MEDFactory", comp2);
-                       engine = MEDCALC::MEDFactory::_narrow(component);
-               }
+         Engines::EngineComponent_var component = 
+                 KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","MEDFactory" );
+         engine = MEDCALC::MEDFactory::_narrow(component);
     }
     return engine;
   }