3 #include "tao/Object.h"
4 #include "tao/SystemException.h"
5 #include "tao/RTCORBA/RTCORBA.h"
6 #include "ace/Log_Msg.h"
7 #include "ace/Thread.h"
8 #include "ace/Get_Opt.h"
12 void shutdownORB(CORBA::ORB_ptr orb
, const char * orbid
)
16 "ORB <%C> is shutdown\n",
21 "ORB <%C> is destroyed\n",
25 static const ACE_TCHAR
*orbidAfile
= ACE_TEXT("file://iorA.ior");
26 static const ACE_TCHAR
*orbidBfile
= ACE_TEXT("file://iorB.ior");
29 parse_args (int argc
, ACE_TCHAR
*argv
[])
31 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("a:b:"));
34 while ((c
= get_opts ()) != -1)
38 orbidAfile
= get_opts
.optarg
;
41 orbidBfile
= get_opts
.optarg
;
45 ACE_ERROR_RETURN ((LM_ERROR
,
53 // Indicates successful parsing of the command line
58 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
62 if (parse_args (argc
, argv
) != 0)
67 const char *orbidA
= "orbidA";
68 CORBA::ORB_var orbA
= CORBA::ORB_init(argc
, argv
, orbidA
);
70 CORBA::Object_var objA
= orbA
->string_to_object(orbidAfile
);
71 Test::Hello_var
helloA(Test::Hello::_narrow(objA
.in ()));
72 CORBA::String_var resA
= helloA
->get_string();
74 CORBA::Object_var objB
= orbA
->string_to_object(orbidBfile
);
75 Test::Hello_var
helloB(Test::Hello::_narrow(objB
.in ()));
76 CORBA::String_var resB
= helloB
->get_string();
79 "got resA: <%C> and resB: <%C>",
80 resA
.in(), resB
.in ()));
84 shutdownORB(orbA
.in (), orbidA
);
86 catch (const CORBA::Exception
& ex
)
88 ex
._tao_print_exception ("Caught unexpected exception:");
90 ACE_ERROR ((LM_ERROR
, "Bug_2953_Regression test failed.\n"));
95 "Client test completed successfully.\n"));