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
[])
39 CORBA::ORB_init (argc
,
42 if (parse_args (argc
, argv
) == -1)
45 // Connect to the server
46 CORBA::Object_var tmp
=
47 orb
->string_to_object(ior
);
49 Server_var server
= Server::_narrow (tmp
.in ());
51 // Create object instances
52 // This portion of the test was given by Petr Tuma and am just
53 // leaving it alone -- Bala
54 ServerSequence_var vServers
;
55 ServerSequence_var vAddition
;
58 CORBA::ULong iSize
, iOldSize
, iAddSize
;
61 ACE_NEW_RETURN (vServers
,
67 while (iSize
<= 50000)
69 iOldSize
= vServers
->length ();
70 iAddSize
= iSize
- iOldSize
;
72 server
->CreateExtra (iAddSize
,
76 vServers
->length (iSize
);
77 for (iCount
= 0 ; iCount
< iAddSize
; iCount
++)
79 vServers
[iOldSize
+ iCount
] =
80 Server::_duplicate (vAddition
[iCount
]);
85 if (iStep
* 5 > iSize
)
96 //------------- End of donated untouched section
99 "(%P|%t) Call delete on the server\n"));
101 server
->DeleteExtra (vServers
.in ());
103 ACE_DEBUG ((LM_DEBUG
,
104 "(%P|%t) Calling shutdown\n"));
107 catch (const CORBA::Exception
& ex
)
109 ex
._tao_print_exception ("");