2 #include "tao/PortableServer/PortableServer.h"
5 initialize_orb_and_poa(int & argc
, ACE_TCHAR
* argv
[])
8 CORBA::ORB_init (argc
, argv
);
10 CORBA::Object_var poa_object
=
11 orb
->resolve_initial_references("RootPOA");
13 PortableServer::POA_var root_poa
=
14 PortableServer::POA::_narrow (poa_object
.in ());
16 PortableServer::POAManager_var poa_manager
=
17 root_poa
->the_POAManager ();
19 poa_manager
->activate ();
24 void report_exception()
30 catch(CORBA::Exception
& ex
)
32 ex
._tao_print_exception ("CORBA Exception raised:");
34 catch(char const * msg
)
36 ACE_ERROR ((LM_ERROR
, "Exception (char const*) raised: %s\n",
41 ACE_ERROR ((LM_ERROR
, "Unknown exception raised\n"));