1 #include "ace/Get_Opt.h"
4 static const ACE_TCHAR
*ior
= ACE_TEXT("file://ior");
5 static int shutdown_server
= 1;
8 parse_args (int argc
, ACE_TCHAR
**argv
)
10 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:x:"));
13 while ((c
= get_opts ()) != -1)
17 ior
= get_opts
.opt_arg ();
21 shutdown_server
= ACE_OS::atoi (get_opts
.opt_arg ());
26 ACE_ERROR_RETURN ((LM_ERROR
,
28 "\t-k <ior> [defaults to %s]\n"
29 "\t-x <shutdown server> [defaults to %d]\n"
41 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
46 CORBA::ORB_init (argc
, argv
);
48 int const result
= parse_args (argc
, argv
);
53 CORBA::Object_var object
=
54 orb
->string_to_object (ior
);
56 test_factory_var test_factory
=
57 test_factory::_narrow (object
.in ());
60 test_factory
->create_test ();
62 test
->normal_method ();
64 int unknown_exception_raised
= 0;
68 test
->unknown_exception_in_method ();
70 catch (const CORBA::UNKNOWN
&)
72 unknown_exception_raised
= 1;
75 "\nCORBA::UNKNOWN was thrown by the server during test::unknown_exception_in_method()\n"
76 "\tThis is expected behavior\n\n"));
79 if (unknown_exception_raised
!= 1)
81 ACE_ERROR_RETURN ((LM_ERROR
,
82 "Failure: unknown excep not raised\n"),
86 unknown_exception_raised
= 0;
88 test
->unknown_exception_during_deactivation ();
91 test_factory
->shutdown ();
97 ACE_ERROR_RETURN ((LM_ERROR
,
98 "Failure: Unexpected exception caught\n"),