//! In case of SSL mode Returns entry to Embedded NS
EmbeddedNamingService get_embedded_NS_if_ssl();
+
+ boolean is_SSL_mode();
//! Unload component libraries from the container.
void finalize_removal() ;
#include "SALOME_NamingService.hxx"
#include "SALOME_Fake_NamingService.hxx"
#include "SALOME_Embedded_NamingService_Client.hxx"
+#include "SALOME_Embedded_NamingService.hxx"
#include "Basics_Utils.hxx"
#ifdef _XOPEN_SOURCE
}
else
{
- return Engines::EmbeddedNamingService::_nil();
+ SALOME_Fake_NamingService *fns(dynamic_cast<SALOME_Fake_NamingService *>(this->_NS));
+ if(fns)
+ {
+ Engines::EmbeddedNamingService_var ret = GetEmbeddedNamingService();
+ return ret._retn();
+ }
+ else
+ return Engines::EmbeddedNamingService::_nil();
}
}
self._naming_service = SALOME_NamingServicePy_i(self._orb)
else:
self._naming_service = SALOME_Embedded_NamingService_ClientPy(emb_ns)
- Component_path = self._containerName + "/" + self._instanceName
+ Component_path = contID.name + "/" + self._instanceName#self._containerName
MESSAGE( 'SALOME_ComponentPy_i Register' + str( Component_path ) )
self._naming_service.Register(self._compo_o, Component_path)
# Add componentinstance to registry
load_impl(const char *nameToRegister,
const char *componentName);
+ bool is_SSL_mode() override { return this->isSSLMode(); }
+
Engines::EmbeddedNamingService_ptr get_embedded_NS_if_ssl() override;
SALOME_NamingService_Container_Abstract *getNS() const { return _NS; }
CORBA::Object_ptr SALOME_Fake_NamingService::ResolveComponent(const char* hostname, const char* containerName, const char* componentName, const int nbproc)
{
std::ostringstream oss;
- oss << SEP << "Containers" << SEP << hostname << SEP << containerName << SEP << componentName;
+ oss << SEP << "Containers" << SEP << hostname << SEP << containerName << SEP << componentName << "_inst_";
std::string entryToFind(oss.str());
- return Resolve(entryToFind.c_str());
+ {
+ std::lock_guard<std::mutex> g(_mutex);
+ std::vector<std::string> candidates;
+ for(auto it : _map)
+ {
+ if(it.first.find(entryToFind) == 0)
+ candidates.push_back(it.first);
+ }
+ if(candidates.size() == 1)
+ {
+ auto it = _map.find(candidates[0]);
+ return CORBA::Object::_duplicate((*it).second);
+ }
+ else
+ {
+ return CORBA::Object::_nil();
+ }
+
+ }
}
std::vector< std::pair< std::string, Engines::Container_var> > SALOME_Fake_NamingService::ListOfContainersInNS_NoThreadSafe()