1 // Ensure that the PI library is linked in when building statically
4 #include "ace/Get_Opt.h"
5 #include "orbsvcs/FaultTolerance/FT_ClientService_Activate.h"
10 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
13 parse_args (int argc
, ACE_TCHAR
*argv
[])
15 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
18 while ((c
= get_opts ()) != -1)
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
[])
41 CORBA::Boolean result
= 0;
45 CORBA::ORB_init (argc
, argv
);
48 if (parse_args (argc
, argv
) != 0)
51 CORBA::Object_var tmp
=
52 orb
->string_to_object(ior
);
55 Test::Hello_var hello
=
56 Test::Hello::_narrow(tmp
.in () );
59 if (CORBA::is_nil (hello
.in ()))
61 ACE_ERROR_RETURN ((LM_DEBUG
,
62 "Test failed - Not regression - Unexpected Nil Test::Hello reference <%s>\n",
67 // Check this isn't generating transients for any other reason
72 hello
->throw_location_forward ();
75 ACE_DEBUG ((LM_ERROR
, "REGRESSION - Test has failed !!!\n"));
78 catch (const CORBA::TRANSIENT
& my_ex
)
80 ACE_UNUSED_ARG (my_ex
);
81 ACE_DEBUG ((LM_DEBUG
, "Client catches a TRANSIENT, as expected. No problem !\n"));
91 catch (const CORBA::Exception
& ex
)
93 ex
._tao_print_exception (
94 "Test failed (Not regression) because unexpected exception caught:");
101 ACE_DEBUG ((LM_ERROR
, "Error: REGRESSION identified!!!\n"));
105 ACE_DEBUG ((LM_DEBUG
, "Test passed !!!\n"));