1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "SALOME_ContainerManager.hxx"
21 #include "utilities.h"
23 int main(int argc, char* argv[])
25 PortableServer::POA_var root_poa;
26 PortableServer::POAManager_var pman;
27 CORBA::Object_var obj;
29 CORBA::ORB_ptr orb = CORBA::ORB_init( argc , argv ) ;
30 // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
34 obj = orb->resolve_initial_references("RootPOA");
35 if(!CORBA::is_nil(obj))
36 root_poa = PortableServer::POA::_narrow(obj);
37 if(!CORBA::is_nil(root_poa))
38 pman = root_poa->the_POAManager();
40 catch(CORBA::COMM_FAILURE&){
41 MESSAGE( "Container: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
44 SALOME_ContainerManager *cmServ=new SALOME_ContainerManager(orb);
47 }catch(CORBA::SystemException&){
48 MESSAGE("Caught CORBA::SystemException.");
49 }catch(PortableServer::POA::WrongPolicy&){
50 MESSAGE("Caught CORBA::WrongPolicyException.");
51 }catch(PortableServer::POA::ServantAlreadyActive&){
52 MESSAGE("Caught CORBA::ServantAlreadyActiveException");
53 }catch(CORBA::Exception&){
54 MESSAGE("Caught CORBA::Exception.");
55 }catch(std::exception& exc){
56 MESSAGE("Caught std::exception - "<<exc.what());
58 MESSAGE("Caught unknown exception.");
61 // delete myThreadTrace;