2 #include "tao/ORB_Core.h"
3 #include "tao/Client_Strategy_Factory.h"
4 #include "ace/Get_Opt.h"
5 #include "ace/Log_Msg.h"
6 #include "ace/OS_NS_stdio.h"
10 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
14 int second_extra_argc
= 4;
16 int second_largc
= argc
;
20 ACE_TCHAR
**extra
= 0;
21 ACE_TCHAR
**second_extra
= 0;
22 ACE_NEW_RETURN (extra
, ACE_TCHAR
*[extra_argc
], -1);
23 ACE_NEW_RETURN (second_extra
, ACE_TCHAR
*[second_extra_argc
], -1);
24 extra
[0] = ACE::strnew (ACE_TEXT ("-ORBGestalt"));
25 extra
[1] = ACE::strnew (ACE_TEXT ("Local"));
26 extra
[2] = ACE::strnew (ACE_TEXT ("-ORBSvcConfDirective"));
27 extra
[3] = ACE::strnew (ACE_TEXT ("static Client_Strategy_Factory '-ORBReplyDispatcherTableSize 333'"));
29 second_extra
[0] = ACE::strnew (ACE_TEXT ("-ORBGestalt"));
30 second_extra
[1] = ACE::strnew (ACE_TEXT ("Local"));
31 second_extra
[2] = ACE::strnew (ACE_TEXT ("-ORBSvcConfDirective"));
32 second_extra
[3] = ACE::strnew (ACE_TEXT ("static Client_Strategy_Factory '-ORBReplyDispatcherTableSize 666'"));
34 //second_extra[2] = ACE::strnew (ACE_TEXT ("-ORBSvcConfDirective \"static Client_Strategy_Factory '-ORBReplyDispatcherTableSize 666'\""));
36 ACE_TCHAR
**largv
= new ACE_TCHAR
*[largc
+extra_argc
];
37 for (int i
= 0; i
< largc
; i
++)
40 ACE_TCHAR
**second_largv
= new ACE_TCHAR
*[second_largc
+second_extra_argc
];
41 for (int i
= 0; i
< second_largc
; i
++)
42 second_largv
[i
] = argv
[i
];
44 for (int i
= 0; i
< extra_argc
; i
++)
46 largv
[argc
+i
] = extra
[i
];
48 for (int i
= 0; i
< second_extra_argc
; i
++)
50 second_largv
[argc
+i
] = second_extra
[i
];
54 second_largc
+= second_extra_argc
;
56 CORBA::ORB_var orb
= CORBA::ORB_init (largc
, largv
, "FirstORB");
58 if (orb
->orb_core()->client_factory()->reply_dispatcher_table_size () != 333)
64 orb
= CORBA::ORB::_nil ();
66 CORBA::ORB_var second_orb
= CORBA::ORB_init (second_largc
, second_largv
, "SecondORB");
68 if (second_orb
->orb_core()->client_factory()->reply_dispatcher_table_size () != 666)
73 second_orb
->destroy ();
74 second_orb
= CORBA::ORB::_nil ();
76 for (int i
= 0; i
< extra_argc
; i
++)
77 ACE::strdelete (extra
[i
]);
78 for (int i2
= 0; i2
< second_extra_argc
; i2
++)
79 ACE::strdelete (second_extra
[i2
]);
82 delete [] second_extra
;
83 delete [] second_largv
;
85 catch (const CORBA::Exception
& ex
)
87 ex
._tao_print_exception ("Exception caught:");
92 ACE_TEXT ("Test passed!")));
95 ACE_TEXT ("Test failed. Result: %d\n"),