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:"));
12 while ((c
= get_opts ()) != -1)
16 ior
= get_opts
.opt_arg ();
21 ACE_ERROR_RETURN ((LM_ERROR
,
28 // Indicates successful parsing of the command line
34 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
42 CORBA::ORB_init (argc
,
45 if (parse_args (argc
, argv
) == -1)
48 // Connect to the server
49 CORBA::Object_var tmp
=
50 orb
->string_to_object(ior
);
52 Server_var server
= Server::_narrow (tmp
.in ());
54 // Create object instances
55 // This portion of the test was given by Petr Tuma and am just
56 // leaving it alone -- Bala
57 ServerSequence_var vServers
;
58 ServerSequence_var vAddition
;
61 CORBA::ULong iSize
, iOldSize
, iAddSize
;
64 ACE_NEW_RETURN (vServers
,
70 while (iSize
<= 50000)
72 iOldSize
= vServers
->length ();
73 iAddSize
= iSize
- iOldSize
;
75 server
->CreateExtra (iAddSize
,
79 vServers
->length (iSize
);
80 for (iCount
= 0 ; iCount
< iAddSize
; iCount
++)
82 vServers
[iOldSize
+ iCount
] =
83 Server::_duplicate (vAddition
[iCount
]);
88 if (iStep
* 5 > iSize
)
99 //------------- End of donated untouched section
101 ACE_DEBUG ((LM_DEBUG
,
102 "(%P|%t) Call delete on the server\n"));
104 server
->DeleteExtra (vServers
.in ());
106 ACE_DEBUG ((LM_DEBUG
,
107 "(%P|%t) Calling shutdown\n"));
111 catch (const CORBA::Exception
& ex
)
113 ex
._tao_print_exception ("");