]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
Revert "Merge remote-tracking branch 'origin/master'"
authorvsr <vsr@opencascade.com>
Thu, 29 Mar 2018 07:32:38 +0000 (10:32 +0300)
committervsr <vsr@opencascade.com>
Thu, 29 Mar 2018 07:32:38 +0000 (10:32 +0300)
This reverts commit b31c841167feb262ef99fd56ba74a6f75db382c1, reversing
changes made to 2d92e5a9c4389ea0954d6ea600a645937c2b92c5.

26 files changed:
src/GenericObj/SALOME_GenericObj_i.cc
src/Registry/SALOME_Registry_Server.cxx
src/SALOMEDS/SALOMEDS.cxx
src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx
src/SALOMEDS/SALOMEDS_ChildIterator_i.hxx
src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx
src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx
src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx
src/SALOMEDS/SALOMEDS_SComponentIterator_i.hxx
src/SALOMEDS/SALOMEDS_SObject_i.cxx
src/SALOMEDS/SALOMEDS_SObject_i.hxx
src/SALOMEDS/SALOMEDS_Server.cxx
src/SALOMEDS/SALOMEDS_Study.cxx
src/SALOMEDS/SALOMEDS_StudyBuilder.cxx
src/SALOMEDS/SALOMEDS_StudyBuilder.hxx
src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx
src/SALOMEDS/SALOMEDS_StudyBuilder_i.hxx
src/SALOMEDS/SALOMEDS_StudyManager_i.cxx
src/SALOMEDS/SALOMEDS_StudyManager_i.hxx
src/SALOMEDS/SALOMEDS_Study_i.cxx
src/SALOMEDS/SALOMEDS_Study_i.hxx
src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx
src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.hxx
src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx
src/SALOMEDS/SALOMEDS_UseCaseIterator_i.hxx
src/Utils/Utils_ExceptHandlers.cxx

index 234933606c0479e3957e8833cc4235169111d31b..80966ca6ec370dfa9fde728ca56364fa774f46f9 100644 (file)
@@ -92,8 +92,6 @@ namespace SALOME
     else {
       myPOA = PortableServer::POA::_duplicate(thePOA);
     }
-    if(MYDEBUG)
-      MESSAGE("GenericObj_i::GenericObj_i thePOA: " << thePOA << " myPOA: " << myPOA);
   }
 
   /*!
@@ -106,7 +104,6 @@ namespace SALOME
   */
   PortableServer::POA_ptr GenericObj_i::_default_POA()
   {
-    MESSAGE("GenericObj_i::_default_POA: " << myPOA);
     return PortableServer::POA::_duplicate(myPOA);
   }
 
index 62ef09e63c820493edd0172a0482b4c4690da2fe..97eed4f5e3c6802cad128a213eee07ddc86d8a7c 100644 (file)
@@ -175,7 +175,7 @@ int main( int argc , char **argv )
       policies.length(1);
       PortableServer::ThreadPolicy_var threadPol(poa->create_thread_policy(PortableServer::SINGLE_THREAD_MODEL));
       policies[0]=PortableServer::ThreadPolicy::_duplicate(threadPol);
-      PortableServer::POA_var poa2(poa->create_POA("SingleThreadPOA4RegistryStandalone",manager,policies));
+      PortableServer::POA_var poa2(poa->create_POA("SingleThPOA4SDS",manager,policies));
       threadPol->destroy();
       //
       PortableServer::ObjectId_var id(poa2->activate_object(ptrRegistry));
index 06dda32112b30631bba12f0a9dd90d0f88b7056c..81a3ce56edc581a518e41ffcb1a24c7d3b9744e4 100644 (file)
@@ -36,7 +36,6 @@
 #include "SALOMEDSClient_IParameters.hxx"
 #include "SALOMEDS_IParameters.hxx"
 #include "SALOMEDS_StudyManager_i.hxx"
-#include "utilities.h"
 
 #include "SALOMEDS_Defines.hxx"
 
@@ -118,22 +117,10 @@ SALOMEDS_EXPORT
   SALOME_NamingService namingService(orb);
   CORBA::Object_var obj = namingService.Resolve( "/myStudyManager" );
   SALOMEDS::StudyManager_var theManager = SALOMEDS::StudyManager::_narrow( obj );
