1 #include "ace/Get_Opt.h"
5 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
10 parse_args (int argc
, ACE_TCHAR
*argv
[])
12 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("xk:i:"));
15 while ((c
= get_opts ()) != -1)
23 ior
= get_opts
.opt_arg ();
27 niterations
= ACE_OS::atoi (get_opts
.opt_arg ());
32 ACE_ERROR_RETURN ((LM_ERROR
,
40 // Indicates successful parsing of the command line
45 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
50 CORBA::ORB_init (argc
, argv
);
52 if (parse_args (argc
, argv
) != 0)
55 CORBA::Object_var object
=
56 orb
->string_to_object (ior
);
58 Simple_Server_var server
=
59 Simple_Server::_narrow (object
.in ());
61 if (CORBA::is_nil (server
.in ()))
63 ACE_ERROR_RETURN ((LM_ERROR
,
64 "Object reference <%s> is nil.\n",
69 for (int i
= 0; i
!= niterations
; ++i
)
72 server
->test_method (i
);
77 "(%P|%t) unexpected result = %d for %d",
87 catch (const CORBA::Exception
& ex
)
89 ex
._tao_print_exception ("Exception caught:");