3 #include "ace/Get_Opt.h"
4 #include "ace/OS_NS_unistd.h"
8 bool expect_transient
= false;
11 parse_args (int argc
, ACE_TCHAR
*argv
[])
13 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("e"));
16 while ((c
= get_opts ()) != -1)
20 expect_transient
= true;
24 ACE_ERROR_RETURN ((LM_ERROR
,
30 // Indicates successful parsing of the command line
35 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
39 CORBA::ORB_var orb
= CORBA::ORB_init(argc
, argv
);
41 if (parse_args (argc
, argv
) != 0)
44 CORBA::Object_var obj
= orb
->resolve_initial_references("Test");
45 ACE_ASSERT (!CORBA::is_nil(obj
.in()));
46 Test_var test
= Test::_narrow( obj
.in());
47 ACE_ASSERT (!CORBA::is_nil(test
.in()));
49 CORBA::Short n
= test
->get_server_num ();
51 "Client received reply from server %d\n",
60 catch(const CORBA::TRANSIENT
& ex
) {
64 ex
._tao_print_exception ("client:");
66 catch(const CORBA::Exception
& ex
) {
67 ex
._tao_print_exception ("client:");