-  if( CORBA::is_nil(theManager) )
-  {
-    PortableServer::POAManager_var pman = root_poa->the_POAManager();
-    CORBA::PolicyList policies;
-    policies.length(2);
-    PortableServer::ThreadPolicy_var threadPol(root_poa->create_thread_policy(PortableServer::SINGLE_THREAD_MODEL));
-    PortableServer::ImplicitActivationPolicy_var implicitPol(root_poa->create_implicit_activation_policy(PortableServer::IMPLICIT_ACTIVATION));
-    policies[0] = PortableServer::ThreadPolicy::_duplicate(threadPol);
-    policies[1] = PortableServer::ImplicitActivationPolicy::_duplicate(implicitPol);
-    PortableServer::POA_var poa = root_poa->create_POA("KERNELStudySingleThreadPOA",pman,policies);
-    MESSAGE("CreateStudyManager: KERNELStudySingleThreadPOA: "<< poa);
-    threadPol->destroy();
-
-    SALOMEDS_StudyManager_i * aStudyManager_i = new  SALOMEDS_StudyManager_i(orb, poa);
+  if( CORBA::is_nil(theManager) ) {
+    SALOMEDS_StudyManager_i * aStudyManager_i = new  SALOMEDS_StudyManager_i(orb, root_poa);
     // Activate the objects.  This tells the POA that the objects are ready to accept requests.
-    PortableServer::ObjectId_var aStudyManager_iid =  poa->activate_object(aStudyManager_i);
+    PortableServer::ObjectId_var aStudyManager_iid =  root_poa->activate_object(aStudyManager_i);
     //give ownership to the poa : the object will be deleted by the poa
     aStudyManager_i->_remove_ref();
     aStudyManager_i->register_name((char*)"/myStudyManager");
index 3a17656b00adfa1ffbe79ec56220d744c9b7d83b..e5c3ad9e1cfd6a876d7e323d9ae777ee50eb3d78 100644 (file)
@@ -25,7 +25,6 @@
 //  Module : SALOME
 //
 #include "SALOMEDS_ChildIterator_i.hxx"
-#include "SALOMEDS_StudyManager_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include "SALOMEDS.hxx"
 #include "SALOMEDSImpl_SObject.hxx"
@@ -38,9 +37,8 @@
  */
 //============================================================================
 SALOMEDS_ChildIterator_i::SALOMEDS_ChildIterator_i(const SALOMEDSImpl_ChildIterator& theImpl,
-                                                   CORBA::ORB_ptr orb)  :
-  GenericObj_i(SALOMEDS_StudyManager_i::GetThePOA()),
-  _it(theImpl.GetPersistentCopy())
+                                                   CORBA::ORB_ptr orb) 
+  : _it(theImpl.GetPersistentCopy())
 {
   SALOMEDS::Locker lock;
   _orb = CORBA::ORB::_duplicate(orb);
@@ -56,23 +54,6 @@ SALOMEDS_ChildIterator_i::~SALOMEDS_ChildIterator_i()
     if(_it) delete _it;
 }
 
-//============================================================================
-/*!
-  \brief Get default POA for the servant object.
-
-  This function is implicitly called from "_this()" function.
-  Default POA can be set via the constructor.
-
-  \return reference to the default POA for the servant
-*/
-//============================================================================
-PortableServer::POA_ptr SALOMEDS_ChildIterator_i::_default_POA()
-{
-  myPOA = PortableServer::POA::_duplicate(SALOMEDS_StudyManager_i::GetThePOA());
-  //MESSAGE("SALOMEDS_ChildIterator_i::_default_POA: " << myPOA);
-  return PortableServer::POA::_duplicate(myPOA);
-}
-
 //============================================================================
 /*! Function :Init
  * 
index 779731f78781f88737ef142d0fe3c19c6efec1ad..4b68eaf353a6f6cf4a5e5db8fce515c085da87c0 100644 (file)
@@ -53,8 +53,6 @@ public:
   
   //! standard destructor
   ~SALOMEDS_ChildIterator_i();
-
-  virtual PortableServer::POA_ptr _default_POA();
   
   virtual void Init();
   virtual void InitEx(CORBA::Boolean);
index 114c0a228986085e1c2988a4492d3f969219acfb..5b98df2db2e2ccf0f12c8a3a95db8ca5577eb3c6 100644 (file)
@@ -26,7 +26,6 @@
 //
 #include "utilities.h"
 #include "SALOMEDS_GenericAttribute_i.hxx"
-#include "SALOMEDS_StudyManager_i.hxx"
 #include "SALOMEDS_Attributes.hxx"
 #include "SALOMEDS.hxx"
 #include "SALOMEDSImpl_SObject.hxx"
@@ -44,8 +43,7 @@
 
 UNEXPECT_CATCH(GALockProtection, SALOMEDS::GenericAttribute::LockProtection);
 
-SALOMEDS_GenericAttribute_i::SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, CORBA::ORB_ptr theOrb) :
-  GenericObj_i(SALOMEDS_StudyManager_i::GetThePOA())
+SALOMEDS_GenericAttribute_i::SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, CORBA::ORB_ptr theOrb)
 {
   _orb = CORBA::ORB::_duplicate(theOrb);
   _impl = theImpl;
@@ -55,23 +53,6 @@ SALOMEDS_GenericAttribute_i::~SALOMEDS_GenericAttribute_i()
 {
 }
 
-//============================================================================
-/*!
-  \brief Get default POA for the servant object.
-
-  This function is implicitly called from "_this()" function.
-  Default POA can be set via the constructor.
-
-  \return reference to the default POA for the servant
-*/
-//============================================================================
-PortableServer::POA_ptr SALOMEDS_GenericAttribute_i::_default_POA()
-{
-  myPOA = PortableServer::POA::_duplicate(SALOMEDS_StudyManager_i::GetThePOA());
-  //MESSAGE("SALOMEDS_GenericAttribute_i::_default_POA: " << myPOA);
-  return PortableServer::POA::_duplicate(myPOA);
-}
-
 void SALOMEDS_GenericAttribute_i::CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection) 
 {
   SALOMEDS::Locker lock;
index b141ad266b85e34653630767cdd0d74fe28b11cd..0654e26dde47176167a0f74aa1edae4a7a449a4d 100644 (file)
@@ -48,8 +48,6 @@ public:
   SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, CORBA::ORB_ptr theOrb);
   virtual ~SALOMEDS_GenericAttribute_i();
 
