Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / ORB_init / Portspan / server.cpp
blobe5e58917cdd800315aa3f7c39b8d6eb3ac1aa056
1 #include "simpleI.h"
3 int
4 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
6 try
9 CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
11 CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
13 PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in());
15 PortableServer::POAManager_var man = poa->the_POAManager();
17 man->activate();
19 simple_i simp;
21 PortableServer::ObjectId_var objId = poa->activate_object(&simp);
23 orb->run();
26 catch (const CORBA::Exception& ex)
28 ex._tao_print_exception ("Exception in main():");
29 return 1;
32 return 0;