3 #include "tao/PortableServer/PortableServer.h"
5 #include "ace/Log_Msg.h"
6 #include "ace/OS_NS_stdio.h"
9 ACE_TMAIN(int, ACE_TCHAR
*[])
16 for (int i
= 0; i
!= niterations
; ++i
)
18 for (int j
= 0; j
!= norbs
; ++j
)
21 ACE_OS::sprintf (buf
, "ORB_%4.4d", j
);
26 CORBA::ORB_init (argc
, argv
, buf
);
28 CORBA::Object_var object
=
29 orb
->string_to_object ("DLL:Test_Object");
32 Test::_narrow (object
.in ());
34 if (CORBA::is_nil (test
.in ()))
36 ACE_ERROR_RETURN ((LM_ERROR
,
37 "Nil object reference.\n"),
42 test
->instance_count ();
44 if (count
!= norbs
*i
+ j
+ 1)
47 "Incorrect number of objects "
49 count
, norbs
* i
+ j
+ 1));
55 for (int j
= 0; j
!= norbs
; ++j
)
58 ACE_OS::sprintf (buf
, "ORB_%4.4d", j
);
63 CORBA::ORB_init (argc
, argv
, buf
);
65 CORBA::Object_var obj
=
66 orb
->resolve_initial_references ("RootPOA");
68 PortableServer::POA_var poa
=
69 PortableServer::POA::_narrow (obj
.in ());
71 poa
->destroy (true, true);
76 catch (const CORBA::Exception
& ex
)
78 ex
._tao_print_exception ("main()");