2 #include "ace/Get_Opt.h"
4 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
7 parse_args (int argc
, ACE_TCHAR
*argv
[])
9 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:n:"));
12 while ((c
= get_opts ()) != -1)
16 n
= ACE_OS::atoi (get_opts
.opt_arg ());
20 ior
= get_opts
.opt_arg ();
25 ACE_ERROR_RETURN ((LM_ERROR
,
32 // Indicates successful parsing of the command line
37 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
42 CORBA::ORB_init (argc
, argv
);
44 if (parse_args (argc
, argv
) != 0)
47 CORBA::Object_var tmp
=
48 orb
->string_to_object(ior
);
50 Test::Memory_Growth_var mem
=
51 Test::Memory_Growth::_narrow(tmp
.in ());
53 if (CORBA::is_nil (mem
.in ()))
55 ACE_ERROR_RETURN ((LM_DEBUG
,
56 "Nil Test::Hello reference <%s>\n",
61 // Make a few calls to the remote object
62 for (int iter
= 0; iter
!= n
; iter
++)
67 // Let us run the event loop. This way we will not exit
70 catch (const CORBA::Exception
& ex
)
72 ex
._tao_print_exception ("Exception caught:");