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/
20 #include "SALOME_ContainerManager.hxx"
21 #include "SALOMETraceCollector.hxx"
22 #include "utilities.h"
24 int main(int argc, char* argv[])
26 PortableServer::POA_var root_poa;
27 PortableServer::POAManager_var pman;
28 CORBA::Object_var obj;
30 CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ;
31 // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
35 obj = orb->resolve_initial_references("RootPOA");
36 if(!CORBA::is_nil(obj))
37 root_poa = PortableServer::POA::_narrow(obj);
38 if(!CORBA::is_nil(root_poa))
39 pman = root_poa->the_POAManager();
41 catch(CORBA::COMM_FAILURE&){
42 MESSAGE( "Container: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
45 SALOME_ContainerManager *cmServ=new SALOME_ContainerManager(orb);
48 }catch(CORBA::SystemException&){
49 MESSAGE("Caught CORBA::SystemException.");
50 }catch(PortableServer::POA::WrongPolicy&){
51 MESSAGE("Caught CORBA::WrongPolicyException.");
52 }catch(PortableServer::POA::ServantAlreadyActive&){
53 MESSAGE("Caught CORBA::ServantAlreadyActiveException");
54 }catch(CORBA::Exception&){
55 MESSAGE("Caught CORBA::Exception.");
56 }catch(std::exception& exc){
57 MESSAGE("Caught std::exception - "<<exc.what());
59 MESSAGE("Caught unknown exception.");
62 // delete myThreadTrace;