1 #include "ace/Get_Opt.h"
4 static int iterations
= 5;
5 static int shutdown_server
= 0;
7 static const ACE_TCHAR
*ior
= 0;
10 parse_args (int argc
, ACE_TCHAR
**argv
)
12 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:i:x"));
15 while ((c
= get_opts ()) != -1)
19 ior
= get_opts
.opt_arg ();
23 iterations
= ACE_OS::atoi (get_opts
.opt_arg ());
32 ACE_ERROR_RETURN ((LM_ERROR
,
43 ACE_ERROR_RETURN ((LM_ERROR
,
44 "Error: No IOR specified\n"),
51 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
56 CORBA::ORB_init (argc
, argv
);
59 parse_args (argc
, argv
);
63 CORBA::Object_var object
=
64 orb
->string_to_object (ior
);
67 test::_narrow (object
.in ());
69 if (CORBA::is_nil (test
.in ()))
71 ACE_ERROR_RETURN ((LM_DEBUG
,
72 "Nil reference <%s>\n",
77 for (int i
= 0; i
< iterations
; i
++)
89 catch (const CORBA::Exception
& ex
)
91 ex
._tao_print_exception ("Unexpected exception!");