-  virtual PortableServer::POA_ptr _default_POA();
-
   void CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection);
   
   virtual char* Type();
index 07b24a93cd3d2970de5914d5391e05a113ec445e..cc7d6700fda508498f90395d78f7f59796d68637 100644 (file)
@@ -27,8 +27,6 @@
 #include "SALOMEDS_SComponentIterator_i.hxx"
 #include "SALOMEDS.hxx"
 #include "SALOMEDSImpl_SComponent.hxx"
-#include "SALOMEDS_StudyManager_i.hxx"
-#include "utilities.h"
 
 //============================================================================
 /*! Function : constructor
@@ -37,8 +35,7 @@
 //============================================================================
 
 SALOMEDS_SComponentIterator_i::SALOMEDS_SComponentIterator_i(const SALOMEDSImpl_SComponentIterator& theImpl, 
-                                                             CORBA::ORB_ptr orb)  :
-  GenericObj_i(SALOMEDS_StudyManager_i::GetThePOA())
+                                                             CORBA::ORB_ptr orb) 
 {
   _orb = CORBA::ORB::_duplicate(orb);
   _impl = theImpl.GetPersistentCopy();
@@ -54,23 +51,6 @@ SALOMEDS_SComponentIterator_i::~SALOMEDS_SComponentIterator_i()
    if(_impl) delete _impl;
 }
 
-//============================================================================
-/*!
-  \brief Get default POA for the servant object.
-
-  This function is implicitly called from "_this()" function.
-  Default POA can be set via the constructor.
-
-  \return reference to the default POA for the servant
-*/
-//============================================================================
-PortableServer::POA_ptr SALOMEDS_SComponentIterator_i::_default_POA()
-{
-  myPOA = PortableServer::POA::_duplicate(SALOMEDS_StudyManager_i::GetThePOA());
-  MESSAGE("SALOMEDS_SComponentIterator_i::_default_POA: " << myPOA);
-  return PortableServer::POA::_duplicate(myPOA);
-}
-
 //============================================================================
 /*! Function : Init
  * 
index 928fe053071a877f3addae357810173c11d5fd4c..73124108fbaa43a2e1c82573cb087af2c18a9666 100644 (file)
@@ -54,8 +54,6 @@ public:
   SALOMEDS_SComponentIterator_i(const SALOMEDSImpl_SComponentIterator& theImpl, CORBA::ORB_ptr);
   
   ~SALOMEDS_SComponentIterator_i();
-
-  virtual PortableServer::POA_ptr _default_POA();
   
   virtual void Init();
   virtual CORBA::Boolean More();
index bfff08d5ed4907cf8ada7e6bc1109ba553e62031..210e0fa68217ad2a69d83c4bf17afbe39d3ed9f5 100644 (file)
@@ -58,8 +58,7 @@ SALOMEDS::SObject_ptr SALOMEDS_SObject_i::New(const SALOMEDSImpl_SObject& theImp
  *  Purpose  :
  */
 //============================================================================
