1 #include "SALOME_ContainerManager.hxx"
4 int main(int argc, char* argv[])
6 PortableServer::POA_var root_poa;
7 PortableServer::POAManager_var pman;
10 CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ;
12 obj = orb->resolve_initial_references("RootPOA");
13 if(!CORBA::is_nil(obj))
14 root_poa = PortableServer::POA::_narrow(obj);
15 if(!CORBA::is_nil(root_poa))
16 pman = root_poa->the_POAManager();
18 catch(CORBA::COMM_FAILURE&){
19 MESSAGE( "Container: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
22 SALOME_ContainerManager *cmServ=new SALOME_ContainerManager(orb);
25 }catch(CORBA::SystemException&){
26 MESSAGE("Caught CORBA::SystemException.");
27 }catch(PortableServer::POA::WrongPolicy&){
28 MESSAGE("Caught CORBA::WrongPolicyException.");
29 }catch(PortableServer::POA::ServantAlreadyActive&){
30 MESSAGE("Caught CORBA::ServantAlreadyActiveException");
31 }catch(CORBA::Exception&){
32 MESSAGE("Caught CORBA::Exception.");
33 }catch(std::exception& exc){
34 MESSAGE("Caught std::exception - "<<exc.what());
36 MESSAGE("Caught unknown exception.");