1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
|
// $Id$
// @@ as with TAO, this has a strong coupling to the Internet ORB
// (IIOP) code. We should make it know less about that protocol
// component and have a loose table-driven coupling to ORB/protocol
// library components.
#include "tao/ORB.h"
#include "ace/Dynamic_Service.h"
#include "ace/Service_Repository.h"
#include "ace/Object_Manager.h"
#include "ace/SOCK_Dgram_Mcast.h"
#include "ace/Thread_Manager.h"
#include "tao/Object.h"
#include "tao/Typecode.h"
#include "tao/InconsistentTypeCodeC.h"
#include "tao/NVList.h"
#include "tao/Stub.h"
#include "tao/IIOP_Profile.h"
#include "tao/DynAny_i.h"
#include "tao/ORB_Core.h"
#include "tao/Server_Strategy_Factory.h"
#include "tao/CDR_Interpreter.h"
#include "tao/debug.h"
#include "tao/TAO_Internal.h"
#include "tao/CDR.h"
#include "tao/Marshal.h"
#include "tao/IOR_LookupTable.h"
#if !defined (__ACE_INLINE__)
# include "tao/ORB.i"
#endif /* ! __ACE_INLINE__ */
#include "tao/Timeprobe.h"
ACE_RCSID(tao, ORB, "$Id$")
#if defined (ACE_ENABLE_TIMEPROBES)
static const char *TAO_ORB_Timeprobe_Description[] =
{
"CORBA_ORB::run - start",
"CORBA_ORB::run - end",
};
enum
{
// Timeprobe description table start key
TAO_CORBA_ORB_RUN_START = 0,
TAO_CORBA_ORB_RUN_END
};
// Setup Timeprobes
ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_ORB_Timeprobe_Description,
TAO_CORBA_ORB_RUN_START);
#endif /* ACE_ENABLE_TIMEPROBES */
#if !defined (TAO_HAS_MINIMUM_CORBA)
// Typecode stuff for the InconsistentTypeCode exception
static const CORBA::Long _oc_CORBA_ORB_InconsistentTypeCode[] =
{
TAO_ENCAP_BYTE_ORDER, // byte order
47,
ACE_NTOHL (0x49444c3a),
ACE_NTOHL (0x6f6d672e),
ACE_NTOHL (0x6f72672f),
ACE_NTOHL (0x434f5242),
ACE_NTOHL (0x412f4f52),
ACE_NTOHL (0x422f496e),
ACE_NTOHL (0x636f6e73),
ACE_NTOHL (0x69737465),
ACE_NTOHL (0x6e745479),
ACE_NTOHL (0x7065436f),
ACE_NTOHL (0x64653a31),
ACE_NTOHL (0x2e3000fd), // repository ID =
// IDL:omg.org/CORBA/ORB/InconsistentTypeCode:1.0
21,
ACE_NTOHL (0x496e636f),
ACE_NTOHL (0x6e736973),
ACE_NTOHL (0x74656e74),
ACE_NTOHL (0x54797065),
ACE_NTOHL (0x436f6465),
ACE_NTOHL (0xfdfdfd), // name = InconsistentTypeCode
0, // member count
};
static CORBA::TypeCode _tc_TAO_tc_CORBA_ORB_InconsistentTypeCode (
CORBA::tk_except,
sizeof (_oc_CORBA_ORB_InconsistentTypeCode),
(char *) &_oc_CORBA_ORB_InconsistentTypeCode,
0,
sizeof (CORBA_ORB_InconsistentTypeCode));
// ORB exception typecode initialization.
CORBA::TypeCode_ptr CORBA_ORB::_tc_InconsistentTypeCode =
&_tc_TAO_tc_CORBA_ORB_InconsistentTypeCode;
#endif /* TAO_HAS_MINIMUM_CORBA */
// = Static initialization.
// Count of the number of ORBs.
int CORBA_ORB::orb_init_count_ = 0;
// Pointer to the "default ORB."
CORBA::ORB_ptr CORBA::instance_ = 0;
CORBA_String_var::CORBA_String_var (char *p)
: ptr_ (p)
{
// NOTE: According to the CORBA spec this string must *not* be
// copied, but it is non-compliant to use it/release it in the
// calling code. argument is consumed. p should never be NULL
}
CORBA_String_var::CORBA_String_var (const CORBA_String_var& r)
{
this->ptr_ = CORBA::string_dup (r.ptr_);
}
CORBA_String_var::~CORBA_String_var (void)
{
if (this->ptr_ != 0)
{
CORBA::string_free (this->ptr_);
this->ptr_ = 0;
}
}
CORBA_ORB::InvalidName::InvalidName (void)
{
}
void
CORBA_ORB::InvalidName::_raise (void)
{
TAO_RAISE(*this);
}
CORBA_ORB::InvalidName*
CORBA_ORB::InvalidName::_narrow (CORBA_Exception *ex)
{
if (ex->_is_a ("IDL:omg.orb/CORBA/ORB/InvalidName:1.0"))
return ACE_dynamic_cast (CORBA_ORB::InvalidName*, ex);
return 0;
}
int
CORBA_ORB::InvalidName::_is_a (const char* interface_id) const
{
return ((ACE_OS::strcmp (interface_id,
"IDL:omg.orb/CORBA/ORB/InvalidName:1.0") ==
0)
|| CORBA_UserException::_is_a (interface_id));
}
CORBA_ORB::CORBA_ORB (void)
: refcount_ (1),
open_called_ (0),
shutdown_lock_ (0),
should_shutdown_ (0),
name_service_ (CORBA_Object::_nil ()),
schedule_service_ (CORBA_Object::_nil ()),
event_service_ (CORBA_Object::_nil ()),
trading_service_ (CORBA_Object::_nil ())
{
leader_follower_info_.leaders_ = 0;
leader_follower_info_.leader_thread_ID_ =
ACE_OS::NULL_thread;
ACE_NEW (this->cond_become_leader_,
ACE_SYNCH_CONDITION (leader_follower_info_.leader_follower_lock_));
}
CORBA_ORB::~CORBA_ORB (void)
{
TAO_ORB_Core_instance ()->fini ();
ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, tao_mon, *ACE_Static_Object_Lock::instance ()));
CORBA_ORB::orb_init_count_--;
if (CORBA_ORB::orb_init_count_ == 0)
{
// free up all the ORB owned Exceptions
TAO_Exceptions::fini ();
// free up all the ORB owned TypeCodes
TAO_TypeCodes::fini ();
// @@ Note that we shouldn't need to actually delete this
// instance since it'll be handled by the destruction of the
// instance via another mechanism.
CORBA::instance_ = 0;
}
delete this->shutdown_lock_;
this->shutdown_lock_ = 0;
if (!CORBA::is_nil (this->name_service_))
CORBA::release (this->name_service_);
if (!CORBA::is_nil (this->schedule_service_))
CORBA::release (this->schedule_service_);
if (!CORBA::is_nil (this->event_service_))
CORBA::release (this->event_service_);
if (!CORBA::is_nil (this->trading_service_))
CORBA::release (this->trading_service_);
delete this->cond_become_leader_;
}
// Set up listening endpoints.
int
CORBA_ORB::open (void)
{
// Double check pattern
if (this->open_called_ == 1)
return 1;
ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, tao_mon, this->open_lock_, -1);
if (this->open_called_ == 1)
return 1;
this->open_called_ = 1;
TAO_ORB_Core *ocp = TAO_ORB_Core_instance ();
TAO_Server_Strategy_Factory *f = ocp->server_factory ();
// @@ For now we simple assume an IIOP handler, in the future
// @@ this has to be more general
TAO_IIOP_BASE_ACCEPTOR *iiop_acceptor =
ACE_dynamic_cast(TAO_IIOP_BASE_ACCEPTOR *,
ocp->acceptor ()->acceptor ());
// Initialize the endpoint ... or try!
if (iiop_acceptor->open (ocp->orb_params ()->addr (),
ocp->reactor(),
f->creation_strategy (),
f->accept_strategy (),
f->concurrency_strategy (),
f->scheduling_strategy ()) == -1)
// Need to return an error somehow!! Maybe set do_exit?
return -1;
// The following step is necessary since the user may have specified
// a 0 for a port number. Once we open the acceptor, we can recheck
// the address and get the accurate port number.
ACE_INET_Addr new_address;
if (iiop_acceptor->acceptor ().get_local_addr (new_address) == -1)
return -1;
// Reset the address
ocp->orb_params ()->addr (new_address);
iiop_acceptor->acceptor ().enable (ACE_CLOEXEC);
ocp->add_to_collocation_table ();
return 0;
}
void
CORBA_ORB::shutdown (CORBA::Boolean wait_for_completion)
{
// Set the shutdown flag
this->should_shutdown (1);
// Grab the thread manager
ACE_Thread_Manager *tm = TAO_ORB_Core_instance ()->thr_mgr ();
// Try to cancel all the threads in the ORB.
tm->cancel_all ();
// Wake up all waiting threads in the reactor.
TAO_ORB_Core_instance ()->reactor ()->wakeup_all_threads ();
// If <wait_for_completion> is set, wait for all threads to exit.
if (wait_for_completion != 0)
tm->wait ();
return;
}
#if !defined (TAO_HAS_MINIMUM_CORBA)
void
CORBA_ORB::create_list (CORBA::Long count,
CORBA::NVList_ptr &retval)
{
assert (CORBA::ULong (count) <= UINT_MAX);
// create an empty list
retval = new CORBA::NVList;
// if count is greater than 0, create a list of NamedValues
if (count != 0)
{
retval->max_ = (CORBA::ULong) count;
for (CORBA::Long i=0; i < count; i++)
{
CORBA::NamedValue_ptr nv = new CORBA::NamedValue;
retval->values_.enqueue_tail (nv);
}
}
}
int
CORBA_ORB::perform_work (const ACE_Time_Value &tv)
{
ACE_Reactor *r = TAO_ORB_Core_instance ()->reactor ();
// Set the owning thread of the Reactor to the one which we're
// currently in. This is necessary b/c it's possible that the
// application is calling us from a thread other than that in which
// the Reactor's CTOR (which sets the owner) was called.
r->owner (ACE_Thread::self ());
ACE_Time_Value tmp_tv (tv);
return r->handle_events (tmp_tv);
}
CORBA::Boolean
CORBA_ORB::work_pending (void)
{
// There's ALWAYS work to do ;-)
return 1;
}
#endif /* TAO_HAS_MINIMUM_CORBA */
int
CORBA_ORB::run (ACE_Time_Value *tv,
int break_on_timeouts)
{
ACE_FUNCTION_TIMEPROBE (TAO_CORBA_ORB_RUN_START);
{
ACE_Guard<ACE_SYNCH_MUTEX> g (TAO_ORB_Core_instance ()->leader_follower_lock ());
while (TAO_ORB_Core_instance ()->leader_available ())
{
// @@ Why do this on every iteration, shouldn't this be done
// just once?
if (TAO_ORB_Core_instance ()->add_follower (this->cond_become_leader_) == -1)
ACE_ERROR ((LM_ERROR,
"(%P|%t) ORB::run: Failed to add a follower thread\n"));
this->cond_become_leader_->wait ();
}
TAO_ORB_Core_instance ()->set_leader_thread ();
}
ACE_Reactor *r = TAO_ORB_Core_instance ()->reactor ();
// Set the owning thread of the Reactor to the one which we're
// currently in. This is necessary b/c it's possible that the
// application is calling us from a thread other than that in which
// the Reactor's CTOR (which sets the owner) was called.
r->owner (ACE_Thread::self ());
// This method should only be called by servers, so now we set up
// for listening!
if (this->open () == -1)
return -1;
#if 0
const int max_iterations = 100;
int counter = 0;
#endif /* 0 */
int result = 1;
// 1 to detect that nothing went wrong
// Loop "forever" handling client requests.
while (this->should_shutdown () == 0)
{
#if 0
^ counter++;
if (counter == max_iterations)
{
ACE_TIMEPROBE_PRINT;
ACE_TIMEPROBE_RESET;
counter = 0;
}
ACE_FUNCTION_TIMEPROBE (TAO_CORBA_ORB_RUN_START);
#endif /* 0 */
switch (r->handle_events (tv))
{
case 0: // Timed out, so we return to caller.
if (break_on_timeouts)
result = 0;
break;
/* NOTREACHED */
case -1: // Something else has gone wrong, so return to caller.
result = -1;
break;
/* NOTREACHED */
default:
// Some handlers were dispatched, so keep on processing
// requests until we're told to shutdown .
break;
/* NOTREACHED */
}
if (result == 0 || result == -1)
break;
}
if (result != -1)
{
if (TAO_ORB_Core_instance ()->unset_leader_wake_up_follower () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) ORB::run: Failed to add a follower thread\n"),
-1);
return 0;
// nothing went wrong
}
else
return result;
}
int
CORBA_ORB::run (ACE_Time_Value &tv)
{
return this->run (&tv, 1);
}
int
CORBA_ORB::run (ACE_Time_Value *tv)
{
return this->run (tv, 1);
}
int
CORBA_ORB::run (void)
{
return this->run (0, 0);
}
CORBA_Object_ptr
CORBA_ORB::resolve_root_poa (const char *adapter_name,
TAO_POA_Manager *poa_manager,
const TAO_POA_Policies *policies)
{
CORBA::Environment env;
return TAO_ORB_Core_instance ()->root_poa_reference (env,
adapter_name,
poa_manager,
policies);
}
CORBA_Object_ptr
CORBA_ORB::resolve_poa_current (void)
{
// Return the pointer to this thread's POACurrent.
CORBA::Environment env;
TAO_POA_Current *poa_current = TAO_ORB_Core_instance ()->poa_current ();
if (poa_current == 0)
return CORBA_Object::_nil ();
PortableServer::Current_var result = poa_current->_this (env);
if (env.exception () != 0)
return CORBA_Object::_nil ();
else
return result._retn ();
}
CORBA_Object_ptr
CORBA_ORB::resolve_commandline_ref (const char *& init_ref)
{
// @@ Where are the exceptions caught ??
CORBA::Environment env;
// Initialize our return ptr.
CORBA_Object_ptr return_value = CORBA_Object::_nil ();
// Get the commandline initial reference.
init_ref = TAO_ORB_Core_instance ()->orb_params ()->init_ref ();
// Parse the IOR from the given commandline mapping <ObjectId>=<IOR>.
char *ior = CORBA::string_dup (init_ref + ACE_OS::strcspn (init_ref,"=") + 1 );
// Convert the given IOR to object. Note the IOR could be of the form
// IOR: ... / iiop: ... / iioploc: ... / iiopname: ...
return_value = this->string_to_object (ior, env);
// check for errors
if (env.exception () != 0)
return_value = CORBA_Object::_nil ();
CORBA::string_free (ior);
return CORBA_Object::_duplicate (return_value);
}
CORBA_Object_ptr
CORBA_ORB::resolve_name_service (ACE_Time_Value *timeout)
{
CORBA::Environment env;
CORBA_Object_ptr return_value = CORBA_Object::_nil ();
// First check to see if we've already initialized this.
if (this->name_service_ != CORBA_Object::_nil ())
{
// @@ Someone please double-check this ;-)
return_value = this->name_service_;
}
else
{
ACE_CString name_service_ior =
TAO_ORB_Core_instance ()->orb_params ()->name_service_ior ();
// Second, check to see if the user has give us a parameter on
// the command-line.
if (name_service_ior.length () == 0)
// Third, check to see if the user has an environment variable.
name_service_ior = ACE_OS::getenv ("NameServiceIOR");
if (name_service_ior.length () != 0)
{
this->name_service_ =
this->string_to_object (name_service_ior.c_str (), env);
// check for errors
if (env.exception () != 0)
this->name_service_ = CORBA_Object::_nil ();
}
else
{
// First, determine if the port was supplied on the command line
u_short port =
TAO_ORB_Core_instance ()->orb_params ()->name_service_port ();
if (port == 0)
{
// Look for the port among our environment variables.
const char *port_number =
ACE_OS::getenv ("NameServicePort");
if (port_number != 0)
port = ACE_OS::atoi (port_number);
else
port = TAO_DEFAULT_NAME_SERVER_REQUEST_PORT;
}
this->name_service_ =
this->multicast_to_service("NameService",
port,
timeout);
}
}
// Return ior.
return_value = this->name_service_;
return CORBA_Object::_duplicate (return_value);
}
CORBA_Object_ptr
CORBA_ORB::resolve_trading_service (ACE_Time_Value *timeout)
{
CORBA::Environment env;
CORBA_Object_ptr return_value = CORBA_Object::_nil ();
// First check to see if we've already initialized this.
if (this->trading_service_ != CORBA_Object::_nil ())
{
// @@ Someone please double-check this ;-)
return_value = this->trading_service_;
}
else
{
ACE_CString trading_service_ior =
TAO_ORB_Core_instance ()->orb_params ()->trading_service_ior ();
// Second, check to see if the user has give us a parameter on
// the command-line.
if (trading_service_ior.length () == 0)
// Third, check to see if the user has an environment variable.
trading_service_ior = ACE_OS::getenv ("TradingServiceIOR");
if (trading_service_ior.length () != 0)
{
this->trading_service_ =
this->string_to_object (trading_service_ior.c_str (), env);
// check for errors
if (env.exception () != 0)
this->trading_service_ = CORBA_Object::_nil ();
}
else
{
// First, determine if the port was supplied on the command line
// @@ FRED: need a generic rep for this!
u_short port =
TAO_ORB_Core_instance ()->orb_params ()->trading_service_port ();
if (port == 0)
{
// Look for the port among our environment variables.
const char *port_number = ACE_OS::getenv ("TradingServicePort");
if (port_number != 0)
port = ACE_OS::atoi (port_number);
else
port = TAO_DEFAULT_TRADING_SERVER_REQUEST_PORT;
}
this->trading_service_ =
this->multicast_to_service ("TradingService",
port,
timeout);
}
}
return_value = this->trading_service_;
return CORBA_Object::_duplicate (return_value);
}
int
CORBA_ORB::multicast_query (char *buf,
const char *service_name,
u_short port,
ACE_Time_Value *timeout)
{
ACE_INET_Addr my_addr;
ACE_SOCK_Acceptor acceptor;
ACE_SOCK_Stream stream;
// Bind listener to any port and then find out what the port was.
if (acceptor.open (ACE_Addr::sap_any) == -1
|| acceptor.get_local_addr (my_addr) == -1)
ACE_ERROR_RETURN ((LM_DEBUG,
"acceptor.open () || "
"acceptor.get_local_addr () failed"),
-1);
// Send a Multicast with service name and a port no.
ACE_SOCK_Dgram dgram;
// This starts out initialized to all zeros!
ACE_INET_Addr multicast_addr (port,
ACE_DEFAULT_MULTICAST_ADDR);
// Open the datagram.
if (dgram.open (ACE_Addr::sap_any) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"Unable to open the Datagram!\n"),
-1);
// Convert the port that we are listening at to Network Byte Order.
ACE_UINT16 response_port =
ACE_HTONS (my_addr.get_port_number ());
// Length of data to be sent. This is sent as a header.
CORBA::Short data_len =
sizeof (ACE_UINT16) + ACE_OS::strlen (service_name);
// Vector to be sent.
const int iovcnt = 3;
iovec iovp[iovcnt];
// The length of data to be sent.
iovp[0].iov_base = (char *) &data_len;
iovp[0].iov_len = sizeof (CORBA::Short);
// The port at which we are listening.
iovp[1].iov_base = (char *) &response_port;
iovp[1].iov_len = sizeof (ACE_UINT16);
// The service name string.
iovp[2].iov_base = (char *) service_name;
iovp[2].iov_len = ACE_OS::strlen (service_name);
// Send the multicast.
ssize_t n_bytes = dgram.send (iovp,
iovcnt,
multicast_addr);
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"\nsent multicast request."));
// We don't need the Dgram anymore.
dgram.close ();
// Check for errors.
if (n_bytes == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"Error sending IIOP Multicast!\n"),
-1);
else if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"\n%s; Sent multicast."
"# of bytes sent is %d.\n",
__FILE__,
n_bytes));
// Wait for response until TAO_DEFAULT_SERVICE_RESOLUTION_TIMEOUT.
ACE_Time_Value tv (timeout == 0
? ACE_Time_Value (TAO_DEFAULT_SERVICE_RESOLUTION_TIMEOUT)
: *timeout);
// Start listening.
if (acceptor.accept (stream, 0, &tv) == -1)
if (TAO_debug_level > 0)
ACE_ERROR_RETURN ((LM_DEBUG,
"multicast_query : Unable to accept\n"),
0);
// Receive the IOR.
n_bytes = stream.recv (buf,
BUFSIZ,
0,
timeout);
// Close socket now.
stream.close ();
// Check for errors.
if (n_bytes == -1)
{
if (TAO_debug_level > 0)
ACE_ERROR_RETURN ((LM_ERROR,
"Error reading IIOP multicast response!\n"),
-1);
return -1;
}
// Null terminate message.
buf[n_bytes] = 0;
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"%s; Service resolved to ior: '%s'\n",
__FILE__,
buf));
return 0;
}
// @@ This will have to be sanitized of transport specific calls
// in order to support pluggable protocols! But, it does use
// UDP and multicast. Not all transport protocols may support
// this, connectionless and multicast. fredk
// @@ FRED: Should define a flag, something like Protocol_Has_Multicast
// If there is no multicast, then this functionality is not available
// and we return NULL.
CORBA_Object_ptr
CORBA_ORB::multicast_to_service (const char * service_name,
u_short port,
ACE_Time_Value *timeout)
{
char buf[BUFSIZ + 1];
// Use UDP multicast to locate the service.
CORBA_Object_ptr return_value =
CORBA_Object::_nil ();
if (this->multicast_query (buf,
service_name,
port,
timeout) == 0)
{
CORBA::Environment env;
// Convert IOR to an object reference.
CORBA_Object_ptr objectified_ior =
this->string_to_object ((CORBA::String) buf, env);
// Check for errors.
if (env.exception () == 0)
return_value = objectified_ior;
}
// Return ior.
return return_value;
}
CORBA_Object_ptr
CORBA_ORB::resolve_initial_references (CORBA::String name,
CORBA_Environment &TAO_IN_ENV)
{
return this->resolve_initial_references (name,
0,
TAO_IN_ENV);
}
CORBA_Object_ptr
CORBA_ORB::resolve_initial_references (CORBA::String name,
ACE_Time_Value *timeout,
CORBA_Environment &TAO_IN_ENV)
{
// Get the table of initial references specified through -ORBInitRef.
TAO_IOR_LookupTable *table =
TAO_ORB_Core_instance ()->orb_params ()->ior_lookup_table ();
// Get the list of initial reference prefixes specified through
// -ORBDefaultInitRef.
char * default_init_ref =
TAO_ORB_Core_instance ()->orb_params ()->default_init_ref ();
ACE_CString ior;
ACE_CString object_id ((const char *) name);
// Resolved Object reference.
CORBA_Object_ptr return_value = CORBA_Object::_nil ();
if (table->find_ior (object_id, ior) == 0)
{
// Name found in the IOR Table.
return_value = this->string_to_object (ior.c_str (), TAO_IN_ENV);
return CORBA_Object::_duplicate (return_value);
}
else
{
// Check if a DefaultInitRef was specified.
if (ACE_OS::strlen (default_init_ref) != 0)
{
ACE_CString list_of_profiles;
// Used by the strtok_r.
char *lasts[BUFSIZ];
// Append the given object ID to all the end-points of
// Default Init Ref.
for (char *str = ACE_OS::strtok_r (default_init_ref,
",",
lasts);
str != 0 ;
str = ACE_OS::strtok_r (0,
",",
lasts))
{
list_of_profiles += ACE_CString (str);
list_of_profiles += ACE_CString ("/");
list_of_profiles += object_id;
list_of_profiles += ACE_CString (",");
}
// Replace the last extra comma with a null.
list_of_profiles[list_of_profiles.length () - 1] = '\0';
return_value = this->string_to_object (list_of_profiles.rep (),
TAO_IN_ENV);
return CORBA_Object::_duplicate (return_value);
}
}
if (ACE_OS::strcmp (name,
TAO_OBJID_NAMESERVICE) == 0)
return this->resolve_name_service (timeout);
else if (ACE_OS::strcmp (name,
TAO_OBJID_TRADINGSERVICE) == 0)
return this->resolve_trading_service (timeout);
else if (ACE_OS::strcmp (name,
TAO_OBJID_ROOTPOA) == 0)
return this->resolve_root_poa ();
else if (ACE_OS::strcmp (name,
TAO_OBJID_POACURRENT) == 0)
return this->resolve_poa_current ();
else
TAO_THROW_RETURN (CORBA_ORB::InvalidName (),
CORBA_Object::_nil ());
}
TAO_Stub *
CORBA_ORB::create_stub_object (const TAO_ObjectKey &key,
const char *type_id,
CORBA::Environment &env)
{
if (this->open () == -1)
{
env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_NO));
return 0;
}
CORBA::String id;
if (type_id)
id = CORBA::string_copy (type_id);
else
id = 0;
TAO_ORB_Core *orb_core = TAO_ORB_Core_instance ();
// First we create a profile list, well actually a list of one!
// @@ should go to the acceptor for this, the orb delegates to the acceptor
// to create Profiles!
// We do not use ACE_NEW cause we want to return an exception if this
// fails.
// @@ Fred, please use ACE_NEW_THROW_RETURN instead!
TAO_IIOP_Profile *pfile =
new TAO_IIOP_Profile (orb_core->orb_params ()->host (),
orb_core->orb_params ()->addr ().get_port_number (),
key,
TAO_ORB_Core_instance ()->orb_params ()->addr ());
TAO_Stub *data = 0;
// @@ replace IIOP::Profile with something more appropriate!!
data = new TAO_Stub (id, pfile);
if (pfile == 0)
{
env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
return 0;
}
else
{
// We do not use ACE_NEW_RETURN or ACE_NEW since we need to
// deallocate pfile.
// @@ Fred, but you don't do this...
// Plus we want to return an exception. @@ If that's the only
// reason, then you can use ACE_NEW_THROW_RETURN.
data = new TAO_Stub (id, pfile);
// pfile is given to TAO_Stub!
if (data == 0)
env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
}
return data;
}
// Create an objref
CORBA::Object_ptr
CORBA_ORB::key_to_object (const TAO_ObjectKey &key,
const char *type_id,
CORBA::Environment &env)
{
TAO_Stub *data = this->create_stub_object (key, type_id, env);
if (env.exception () != 0)
return CORBA::Object::_nil ();
// Create the CORBA level proxy
CORBA_Object *new_obj = new CORBA_Object (data);
// Clean up in case of errors.
if (CORBA::is_nil (new_obj))
{
data->_decr_refcnt ();
env.exception (new CORBA::INTERNAL (CORBA::COMPLETED_NO));
return CORBA::Object::_nil ();
}
return new_obj;
}
// Get access to the leader_follower_info.
TAO_Leader_Follower_Info &
CORBA_ORB::leader_follower_info (void)
{
return leader_follower_info_;
}
#if !defined (TAO_HAS_MINIMUM_CORBA)
// Dynamic Any factory functions.
ACE_INLINE
CORBA_DynAny_ptr
CORBA_ORB::create_dyn_any (const CORBA_Any& any,
CORBA::Environment& env)
{
return TAO_DynAny_i::create_dyn_any (any, env);
}
ACE_INLINE
CORBA_DynAny_ptr
CORBA_ORB::create_basic_dyn_any (CORBA_TypeCode_ptr tc,
CORBA::Environment& env)
{
return TAO_DynAny_i::create_dyn_any (tc, env);
}
ACE_INLINE
CORBA_DynStruct_ptr
CORBA_ORB::create_dyn_struct (CORBA_TypeCode_ptr tc,
CORBA::Environment& env)
{
return TAO_DynAny_i::create_dyn_struct (tc, env);
}
ACE_INLINE
CORBA_DynSequence_ptr
CORBA_ORB::create_dyn_sequence (CORBA_TypeCode_ptr tc,
CORBA::Environment& env)
{
return TAO_DynAny_i::create_dyn_sequence (tc, env);
}
ACE_INLINE
CORBA_DynArray_ptr
CORBA_ORB::create_dyn_array (CORBA_TypeCode_ptr tc,
CORBA::Environment& env)
{
return TAO_DynAny_i::create_dyn_array (tc, env);
}
ACE_INLINE
CORBA_DynUnion_ptr
CORBA_ORB::create_dyn_union (CORBA_TypeCode_ptr tc,
CORBA::Environment& env)
{
return TAO_DynAny_i::create_dyn_union (tc, env);
}
ACE_INLINE
CORBA_DynEnum_ptr
CORBA_ORB::create_dyn_enum (CORBA_TypeCode_ptr tc,
CORBA::Environment& env)
{
return TAO_DynAny_i::create_dyn_enum (tc, env);
}
#endif /* TAO_HAS_MINIMUM_CORBA */
// String utility support; this needs to be integrated with the ORB's
// own memory allocation subsystem.
CORBA::String
CORBA::string_copy (const CORBA::Char *str)
{
if (!str)
return 0;
size_t len = ACE_OS::strlen (str);
// This allocates an extra byte for the '\0';
CORBA::String copy = CORBA::string_alloc (len);
ACE_OS::memcpy (copy, str, len + 1);
return copy;
}
CORBA_String_var &
CORBA_String_var::operator= (char *p)
{
if (this->ptr_ != p)
{
if (this->ptr_ != 0)
CORBA::string_free (this->ptr_);
this->ptr_ = p;
}
return *this;
}
CORBA_String_var &
CORBA_String_var::operator= (const char *p)
{
if (this->ptr_ != 0)
CORBA::string_free (this->ptr_);
this->ptr_ = CORBA::string_dup (p);
return *this;
}
CORBA_String_var &
CORBA_String_var::operator= (const CORBA_String_var& r)
{
if (this != &r)
{
if (this->ptr_ != 0)
CORBA::string_free (this->ptr_);
this->ptr_ = CORBA::string_dup (r.ptr_);
}
return *this;
}
// Wide Character string utility support; this can need to be
// integrated with the ORB's own memory allocation subsystem.
CORBA::WString
CORBA::wstring_alloc (CORBA::ULong len)
{
return new CORBA::WChar [(size_t) (len + 1)];
}
CORBA::WString
CORBA::wstring_copy (const CORBA::WChar *const str)
{
if (!str)
return 0;
CORBA::WString retval = CORBA::wstring_alloc (ACE_OS::wslen (str));
return ACE_OS::wscpy (retval, str);
}
void
CORBA::wstring_free (CORBA::WChar *const str)
{
delete [] str;
}
void
CORBA_ORB::init_orb_globals (CORBA::Environment &env)
{
ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, tao_mon, *ACE_Static_Object_Lock::instance ()));
// Put these initializations here so that exceptions are enabled
// immediately.
if (CORBA_ORB::orb_init_count_ == 0)
{
// initialize the system TypeCodes
TAO_TypeCodes::init ();
// initialize the factory for marshaling
TAO_Marshal::init ();
// initialize the interpreter
TAO_CDR_Interpreter::init ();
// initialize the system exceptions
TAO_Exceptions::init (env);
}
CORBA_ORB::orb_init_count_++;
}
// ORB initialisation, per OMG document 94-9-46.
//
// XXX in addition to the "built in" Internet ORB, there will be ORBs
// @@ ^^^^^^^^ XXX
// which are added separately, e.g. through a DLL listed in the
// registry. Registry will be used to assign orb names and to
// establish which is the default.
CORBA::ORB_ptr
CORBA::ORB_init (int &argc,
char *const *argv,
const char * orb_name)
{
return CORBA::ORB_init (argc, argv, orb_name,
CORBA::default_environment ());
}
CORBA::ORB_ptr
CORBA::ORB_init (int &argc,
char *const *argv,
const char * /* orb_name */,
CORBA::Environment &env)
{
// Using ACE_Static_Object_Lock::instance() precludes <ORB_init>
// from being called within a static object CTOR.
ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard,
*ACE_Static_Object_Lock::instance (), 0));
env.clear ();
// Make sure initialization of TAO globals only occurs once.
CORBA_ORB::init_orb_globals (env);
if (env.exception () != 0)
return 0;
// Verify some of the basic implementation requirements. This test
// gets optimized away by a decent compiler (or else the rest of the
// routine does).
//
// NOTE: we still "just" assume that native floating point is IEEE.
if (sizeof (CORBA::Short) != 2
|| sizeof (CORBA::Long) != 4
|| sizeof (CORBA::LongLong) != 8
|| sizeof (CORBA::Float) != 4
|| sizeof (CORBA::Double) != 8
|| sizeof (CORBA::LongDouble) != 16
|| sizeof (CORBA::WChar) < 2
|| sizeof (void *) != ACE_SIZEOF_VOID_P)
{
ACE_DEBUG ((LM_DEBUG,
"%s; ERROR: unexpected basic type size; "
"s:%d l:%d ll:%d f:%d d:%d ld:%d wc:%d v:%d\n"
"please reconfigure TAO\n",
__FILE__,
sizeof (CORBA::Short),
sizeof (CORBA::Long),
sizeof (CORBA::LongLong),
sizeof (CORBA::Float),
sizeof (CORBA::Double),
sizeof (CORBA::LongDouble),
sizeof (CORBA::WChar),
sizeof (void *)));
env.exception (new CORBA::INITIALIZE (CORBA::COMPLETED_NO));
return 0;
}
// Get ORB Core
TAO_ORB_Core *oc = TAO_ORB_Core_instance ();
// Initialize the ORB Core instance.
int result = oc->init (argc, (char **) argv);
// Check for errors and return 0 if error.
if (result == -1)
{
env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
}
// @@ We may only want to set this if ORB_init() has 0 argc/argv
// parameters.
if (CORBA::instance_ == 0)
CORBA::instance_ = oc->orb ();
return oc->orb ();
}
CORBA::ORB_ptr
CORBA::instance (void)
{
ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard,
*ACE_Static_Object_Lock::instance (), 0));
if (CORBA::instance_ == 0)
{
int argc = 0;
char *const *argv = 0;
// Note that CORBA::ORB_init() will also acquire the static
// lock, but that's ok since it's a recursive lock.
CORBA::instance_ = CORBA::ORB_init (argc, argv);
}
return CORBA::instance_;
}
void
CORBA::instance (CORBA::ORB_ptr orb)
{
ACE_MT (ACE_GUARD (ACE_SYNCH_RECURSIVE_MUTEX, guard,
*ACE_Static_Object_Lock::instance ()));
CORBA::instance_ = orb;
}
// *************************************************************
// Inline operators for TAO_opaque encoding and decoding
// *************************************************************
CORBA::Boolean
operator<< (TAO_OutputCDR& cdr, const TAO_opaque& x)
{
CORBA::ULong length = x.length ();
cdr.write_ulong (length);
#if !defined (TAO_NO_COPY_OCTET_SEQUENCES)
cdr.write_octet_array (x.get_buffer (), length);
#else
if (x.mb () == 0)
cdr.write_octet_array (x.get_buffer (), length);
else
cdr.write_octet_array_mb (x.mb ());
#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
return cdr.good_bit ();
}
CORBA::Boolean
operator>>(TAO_InputCDR& cdr, TAO_opaque& x)
{
CORBA::ULong length;
cdr.read_ulong (length);
#if !defined (TAO_NO_COPY_OCTET_SEQUENCES)
x.length (length);
cdr.read_octet_array (x.get_buffer (), length);
#else
x.replace (length, cdr.start ());
cdr.skip_bytes (length);
#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
return cdr.good_bit ();
}
// ****************************************************************
#define CACHED_CONNECT_STRATEGY ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR, TAO_Cached_Connector_Lock>
#define REFCOUNTED_HASH_RECYCLABLE_ADDR ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
#if !defined (TAO_NO_COPY_OCTET_SEQUENCES)
template class TAO_Unbounded_Sequence<CORBA::Octet>;
#endif /* defined (TAO_NO_COPY_OCTET_SEQUENCES) */
template class ACE_Dynamic_Service<TAO_Server_Strategy_Factory>;
template class ACE_Dynamic_Service<TAO_Client_Strategy_Factory>;
template class CACHED_CONNECT_STRATEGY;
template class ACE_Guard<TAO_Cached_Connector_Lock>;
template class ACE_Atomic_Op<ACE_SYNCH_MUTEX, u_int>;
template class ACE_Hash_Map_Entry<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *>;
template class ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>;
template class ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>;
template class ACE_Hash_Map_Manager<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_MUTEX>;
template class ACE_Hash_Map_Manager_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_MUTEX>;
template class ACE_Hash_Map_Iterator_Base_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_MUTEX>;
template class ACE_Hash_Map_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_MUTEX>;
template class ACE_Hash_Map_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_MUTEX>;
template class ACE_Hash_Map_Reverse_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_MUTEX>;
template class ACE_Hash_Map_Reverse_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_MUTEX>;
template class ACE_Hash_Map_Manager<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_NULL_MUTEX>;
template class ACE_Hash_Map_Manager_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_NULL_MUTEX>;
template class ACE_Hash_Map_Iterator_Base_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_NULL_MUTEX>;
template class ACE_Hash_Map_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_NULL_MUTEX>;
template class ACE_Hash_Map_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_NULL_MUTEX>;
template class ACE_Hash_Map_Reverse_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_NULL_MUTEX>;
template class ACE_Hash_Map_Reverse_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_NULL_MUTEX>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#if !defined (TAO_NO_COPY_OCTET_SEQUENCES)
#pragma instantiate TAO_Unbounded_Sequence<CORBA::Octet>
#endif /* defined (TAO_NO_COPY_OCTET_SEQUENCES) */
#pragma instantiate ACE_Dynamic_Service<TAO_Server_Strategy_Factory>
#pragma instantiate ACE_Dynamic_Service<TAO_Client_Strategy_Factory>
#pragma instantiate CACHED_CONNECT_STRATEGY
#pragma instantiate ACE_Guard<TAO_Cached_Connector_Lock>
#pragma instantiate ACE_Atomic_Op<ACE_SYNCH_MUTEX, u_int>
#pragma instantiate ACE_Hash_Map_Entry<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *>
#pragma instantiate ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>
#pragma instantiate ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>
#pragma instantiate ACE_Hash_Map_Manager<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Manager_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Reverse_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_MUTEX>
#pragma instantiate ACE_Hash_Map_Manager<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_NULL_MUTEX>
#pragma instantiate ACE_Hash_Map_Manager_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_NULL_MUTEX>
#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_NULL_MUTEX>
#pragma instantiate ACE_Hash_Map_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_NULL_MUTEX>
#pragma instantiate ACE_Hash_Map_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_NULL_MUTEX>
#pragma instantiate ACE_Hash_Map_Reverse_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_NULL_MUTEX>
#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, TAO_Client_Connection_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_NULL_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
|