-SALOMEDS_SObject_i::SALOMEDS_SObject_i(const SALOMEDSImpl_SObject& impl, CORBA::ORB_ptr orb) :
-  GenericObj_i(SALOMEDS_StudyManager_i::GetThePOA())
+SALOMEDS_SObject_i::SALOMEDS_SObject_i(const SALOMEDSImpl_SObject& impl, CORBA::ORB_ptr orb)
 {
   _impl = 0;
   if(!impl.IsNull()) {
@@ -86,23 +85,6 @@ SALOMEDS_SObject_i::~SALOMEDS_SObject_i()
    if(_impl) delete _impl;    
 }
 
-//============================================================================
-/*!
-  \brief Get default POA for the servant object.
-
-  This function is implicitly called from "_this()" function.
-  Default POA can be set via the constructor.
-
-  \return reference to the default POA for the servant
-*/
-//============================================================================
-PortableServer::POA_ptr SALOMEDS_SObject_i::_default_POA()
-{
-  myPOA = PortableServer::POA::_duplicate(SALOMEDS_StudyManager_i::GetThePOA());
-  //MESSAGE("SALOMEDS_SObject_i::_default_POA: " << myPOA);
-  return PortableServer::POA::_duplicate(myPOA);
-}
-
 //================================================================================
 /*!
  * \brief Returns true if the %SObject does not belong to any %Study
index 5c0bdc652ea52e0c570e2a79d1cd8e580c5d5074..f996197fb2f8e70a41e5a63a82a9b05030b778f8 100644 (file)
@@ -53,8 +53,6 @@ public:
   SALOMEDS_SObject_i(const SALOMEDSImpl_SObject&, CORBA::ORB_ptr);
   
   virtual ~SALOMEDS_SObject_i();
-
-  virtual PortableServer::POA_ptr _default_POA();
   
   virtual CORBA::Boolean IsNull();
   virtual char* GetID();
index a780abd6cc2c861a34954b83908c2ba6e08f2477..17a6583b0b6f7fe26c48ce8ed3b0defe4a613849 100644 (file)
@@ -70,7 +70,6 @@ int main(int argc, char** argv)
       ts_rem.tv_nsec=0;
       ts_rem.tv_sec=0;
       CosNaming::NamingContext_var inc;
-      PortableServer::POA_var defaultPoa;
       PortableServer::POA_var poa;
       CORBA::Object_var theObj;
       CORBA::Object_var obj;
@@ -96,20 +95,9 @@ int main(int argc, char** argv)
             { 
               obj = orb->resolve_initial_references("RootPOA");
               if(!CORBA::is_nil(obj))
-                defaultPoa = PortableServer::POA::_narrow(obj);
-              if(!CORBA::is_nil(defaultPoa))
-                pman = defaultPoa->the_POAManager();
-
-              PortableServer::POAManager_var pman = defaultPoa->the_POAManager();
-              CORBA::PolicyList policies;
-              policies.length(2);
-              PortableServer::ThreadPolicy_var threadPol(defaultPoa->create_thread_policy(PortableServer::SINGLE_THREAD_MODEL));
-              PortableServer::ImplicitActivationPolicy_var implicitPol(defaultPoa->create_implicit_activation_policy(PortableServer::IMPLICIT_ACTIVATION));
-              policies[0] = PortableServer::ThreadPolicy::_duplicate(threadPol);
-              policies[1] = PortableServer::ImplicitActivationPolicy::_duplicate(implicitPol);
-              poa = defaultPoa->create_POA("KERNELStandaloneStudySingleThreadPOA",pman,policies);
-              threadPol->destroy();
-
+                poa = PortableServer::POA::_narrow(obj);
+              if(!CORBA::is_nil(poa))
+                pman = poa->the_POAManager();
               if(!CORBA::is_nil(orb)) 
                 theObj = orb->resolve_initial_references("NameService"); 
               if (!CORBA::is_nil(theObj)){
index 50d658b7d969fc876e8513f8d1832d2acfff069b..63d44b5ac2acb37fbfc6279e84fbeeea2295e5b9 100644 (file)
@@ -68,9 +68,6 @@ SALOMEDS_Study::SALOMEDS_Study(SALOMEDSImpl_Study* theStudy)
   _isLocal = true;
   _local_impl = theStudy;
   _corba_impl = SALOMEDS::Study::_nil();
-
-  pthread_mutex_init( &SALOMEDS_StudyBuilder::_remoteBuilderMutex, 0 );
-
   init_orb();
 }
 
@@ -82,8 +79,6 @@ SALOMEDS_Study::SALOMEDS_Study(SALOMEDS::Study_ptr theStudy)
   long pid =  (long)getpid();
 #endif  
 
-  pthread_mutex_init( &SALOMEDS_StudyBuilder::_remoteBuilderMutex, 0 );
-
   long addr = theStudy->GetLocalImpl(Kernel_Utils::GetHostname().c_str(), pid, _isLocal);
   if(_isLocal) {
     _local_impl = reinterpret_cast<SALOMEDSImpl_Study*>(addr);
index 8aeed232c52603500333f282389a497cf63501e2..f23777af12fda26bbf3ff4aff6cd8f2c73e7e522 100644 (file)
@@ -50,8 +50,6 @@
 #include "Utils_ORB_INIT.hxx" 
 #include "Utils_SINGLETON.hxx" 
 
-pthread_mutex_t SALOMEDS_StudyBuilder::_remoteBuilderMutex;
-
 SALOMEDS_StudyBuilder::SALOMEDS_StudyBuilder(SALOMEDSImpl_StudyBuilder* theBuilder)
 {
   _isLocal = true;
@@ -63,7 +61,6 @@ SALOMEDS_StudyBuilder::SALOMEDS_StudyBuilder(SALOMEDSImpl_StudyBuilder* theBuild
 
 SALOMEDS_StudyBuilder::SALOMEDS_StudyBuilder(SALOMEDS::StudyBuilder_ptr theBuilder)
 {
-  pthread_mutex_lock( &_remoteBuilderMutex );
   _isLocal = false;
   _local_impl = NULL;
   _corba_impl = SALOMEDS::StudyBuilder::_duplicate(theBuilder);
@@ -73,7 +70,6 @@ SALOMEDS_StudyBuilder::SALOMEDS_StudyBuilder(SALOMEDS::StudyBuilder_ptr theBuild
 
 SALOMEDS_StudyBuilder::~SALOMEDS_StudyBuilder() 
 {
-  if (!_isLocal) pthread_mutex_unlock( &_remoteBuilderMutex );
 }
 
 _PTR(SComponent) SALOMEDS_StudyBuilder::NewComponent(const std::string& ComponentDataType)
index 37336327f261f75f283475ba2a2ff75d12713e13..b7e3a616078aa80fe7f3c4ef84a0170720a737a7 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "SALOMEDSClient.hxx"
 #include "SALOMEDSImpl_StudyBuilder.hxx"
-#include <pthread.h>
 
 // IDL headers
 #include <SALOMEconfig.h>
@@ -45,9 +44,7 @@ private:
   SALOMEDS::StudyBuilder_var        _corba_impl;
   CORBA::ORB_var                    _orb;
 
-
 public:
-  static pthread_mutex_t            _remoteBuilderMutex;
 
   SALOMEDS_StudyBuilder(SALOMEDSImpl_StudyBuilder* theBuilder);
   SALOMEDS_StudyBuilder(SALOMEDS::StudyBuilder_ptr theBuilder);
index e3013e714232005a8ed7d0a64bb483476e53ad74..a31fda64c6d16eebd6a2ce09bac1eec4228a136b 100644 (file)
@@ -26,7 +26,6 @@
 //
 #include "utilities.h"
 #include "SALOMEDS_StudyBuilder_i.hxx"
-#include "SALOMEDS_StudyManager_i.hxx"
 #include "SALOMEDS_Study_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include "SALOMEDS_SComponent_i.hxx"
@@ -68,23 +67,6 @@ SALOMEDS_StudyBuilder_i::SALOMEDS_StudyBuilder_i(SALOMEDSImpl_StudyBuilder* theI
 SALOMEDS_StudyBuilder_i::~SALOMEDS_StudyBuilder_i()
 {}
 
-//============================================================================
-/*!
-  \brief Get default POA for the servant object.
-
-  This function is implicitly called from "_this()" function.
-  Default POA can be set via the constructor.
-
-  \return reference to the default POA for the servant
-*/
-//============================================================================
-PortableServer::POA_ptr SALOMEDS_StudyBuilder_i::_default_POA()
-{
-  PortableServer::POA_ptr poa = SALOMEDS_StudyManager_i::GetThePOA();
-  MESSAGE("SALOMEDS_StudyBuilder_i::_default_POA: " << poa);
-  return PortableServer::POA::_duplicate(poa);
-}
-
 //============================================================================
 /*! Function : NewComponent
  *  Purpose  : Create a new component (Scomponent)
index 99b44a92c1d17c7a16787334dd56b9cae4ae1c9d..d4c30fb74bf155ada22b44a6f972487692e503e8 100644 (file)
@@ -48,8 +48,6 @@ public:
 
   ~SALOMEDS_StudyBuilder_i();
 
-  virtual PortableServer::POA_ptr _default_POA();
-
   //! NewComponent
   /*!
     \param ComponentDataType    
index 0db23404ccbd2ce174ab360a702ab6b98475d880..c5eefdfaaf099b926e824989bfb218c8baff2228 100644 (file)
@@ -69,11 +69,6 @@ SALOMEDS_StudyManager_i::SALOMEDS_StudyManager_i(CORBA::ORB_ptr orb, PortableSer
 {
   _orb = CORBA::ORB::_duplicate(orb);
   _poa = PortableServer::POA::_duplicate(thePOA);
-  MESSAGE("thePOA, _poa="<<_poa);
-  if (_mapOfPOA.empty())
-    _mapOfPOA[0] = _poa;
-  else
-    MESSAGE("_mapOfPOA[0] already contains: " << _mapOfPOA[0]);
   _name_service = new SALOME_NamingService(_orb);
   // Study directory creation in the naming service : to register all
   // open studies in the session
@@ -96,22 +91,6 @@ SALOMEDS_StudyManager_i::~SALOMEDS_StudyManager_i()
   delete _impl;
 }
 
-//============================================================================
-/*!
-  \brief Get default POA for the servant object.
-
-  This function is implicitly called from "_this()" function.
-  Default POA can be set via the constructor.
-
-  \return reference to the default POA for the servant
-*/
-//============================================================================
-PortableServer::POA_ptr SALOMEDS_StudyManager_i::_default_POA()
-{
-  MESSAGE("SALOMEDS_StudyManager_i::_default_POA: " << _poa);
-  return PortableServer::POA::_duplicate(_poa);
-}
-
 //============================================================================
 /*! Function : register_name
  *  Purpose  : Register the study Manager in the naming service under the
@@ -508,19 +487,6 @@ PortableServer::POA_ptr SALOMEDS_StudyManager_i::GetPOA(const SALOMEDS::Study_pt
   return PortableServer::POA::_nil();
 }
 
-PortableServer::POA_ptr SALOMEDS_StudyManager_i::GetThePOA()
-{
-  std::map<int, PortableServer::POA_ptr>::iterator iter = _mapOfPOA.begin();
-  if (iter != _mapOfPOA.end())
-    {
-      PortableServer::POA_ptr aPoa = iter->second;
-      //MESSAGE("GetThePOA(): "<< aPoa);
-      return aPoa;
-    }
-  MESSAGE("GetThePOA(): _nil !");
-  return PortableServer::POA::_nil();
-}
-
 CORBA::Long SALOMEDS_StudyManager_i::getPID()
 {
 #ifdef WIN32
index 05225c75e5521baf3f4b8c52c704b3e3fa7c823b..ba1daf0eb3684e7504c16a9ff8ec33bb34455486 100644 (file)
@@ -71,8 +71,6 @@ public:
   //! standard destructor
   virtual  ~SALOMEDS_StudyManager_i();
 
-  virtual PortableServer::POA_ptr _default_POA();
-
  //! method to Register study Manager in the naming service
   /*!
     \param char* arguments, the context to register the study manager in the NS
@@ -151,7 +149,6 @@ public:
   virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
 
   static PortableServer::POA_ptr GetPOA(const SALOMEDS::Study_ptr theStudy);
-  static PortableServer::POA_ptr GetThePOA();
 
   void Shutdown() { if(!CORBA::is_nil(_orb)) _orb->shutdown(0); }
 };
index 3d99e2b73925b3f4a428dc077152c8f4745c1d49..d0b936acc08a635d67697e4f9b2a857f180ef0fc 100644 (file)
@@ -274,23 +274,6 @@ SALOMEDS_Study_i::~SALOMEDS_Study_i()
   _mapOfStudies.erase(_impl);
 }  
 
-//============================================================================
-/*!
-  \brief Get default POA for the servant object.
-
-  This function is implicitly called from "_this()" function.
-  Default POA can be set via the constructor.
-
-  \return reference to the default POA for the servant
-*/
-//============================================================================
-PortableServer::POA_ptr SALOMEDS_Study_i::_default_POA()
-{
-  PortableServer::POA_ptr poa = SALOMEDS_StudyManager_i::GetThePOA();
-  MESSAGE("SALOMEDS_Study_i::_default_POA: " << poa);
-  return PortableServer::POA::_duplicate(poa);
-}
-
 //============================================================================
 /*! Function : GetPersistentReference
  *  Purpose  : Get persistent reference of study (idem URL())
index 59fed56643c5fbd007b6f4515525ae3b4dff9e1f..a767e6414162f8bad9fe11e04bebfbc20df52160 100644 (file)
@@ -38,7 +38,6 @@
 #include <stdio.h>
 
 //SALOMEDS headers
-#include "SALOMEDS_StudyManager_i.hxx"
 #include "SALOMEDS_SComponentIterator_i.hxx"
 #include "SALOMEDS_StudyBuilder_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
@@ -65,8 +64,6 @@ public:
   
   //! standard destructor
   virtual ~SALOMEDS_Study_i(); 
-
-  virtual PortableServer::POA_ptr _default_POA();
   
   //! method to Get persistent reference of study (idem URL())
   /*!
index 4c4d3fdd4fb8138b9abc1e0e46800259cecc7ac6..118ab2d8120f3b5123ea895c448899ad04c7187b 100644 (file)
@@ -28,7 +28,6 @@
 #include "SALOMEDS_UseCaseIterator_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"  
 #include "SALOMEDS.hxx"
-#include "SALOMEDS_StudyManager_i.hxx"
 
 #include "utilities.h"
 
@@ -38,8 +37,7 @@
  */
 //============================================================================
 SALOMEDS_UseCaseBuilder_i::SALOMEDS_UseCaseBuilder_i(SALOMEDSImpl_UseCaseBuilder* theImpl,
-                                                     CORBA::ORB_ptr orb) :
-  GenericObj_i(SALOMEDS_StudyManager_i::GetThePOA())
+                                                     CORBA::ORB_ptr orb)
 {
   _orb = CORBA::ORB::_duplicate(orb);
   _impl = theImpl;
@@ -54,23 +52,6 @@ SALOMEDS_UseCaseBuilder_i::~SALOMEDS_UseCaseBuilder_i()
 {
 }
 
-//============================================================================
-/*!
-  \brief Get default POA for the servant object.
-
-  This function is implicitly called from "_this()" function.
-  Default POA can be set via the constructor.
-
-  \return reference to the default POA for the servant
-*/
-//============================================================================
-PortableServer::POA_ptr SALOMEDS_UseCaseBuilder_i::_default_POA()
-{
-  myPOA = PortableServer::POA::_duplicate(SALOMEDS_StudyManager_i::GetThePOA());
-  //MESSAGE("SALOMEDS_UseCaseBuilder_i::_default_POA: " << myPOA);
-  return PortableServer::POA::_duplicate(myPOA);
-}
-
 
 //============================================================================
 /*! Function : Append
index 42a836e0d5a6f29b3751596a20e82be3ab67c86b..b7edf4d81a30bdc2d93dab92c61a420eac0e2a49 100644 (file)
@@ -58,8 +58,6 @@ public:
   
   //! standard destructor
   ~SALOMEDS_UseCaseBuilder_i();
-
-  virtual PortableServer::POA_ptr _default_POA();
   
   virtual CORBA::Boolean Append(SALOMEDS::SObject_ptr theObject);
 
index dd34e11b7ed7cb7c2d14bcd1e4246debb45b98dd..cb3babe7672d7a2567f8d13d58f880bdc6b8d180 100644 (file)
@@ -27,7 +27,6 @@
 #include "SALOMEDS_UseCaseIterator_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include "SALOMEDS.hxx"
-#include "SALOMEDS_StudyManager_i.hxx"
 
 #include "SALOMEDSImpl_SObject.hxx"
 #include "utilities.h"
@@ -38,8 +37,7 @@
  */
 //============================================================================
 SALOMEDS_UseCaseIterator_i::SALOMEDS_UseCaseIterator_i(const SALOMEDSImpl_UseCaseIterator& theImpl, 
-                                                       CORBA::ORB_ptr orb) :
-  GenericObj_i(SALOMEDS_StudyManager_i::GetThePOA())
+                                                       CORBA::ORB_ptr orb)
 {
   _orb = CORBA::ORB::_duplicate(orb);
   _impl = theImpl.GetPersistentCopy();
@@ -55,23 +53,6 @@ SALOMEDS_UseCaseIterator_i::~SALOMEDS_UseCaseIterator_i()
     if(_impl) delete _impl;
 }
 
