2 #include "ace/Get_Opt.h"
6 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
9 parse_args (int argc
, ACE_TCHAR
*argv
[])
11 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:n:"));
14 while ((c
= get_opts ()) != -1)
18 n
= ACE_OS::atoi (get_opts
.opt_arg ());
22 ior
= get_opts
.opt_arg ();
27 ACE_ERROR_RETURN ((LM_ERROR
,
34 // Indicates successful parsing of the command line
39 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
44 CORBA::ORB_init (argc
, argv
);
46 CORBA::Object_var poa_object
=
47 orb
->resolve_initial_references("RootPOA");
49 PortableServer::POA_var root_poa
=
50 PortableServer::POA::_narrow (poa_object
.in ());
52 if (parse_args (argc
, argv
) != 0)
56 ACE_NEW_RETURN (foo_i
,
60 PortableServer::ServantBase_var
owner_transfer(foo_i
);
65 CORBA::Object_var tmp
=
66 orb
->string_to_object(ior
);
68 Test::Memory_Growth_var mem
=
69 Test::Memory_Growth::_narrow(tmp
.in ());
71 if (CORBA::is_nil (mem
.in ()))
73 ACE_ERROR_RETURN ((LM_DEBUG
,
74 "Nil Test::Hello reference <%s>\n",
80 Test::PayLoad
pl (50000);
83 for (CORBA::ULong l
= 0;
90 // Make a few calls to the remote object
91 for (int iter
= 0; iter
!= n
; iter
++)
93 mem
->send_objref (pl
);
96 // Let us run the event loop. This way we will not exit
99 catch (const CORBA::Exception
& ex
)
101 ex
._tao_print_exception ("Exception caught:");