summaryrefslogtreecommitdiff
path: root/TAO/tests/ORB_init/Portspan/server.cpp
blob: 284d0d79b4e7bd379c2cb4b2b5e0efeae023df6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// $Id$

#include "simpleI.h"

int
main( int argc, char *argv[] )
{
  try
    {

      CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "");

      CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");

      PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in());

      PortableServer::POAManager_var man = poa->the_POAManager();

      man->activate();

      simple_i simp;

      PortableServer::ObjectId_var objId = poa->activate_object(&simp);

      orb->run();
    }

  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("Exception in main():");
      return 1;
    }

  return 0;
}