-//============================================================================
-/*!
-  \brief Get default POA for the servant object.
-
-  This function is implicitly called from "_this()" function.
-  Default POA can be set via the constructor.
-
-  \return reference to the default POA for the servant
-*/
-//============================================================================
-PortableServer::POA_ptr SALOMEDS_UseCaseIterator_i::_default_POA()
-{
-  myPOA = PortableServer::POA::_duplicate(SALOMEDS_StudyManager_i::GetThePOA());
-  //MESSAGE("SALOMEDS_UseCaseIterator_i::_default_POA: " << myPOA);
-  return PortableServer::POA::_duplicate(myPOA);
-}
-
 //============================================================================
 /*! Function :Init
  * 
index a659cd81a4dc4f026b607ff2c1dc1cefcba2c76a..fbba0d691380a95e63126236b6aeeb1bf1474097 100644 (file)
@@ -53,8 +53,6 @@ public:
   
   //! standard destructor
   ~SALOMEDS_UseCaseIterator_i();
-
-  virtual PortableServer::POA_ptr _default_POA();
   
   virtual void Init(CORBA::Boolean);
   virtual CORBA::Boolean More();
index 1e96fd0fe25f2035effa01c5cc01aea4c730a7e5..e77e7d8981e34b588311438d51442085f47e7c4c 100644 (file)
 #include "Utils_CorbaException.hxx"
 #include "Utils_SALOME_Exception.hxx"
 
-#include <sstream>
-#include <execinfo.h>
-#include <dlfcn.h>
-#include <cxxabi.h>
-
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOME_Exception)
 
-//#define NBLINES_BACKTRACE 64
-
-void printBacktrace(void **stacklines, int nbLines, std::stringstream& txt)
-{
-  char **stackSymbols = backtrace_symbols(stacklines, nbLines);
-  for (int i = 0; i < nbLines; i++)
-    {
-      Dl_info infodl;
-      if (dladdr(stacklines[i], &infodl))
-        {
-          txt << i << " " << infodl.dli_fname << " " << infodl.dli_fbase << " ";
-          char *demangled = NULL;
-          int status = 0;
-          demangled = abi::__cxa_demangle(infodl.dli_sname, NULL, 0, &status);
-          if (status == 0 && demangled != NULL)
-            {
-              std::string demangstr = demangled; // copy
-              txt << demangstr;
-            }
-          else
-            {
-              if (infodl.dli_sname != 0 && infodl.dli_sname[0] != 0)
-                {
-                  std::string sname = infodl.dli_sname;
-                  if (sname.size() > 0)
-                    txt << infodl.dli_sname;
-                }
-            }
-          txt << " " << infodl.dli_saddr;
-          txt << std::endl;
-          free(demangled);
-        }
-      else
-        txt << i << " " << stackSymbols[i] << std::endl;
-    }
-  free(stackSymbols);
-}
-
 void SalomeException ()
 {
-  void *stacklines[64];
-  size_t nbLines;
-  nbLines = backtrace(stacklines, 64);
-  std::stringstream txt;
-  txt << "Salome Exception" << std::endl;
-  printBacktrace(stacklines, nbLines, txt);
-  throw SALOME_Exception(txt.str().c_str());
+  throw SALOME_Exception("Salome Exception");
 }
 
-void SALOME_SalomeException()
-{
-  void *stacklines[64];
-  size_t nbLines;
-  nbLines = backtrace(stacklines, 64);
-  std::stringstream txt;
-  txt << "INTERNAL_ERROR, backtrace stack:" << nbLines << std::endl;
-  printBacktrace(stacklines, nbLines, txt);
-  THROW_SALOME_CORBA_EXCEPTION(txt.str().c_str(), SALOME::INTERNAL_ERROR);
+void SALOME_SalomeException() {
+  THROW_SALOME_CORBA_EXCEPTION("INTERNAL ERROR", SALOME::INTERNAL_ERROR);
 }