-// Copyright (C) 2007-2016 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
#include "DF_Attribute.hxx"
#include "Utils_CorbaException.hxx"
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
+#include "OpUtil.hxx"
+
+pthread_mutex_t SALOMEDS_StudyBuilder::_remoteBuilderMutex;
SALOMEDS_StudyBuilder::SALOMEDS_StudyBuilder(SALOMEDSImpl_StudyBuilder* theBuilder)
{
SALOMEDS_StudyBuilder::SALOMEDS_StudyBuilder(SALOMEDS::StudyBuilder_ptr theBuilder)
{
+ pthread_mutex_lock( &_remoteBuilderMutex );
_isLocal = false;
_local_impl = NULL;
_corba_impl = SALOMEDS::StudyBuilder::_duplicate(theBuilder);
SALOMEDS_StudyBuilder::~SALOMEDS_StudyBuilder()
{
+ if (!_isLocal) pthread_mutex_unlock( &_remoteBuilderMutex );
}
_PTR(SComponent) SALOMEDS_StudyBuilder::NewComponent(const std::string& ComponentDataType)
void SALOMEDS_StudyBuilder::CheckLocked()
{
- //There is only local part as CORBA part throws the correct exeception
+ //There is only local part as CORBA part throws the correct exception
if (_isLocal) {
SALOMEDS::Locker lock;
try {
void SALOMEDS_StudyBuilder::init_orb()
{
- ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance();
- ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
- _orb = init(0 , 0 );
+ _orb = KERNEL::GetRefToORB();
}