diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-18 04:30:14 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-18 04:30:14 +0000 |
commit | aaecbedb1d5fda5b558ec9da329df7c138862726 (patch) | |
tree | f500224f03ffd1b77161ceb329bad944534daa43 | |
parent | 5801ec0ca5286d44bce73b4362a5a7536e667951 (diff) | |
download | ATCD-aaecbedb1d5fda5b558ec9da329df7c138862726.tar.gz |
ChangeLogTag:Wed Jun 17 23:29:06 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-98c | 45 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i | 15 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp | 506 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Event_Channel.h | 20 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Event_Channel.i | 25 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event_Utilities.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp | 91 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h | 24 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Multiple/Makefile | 305 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Multiple/svc.conf | 4 |
12 files changed, 813 insertions, 234 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 945f93df626..dd8b32658c2 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,48 @@ +Wed Jun 17 23:29:06 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * orbsvcs/orbsvcs/Event/Event_Channel.h: + * orbsvcs/orbsvcs/Event/Event_Channel.i: + * orbsvcs/orbsvcs/Event/Event_Channel.cpp: + Fixed many bugs in the disconnection code. The main ones were + related to memory managment (missing _duplicate() calls for + ES_Consumer_Rep objects) and to agressive memory release + (disconnecting a consumer could result in removing a critical + entry for the map of type consumers in a supplier, rendering the + supplier unusable). + The code more transparent for CORBA exceptions (it just passes + them back); but some places still catch them or create new + CORBA::Environment and/or signal errors using return values. + Looked more carefully at memory managment, but we still need + clean startup and shutdown to really track any problems in this + area. + Some stylistic changes here and there. + + * orbsvcs/tests/EC_Multiple/EC_Multiple.h: + * orbsvcs/tests/EC_Multiple/EC_Multiple.cpp: + Added an option to connect and disconnect the consumers and/or + suppliers before doing anything else. This was useful to debug + the EC. + + * orbsvcs/tests/EC_Multiple/Makefile: + Updated dependencies. + + * orbsvcs/tests/EC_Multiple/svc.conf: + Added more options to control the kind of lock used in the POA + and similar things. + + * orbsvcs/orbsvcs/Event/RT_Task.cpp: + Failing to run in the real-time class is only a warning, added + an explanation to the user in that sense. + + * orbsvcs/orbsvcs/Event/EC_Gateway.cpp: + Added debug messages (now commented out). + + * orbsvcs/orbsvcs/Event/CORBA_Utils_T.i: + Fixed off-by-one bug in Simple_Array_Iterator. + + * orbsvcs/orbsvcs/Event_Utilities.cpp: + Initialize the rt_info field to 0. + Wed Jun 17 23:21:45 1998 Chris Gill <cdgill@cs.wustl.edu> * orbsvcs/orbsvcs/Sched/DynSched.{cpp, h} diff --git a/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i b/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i index d9ebb9247ad..c60dc7fd308 100644 --- a/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i +++ b/TAO/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i @@ -54,22 +54,23 @@ ACE_ES_Array_Iterator<ITEM>::ACE_ES_Array_Iterator (ITEM *data, size_t size) : { } +template<class ITEM> ACE_INLINE int +ACE_ES_Array_Iterator<ITEM>::done (void) const +{ + return index_ < size_; +} + template <class ITEM> ACE_INLINE int ACE_ES_Array_Iterator<ITEM>::next (ITEM *&next_item) { next_item = &data_[index_]; - return index_ < (size_ - 1); + return this->done (); } template <class ITEM> ACE_INLINE int ACE_ES_Array_Iterator<ITEM>::advance (void) { index_++; - return index_ < size_; + return this->done (); } -template<class ITEM> ACE_INLINE int -ACE_ES_Array_Iterator<ITEM>::done (void) const -{ - return index_ < size_; -} diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp index 8b04a747a10..1b08ee0aff0 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp @@ -82,6 +82,7 @@ TAO_EC_Gateway_IIOP::open (const RtecEventChannelAdmin::ConsumerQOS& sub, { TAO_TRY { + // ACE_DEBUG ((LM_DEBUG, "ECG (%t) Open gateway\n")); if (CORBA::is_nil (this->lcl_ec_.in ()) || CORBA::is_nil (this->rmt_ec_.in ())) return; @@ -141,6 +142,7 @@ TAO_EC_Gateway_IIOP::open (const RtecEventChannelAdmin::ConsumerQOS& sub, void TAO_EC_Gateway_IIOP::close (CORBA::Environment &env) { + // ACE_DEBUG ((LM_DEBUG, "ECG (%t) Closing gateway\n")); if (CORBA::is_nil (this->consumer_proxy_.in ()) || CORBA::is_nil (this->supplier_proxy_.in ())) return; diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp index 2472f2ffb05..d9718a101da 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp @@ -447,7 +447,7 @@ ACE_Push_Supplier_Proxy::connect_push_supplier (RtecEventComm::PushSupplier_ptr this->push_supplier_ = RtecEventComm::PushSupplier::_duplicate(push_supplier); - //ACE_DEBUG ((LM_DEBUG, "connect_push_supplier QOS is ")); + //ACE_DEBUG ((LM_DEBUG, "(%t) connect_push_supplier QOS is ")); //ACE_SupplierQOS_Factory::debug (qos); // Copy by value. @@ -469,7 +469,6 @@ ACE_Push_Supplier_Proxy::push (const RtecEventComm::EventSet &event, { ACE_TIMEPROBE (TAO_EVENT_CHANNEL_ENTER_PUSH_SUPPLIER_PROXY_PUSH); - // @@ TOTAL HACK ACE_hrtime_t ec_recv = ACE_OS::gethrtime (); for (CORBA::ULong i = 0; i < event.length (); ++i) { @@ -486,8 +485,8 @@ ACE_Push_Supplier_Proxy::disconnect_push_consumer (CORBA::Environment &_env) ACE_TIMEPROBE_PRINT; if (this->connected ()) { - push_supplier_ = 0; supplier_module_->disconnecting (this, _env); + push_supplier_ = 0; } } @@ -526,7 +525,7 @@ ACE_Push_Consumer_Proxy::push (const RtecEventComm::EventSet &events, if (push_consumer_ == 0) { - ACE_DEBUG ((LM_DEBUG, "Push to disconnected consumer %s\n", + ACE_DEBUG ((LM_DEBUG, "(%t) Push to disconnected consumer %s\n", ::ACE_ES_Consumer_Name (this->qos ()))); // ACE_ES_DEBUG_ST (::dump_sequence (events)); return; @@ -558,7 +557,7 @@ ACE_Push_Consumer_Proxy::connect_push_consumer (RtecEventComm::PushConsumer_ptr // @@ TODO Find out why are two duplicates needed... RtecEventComm::PushConsumer::_duplicate(push_consumer); - //ACE_DEBUG ((LM_DEBUG, "connect_push_consumer QOS is ")); + //ACE_DEBUG ((LM_DEBUG, "(%t) connect_push_consumer QOS is ")); //ACE_ConsumerQOS_Factory::debug (qos); // Copy by value. @@ -573,8 +572,8 @@ void ACE_Push_Consumer_Proxy::disconnect_push_supplier (CORBA::Environment &_env) { ACE_TIMEPROBE_PRINT; - consumer_module_->disconnecting (this, _env); - push_consumer_ = 0; + this->consumer_module_->disconnecting (this, _env); + this->push_consumer_ = 0; } void @@ -594,7 +593,7 @@ ACE_Push_Consumer_Proxy::shutdown (void) { TAO_TRY { - push_consumer_->disconnect_push_consumer (TAO_TRY_ENV); + this->push_consumer_->disconnect_push_consumer (TAO_TRY_ENV); TAO_CHECK_ENV; } TAO_CATCHANY @@ -739,7 +738,8 @@ ACE_EventChannel::report_disconnect_i (u_long event) { ACE_SET_BITS (state_, event); if (state_ == SHUTDOWN) - ACE_DEBUG ((LM_DEBUG, "(%t) Event Channel has no consumers or suppliers.\n")); + ACE_DEBUG ((LM_DEBUG, + "(%t) Event Channel has no consumers or suppliers.\n")); } void @@ -760,7 +760,7 @@ ACE_EventChannel::update_consumer_gwys (CORBA::Environment& _env) if (this->gwys_.is_empty ()) return; - ACE_DEBUG ((LM_DEBUG, "Event_Channel::update_consumer_gwys\n")); + ACE_DEBUG ((LM_DEBUG, "(%t) Event_Channel::update_consumer_gwys\n")); RtecEventChannelAdmin::ConsumerQOS c_qos; RtecEventChannelAdmin::SupplierQOS s_qos; @@ -839,8 +839,11 @@ ACE_ES_Subscription_Info::remove (Subscriber_Map &type_map, // Find the type set within the type collection. if (type_map.find (type, subscribers) == -1) - // type_map does not contain the type. - return -1; + { + ACE_DEBUG ((LM_DEBUG, "(%t) Info::remove - not found %d\n", type)); + // type_map does not contain the type. + return -1; + } // Remove the consumer from the type set. if (subscribers->consumers_.remove (consumer) == -1) @@ -849,7 +852,14 @@ ACE_ES_Subscription_Info::remove (Subscriber_Map &type_map, // @@ Should probably remove the supplier from the consumers caller // list. + // @@ Should we release here? consumer->_release (); + +#if 0 // If the set is empty, remove it from the type collection. + // NOT!!!! In some cases the map is initialized to the types that a + // certain supplier export; removing an entry from the map renders + // that supplier unable to send that event type. + // Before changing this ask me (coryan). if (subscribers->consumers_.size () == 0) { Type_Subscribers *removed_subscribers; @@ -865,6 +875,7 @@ ACE_ES_Subscription_Info::remove (Subscriber_Map &type_map, // Free up the set removed. delete removed_subscribers; } +#endif /* 0 */ return 0; } @@ -886,10 +897,14 @@ ACE_ES_Subscription_Info::remove (SourceID_Map &source_subscribers, if (subscribers->remove (consumer) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p remove failed.\n", "ACE_ES_Subscriber_Info::remove"), -1); + + // @@ Should we release here? consumer->_release (); + // @@ Should probably remove the supplier from the consumers caller // list. // If the set is empty, remove it from the type collection. +#if 0 if (subscribers->size () == 0) { Subscriber_Set *removed_subscribers; @@ -905,6 +920,7 @@ ACE_ES_Subscription_Info::remove (SourceID_Map &source_subscribers, // Free up the set removed. delete removed_subscribers; } +#endif /* 0 */ return 0; } @@ -950,7 +966,13 @@ ACE_ES_Subscription_Info::insert_or_allocate (SourceID_Map &sid_map, } // 0 and 1 are success for insert. - return subscribers->insert (consumer) == -1 ? -1 : 0; + if (subscribers->insert (consumer) == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p insert failed.\n", + "ACE_ES_Subscription_Info::insert_or_allocate"), + -1); + + consumer->_duplicate (); + return 0; } int @@ -975,7 +997,14 @@ ACE_ES_Subscription_Info::insert_or_allocate (Subscriber_Map &type_map, } } - return subscribers->consumers_.insert (consumer); + if (subscribers->consumers_.insert (consumer) == -1) + { + ACE_ERROR ((LM_ERROR, "%p insert failed.\n", + "ACE_ES_Subscription_Info::insert_or_allocate")); + } + + consumer->_duplicate (); + return 0; } int @@ -994,7 +1023,15 @@ ACE_ES_Subscription_Info::insert_or_fail (Subscriber_Map &type_map, dependency = subscribers->dependency_info_; // Insert the new consumer into the subscriber set. - return subscribers->consumers_.insert (consumer); + if (subscribers->consumers_.insert (consumer) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, "%p insert failed.\n", + "ACE_ES_Subscription_Info::insert_or_fail"), + -1); + } + + consumer->_duplicate (); + return 0; } // ************************************************************ @@ -1017,6 +1054,9 @@ void ACE_ES_Consumer_Module::connected (ACE_Push_Consumer_Proxy *consumer, CORBA::Environment &_env) { + // ACE_DEBUG ((LM_DEBUG, "(%t) Consumer_Module - connecting consumer %x\n", + // consumer)); + this->channel_->report_connect (ACE_EventChannel::CONSUMER); this->down_->connected (consumer, _env); if (_env.exception () != 0) return; @@ -1027,28 +1067,42 @@ ACE_ES_Consumer_Module::connected (ACE_Push_Consumer_Proxy *consumer, void ACE_ES_Consumer_Module::shutdown_request (ACE_ES_Dispatch_Request *request) { - Shutdown_Consumer *sc = (Shutdown_Consumer *) request; + TAO_TRY + { + Shutdown_Consumer *sc = (Shutdown_Consumer *) request; - // Tell everyone else that the consumer is disconnected. This means - // that *nothing* is left in the system for the consumer, so - // everyone can free up any resources. - down_->disconnected (sc->consumer ()); + // Tell everyone else that the consumer is disconnected. This means + // that *nothing* is left in the system for the consumer, so + // everyone can free up any resources. + this->down_->disconnected (sc->consumer ()); - ACE_DEBUG ((LM_DEBUG, "Deleting proxy for consumer\n")); + // ACE_DEBUG ((LM_DEBUG, "(%t) Consumer_Module - remove consumer %x\n", + // sc->consumer ())); - // Delete the consumer proxy. - delete sc->consumer (); + CORBA::Boolean dont_update = sc->consumer ()->qos ().is_gateway; + // Delete the consumer proxy. + delete sc->consumer (); - ACE_ES_GUARD ace_mon (lock_); - if (ace_mon.locked () == 0) - return; + if (!dont_update) + this->channel_->update_consumer_gwys (TAO_TRY_ENV); + TAO_CHECK_ENV; - // Tell the channel that we may need to shut down. - if (all_consumers_.size () <= 0) + ACE_ES_GUARD ace_mon (lock_); + if (ace_mon.locked () == 0) + return; + + // Tell the channel that we may need to shut down. + if (all_consumers_.size () <= 0) + { + // ACE_DEBUG ((LM_DEBUG, "(%t) No more consumers connected.\n")); + channel_->report_disconnect_i (ACE_EventChannel::CONSUMER); + } + } + TAO_CATCHANY { - ACE_DEBUG ((LM_DEBUG, "(%t) No more consumers connected.\n")); - channel_->report_disconnect_i (ACE_EventChannel::CONSUMER); + TAO_TRY_ENV.print_exception ("Consumer_Module::shutdown_request"); } + TAO_ENDTRY; } void @@ -1111,7 +1165,7 @@ ACE_ES_Consumer_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer, TAO_THROW (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR); if (all_consumers_.remove (consumer) == -1) - return; + TAO_THROW (RtecEventChannelAdmin::EventChannel::SUBSCRIPTION_ERROR); } // Tell everyone else that the consumer is disconnecting. This @@ -1138,7 +1192,7 @@ ACE_ES_Consumer_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer, if (act == 0) TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); - ACE_DEBUG ((LM_DEBUG, "(%t) initiating consumer disconnect.\n")); + // ACE_DEBUG ((LM_DEBUG, "(%t) initiating consumer disconnect.\n")); // Set a 100ns timer. TimeBase::TimeT ns100; @@ -1154,9 +1208,6 @@ ACE_ES_Consumer_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer, delete sc; delete act; } - - if (!consumer->qos ().is_gateway) - this->channel_->update_consumer_gwys (_env); } // This method executes in the same thread of control that will hand @@ -1168,6 +1219,8 @@ void ACE_ES_Consumer_Module::push (const ACE_ES_Dispatch_Request *request, CORBA::Environment &_env) { + // ACE_DEBUG ((LM_DEBUG, "(%t) Consumer_Module::push\n")); + ACE_FUNCTION_TIMEPROBE (TAO_EVENT_CHANNEL_ENTER_ES_CONSUMER_MODULE_PUSH); // We'll create a temporary event set with the size of the incoming // request. @@ -1211,7 +1264,7 @@ ACE_ES_Consumer_Module::obtain_push_supplier (CORBA::Environment &_env) } // Return the CORBA object reference to the new supplier proxy. - return new_consumer->get_ref (); + return new_consumer->get_ref (_env); } void @@ -1238,15 +1291,18 @@ ACE_ES_Consumer_Module::fill_qos (RtecEventChannelAdmin::ConsumerQOS& c_qos, } } - c_qos.dependencies.length (count + 1); - s_qos.publications.length (count); + RtecEventChannelAdmin::DependencySet& dep = c_qos.dependencies; + RtecEventChannelAdmin::PublicationSet& pub = s_qos.publications; + + dep.length (count + 1); + pub.length (count); - int cc = 0; - int sc = 0; - c_qos.dependencies[cc].event.type_ = ACE_ES_DISJUNCTION_DESIGNATOR; - c_qos.dependencies[cc].event.source_ = 0; - c_qos.dependencies[cc].event.creation_time_ = ORBSVCS_Time::zero; - c_qos.dependencies[cc].rt_info = 0; + CORBA::ULong cc = 0; + CORBA::ULong sc = 0; + dep[cc].event.type_ = ACE_ES_DISJUNCTION_DESIGNATOR; + dep[cc].event.source_ = 0; + dep[cc].event.creation_time_ = ORBSVCS_Time::zero; + dep[cc].rt_info = 0; cc++; for (Consumer_Iterator i = this->all_consumers_.begin (); @@ -1268,25 +1324,43 @@ ACE_ES_Consumer_Module::fill_qos (RtecEventChannelAdmin::ConsumerQOS& c_qos, if (type <= ACE_ES_EVENT_UNDEFINED) continue; - c_qos.dependencies[cc].event.type_ = event.type_; - c_qos.dependencies[cc].event.source_ = event.source_; - c_qos.dependencies[cc].event.creation_time_ = ORBSVCS_Time::zero; - // The RT_Info is filled up later. - c_qos.dependencies[cc].rt_info = 0; - cc++; - - s_qos.publications[sc].event.type_ = event.type_; - s_qos.publications[sc].event.source_ = event.source_; - s_qos.publications[sc].event.creation_time_ = ORBSVCS_Time::zero; - s_qos.publications[sc].dependency_info.dependency_type = - RtecScheduler::TWO_WAY_CALL; - s_qos.publications[sc].dependency_info.number_of_calls = 1; - s_qos.publications[sc].dependency_info.rt_info = 0; - sc++; - } - } - c_qos.dependencies.length (cc); - s_qos.publications.length (sc); + // Only type and source dependencies are relevant, notice + // that we turn conjunctions into disjunctions because + // correlations could be satisfied by events coming from + // several remote ECs. + if (type <= ACE_ES_EVENT_UNDEFINED) + continue; + + // If the dependency is already there we don't add it. + CORBA::ULong k; + for (k = 0; k < cc; ++k) + { + if (dep[k].event.type_ == event.type_ + && dep[k].event.source_ == event.source_) + break; + } + if (k == cc) + { + dep[cc].event.type_ = event.type_; + dep[cc].event.source_ = event.source_; + dep[cc].event.creation_time_ = ORBSVCS_Time::zero; + // The RT_Info is filled up later. + dep[cc].rt_info = 0; + cc++; + + pub[sc].event.type_ = event.type_; + pub[sc].event.source_ = event.source_; + pub[sc].event.creation_time_ = ORBSVCS_Time::zero; + pub[sc].dependency_info.dependency_type = + RtecScheduler::TWO_WAY_CALL; + pub[sc].dependency_info.number_of_calls = 1; + pub[sc].dependency_info.rt_info = 0; + sc++; + } + } + } + dep.length (cc); + pub.length (sc); } // ************************************************************ @@ -1329,19 +1403,19 @@ ACE_ES_Correlation_Module::subscribe (ACE_ES_Consumer_Rep *consumer) return subscription_module_->subscribe (consumer); } -/* int ACE_ES_Correlation_Module::unsubscribe (ACE_ES_Consumer_Rep *cr) { return subscription_module_->unsubscribe (cr); } -*/ void ACE_ES_Correlation_Module::push (ACE_ES_Consumer_Rep *consumer, ACE_ES_Event_Container *event, CORBA::Environment &_env) { + // ACE_DEBUG ((LM_DEBUG, "(%t) Correlation_Module::push\n")); + ACE_TIMEPROBE (TAO_EVENT_CHANNEL_ENTER_ACE_ES_CORRELATION_MODULE_PUSH); ACE_ES_Dispatch_Request *request = consumer->correlation ()->push (consumer, event); @@ -1372,8 +1446,11 @@ ACE_ES_Correlation_Module::schedule_timeout (ACE_ES_Consumer_Rep_Timeout *consum // after the scheduler has been run). consumer->preemption_priority (::IntervalToPriority (interval)); - ACE_DEBUG ((LM_DEBUG, "Adding timer at preemption %d, rate = (%d,%d)\n", - consumer->preemption_priority (), interval.low, interval.high)); + // ACE_DEBUG ((LM_DEBUG, + // "(%t) Adding timer at preemption %d, rate = (%d,%d)\n", + // consumer->preemption_priority (), + // interval.low, interval.high)); + // Register the timer. int id = channel_->timer ()->schedule_timer (consumer->dependency ()->rt_info, consumer, @@ -1477,8 +1554,15 @@ ACE_ES_Consumer_Correlation::ACE_ES_Consumer_Correlation (void) : ACE_ES_Consumer_Correlation::~ACE_ES_Consumer_Correlation (void) { delete [] timer_reps_; - for (int cr = 0; cr < n_consumer_reps_; cr++) - consumer_reps_[cr]->_release (); + for (int i = 0; i < this->n_consumer_reps_; ++i) + { + ACE_ES_Consumer_Rep *r = this->consumer_reps_[i]; + if (r != 0) + { + this->correlation_module_->unsubscribe (r); + r->_release (); + } + } delete [] consumer_reps_; delete [] conjunction_groups_; delete [] disjunction_groups_; @@ -1486,7 +1570,7 @@ ACE_ES_Consumer_Correlation::~ACE_ES_Consumer_Correlation (void) } void -ACE_ES_Consumer_Correlation::disconnect_push_supplier (CORBA::Environment &) +ACE_ES_Consumer_Correlation::disconnect_push_supplier (CORBA::Environment &_env) { connected_ = 0; } @@ -1499,7 +1583,9 @@ ACE_ES_Consumer_Correlation::allocate_correlation_resources (ACE_ES_Dependency_I { conjunction_groups_ = new ACE_ES_Conjunction_Group[n_conjunction_groups_]; if (conjunction_groups_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1); + ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", + "ACE_ES_Consumer_Correlation::" + "allocate_correlation_resources"), -1); for (int n=0; n < n_conjunction_groups_; n++) conjunction_groups_[n].set_correlation_module (correlation_module_); } @@ -1509,7 +1595,9 @@ ACE_ES_Consumer_Correlation::allocate_correlation_resources (ACE_ES_Dependency_I { disjunction_groups_ = new ACE_ES_Disjunction_Group[n_disjunction_groups_]; if (disjunction_groups_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1); + ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", + "ACE_ES_Consumer_Correlation::" + "allocate_correlation_resources"), -1); for (int n=0; n < n_disjunction_groups_; n++) disjunction_groups_[n].set_correlation_module (correlation_module_); } @@ -1528,7 +1616,9 @@ ACE_ES_Consumer_Correlation::allocate_correlation_resources (ACE_ES_Dependency_I { consumer_reps_[cr] = new ACE_ES_Consumer_Rep; if (consumer_reps_[cr] == 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1); + ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", + "ACE_ES_Consumer_Correlation::" + "allocate_correlation_resources"), -1); } } @@ -1537,13 +1627,17 @@ ACE_ES_Consumer_Correlation::allocate_correlation_resources (ACE_ES_Dependency_I { timer_reps_ = new ACE_ES_Consumer_Rep_Timeout[n_timer_reps_]; if (timer_reps_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1); + ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", + "ACE_ES_Consumer_Correlation::" + "allocate_correlation_resources"), -1); } // This allocates more than is needed. pending_events_ = new Event_Set[n_consumer_reps_ + n_timer_reps_]; if (pending_events_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "ACE_ES_Consumer_Correlation::connected"), -1); + ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", + "ACE_ES_Consumer_Correlation::" + "allocate_correlation_resources"), -1); return 0; } @@ -1837,12 +1931,17 @@ ACE_ES_Consumer_Correlation::disconnecting (void) ACE_ERROR ((LM_ERROR, "ACE_ES_Consumer_Correlation::disconnecting failed.\n")); } - for (int x=0; x < n_timer_reps_; x++) - correlation_module_->cancel_timeout (&timer_reps_[x]); + for (int j = 0; j < this->n_timer_reps_; ++j) + this->correlation_module_->cancel_timeout (&timer_reps_[j]); - for (int y=0; y < n_consumer_reps_; y++) - if (consumer_reps_[y] != 0) - consumer_reps_[y]->disconnect (); + for (int i = 0; i < this->n_consumer_reps_; ++i) + { + ACE_ES_Consumer_Rep *r = this->consumer_reps_[i]; + if (r != 0) + { + r->disconnect (); + } + } return 0; } @@ -1851,6 +1950,8 @@ ACE_ES_Dispatch_Request * ACE_ES_Consumer_Correlation::push (ACE_ES_Consumer_Rep *cr, ACE_ES_Event_Container *event) { + // ACE_DEBUG ((LM_DEBUG, "(%t) Consumer_Correlation_Module::push\n")); + ACE_TIMEPROBE (TAO_EVENT_CHANNEL_ACE_ES_CONSUMER_CORRELATION_PUSH_ENTER); // Check if this event needs any correlating, or if it should just @@ -1864,7 +1965,8 @@ ACE_ES_Consumer_Correlation::push (ACE_ES_Consumer_Rep *cr, ACE_TIMEPROBE (TAO_EVENT_CHANNEL_CONSUMER_CORRELATION_PUSH_DETERMINE_NO_CORR); ACE_ES_Dispatch_Request *request = - new ACE_ES_Dispatch_Request (consumer_, event, cr->dependency ()->rt_info); + new ACE_ES_Dispatch_Request (consumer_, event, + cr->dependency ()->rt_info); ACE_TIMEPROBE (TAO_EVENT_CHANNEL_CONSUMER_CORRELATION_PUSH_NO_CORR_ALLOC); if (request == 0) @@ -2109,12 +2211,14 @@ ACE_ES_Subscription_Module::connected (ACE_Push_Supplier_Proxy *supplier, "ACE_ES_Subscription_Module::connected")); continue; } + (*proxy)->_duplicate (); } } #if 0 else { - //ACE_DEBUG ((LM_DEBUG, "No consumers for type %d\n", event_type)); + //ACE_DEBUG ((LM_DEBUG, + // "(%t) No consumers for type %d\n", event_type)); } #endif @@ -2180,7 +2284,9 @@ ACE_ES_Subscription_Module::disconnecting (ACE_Push_Supplier_Proxy *supplier, for (ACE_ES_Consumer_Rep **consumer; source_iterator.next (consumer) != 0; source_iterator.advance ()) - (*consumer)->_release (); + { + (*consumer)->_release (); + } // Get the subscriber list for each type. ACE_ES_Subscription_Info::Subscriber_Map_Iterator type_map_iterator @@ -2190,14 +2296,17 @@ ACE_ES_Subscription_Module::disconnecting (ACE_Push_Supplier_Proxy *supplier, type_map_iterator.next (entry) != 0; type_map_iterator.advance ()) { - // Remove all consumers from the supplier's source-based subscription lists. + // Remove all consumers from the supplier's source-based + // subscription lists. ACE_ES_Subscription_Info::Subscriber_Set_Iterator type_iterator (entry->int_id_->consumers_); for (ACE_ES_Consumer_Rep **c; type_iterator.next (c) != 0; type_iterator.advance ()) - (*c)->_release (); + { + (*c)->_release (); + } } } @@ -2211,8 +2320,11 @@ ACE_ES_Subscription_Module::subscribe_all (ACE_ES_Consumer_Rep *) // Forward <events> to all consumers subscribed to <source> only. int ACE_ES_Subscription_Module::push_source (ACE_Push_Supplier_Proxy *source, - ACE_ES_Event_Container *event) + ACE_ES_Event_Container *event, + CORBA::Environment &_env) { + // ACE_DEBUG ((LM_DEBUG, "(%t) Subscription_Module::push_source\n")); + ACE_TIMEPROBE (TAO_EVENT_CHANNEL_ENTER_ACE_ES_SUBSCRIPTION_MODULE_PUSH); // If there are now source-based subscribers for this supplier, // return. @@ -2229,37 +2341,29 @@ ACE_ES_Subscription_Module::push_source (ACE_Push_Supplier_Proxy *source, // Acquire a read lock. ACE_ES_RGUARD ace_mon (source->subscription_info ().lock_); if (ace_mon.locked () == 0) - ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscription_Module::push_source.\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, + "ACE_ES_Subscription_Module::push_source.\n"), -1); ACE_ES_Subscription_Info::Subscriber_Set_Iterator iter (set); - TAO_TRY - { - // Iterate through all subscribers. - for (ACE_ES_Consumer_Rep **consumer = 0; - iter.next (consumer) != 0; - iter.advance ()) - { - // Only push the event if the consumer is not suspended - // and not disconnected. - if ((*consumer)->receiving_events ()) - { - up_->push (*consumer, event, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - // If the consumer has disconnected, schedule it for - // disconnection. We can not modify our list now. It - // would mess up the iterator. - if ((*consumer)->disconnected ()) - disconnect_list.insert (*consumer); - } - } - TAO_CATCHANY + // Iterate through all subscribers. + for (ACE_ES_Consumer_Rep **consumer = 0; + iter.next (consumer) != 0; + iter.advance ()) { - return -1; + // Only push the event if the consumer is not suspended + // and not disconnected. + if ((*consumer)->receiving_events ()) + { + up_->push (*consumer, event, _env); + if (_env.exception () != 0) return -1; + } + // If the consumer has disconnected, schedule it for + // disconnection. We can not modify our list now. It + // would mess up the iterator. + if ((*consumer)->disconnected ()) + disconnect_list.insert (*consumer); } - TAO_ENDTRY; - // Release the read lock. } @@ -2269,9 +2373,11 @@ ACE_ES_Subscription_Module::push_source (ACE_Push_Supplier_Proxy *source, { ACE_ES_WGUARD ace_mon (source->subscription_info ().lock_); if (ace_mon.locked () == 0) - ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscription_Module::push_source.\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, + "ACE_ES_Subscription_Module::push_source.\n"), -1); - ACE_ES_CRSet_Iterator iter (disconnect_list.data (), disconnect_list.size ()); + ACE_ES_CRSet_Iterator iter (disconnect_list.data (), + disconnect_list.size ()); // Iterate through the disconnecting consumers. for (ACE_ES_Consumer_Rep **consumer = 0; @@ -2297,8 +2403,12 @@ ACE_ES_Subscription_Module::push_source (ACE_Push_Supplier_Proxy *source, int ACE_ES_Subscription_Module::push_source_type (ACE_Push_Supplier_Proxy *source, - ACE_ES_Event_Container *event) + ACE_ES_Event_Container *event, + CORBA::Environment& _env) { + // ACE_DEBUG ((LM_DEBUG, + // "(%t) Subscription_Module::push_source_type: \n")); + // Step through each event in the set. For each event type, find // the corresponding set in the type collection. Push the single // event to each consumer in the set. @@ -2315,20 +2425,25 @@ ACE_ES_Subscription_Module::push_source_type (ACE_Push_Supplier_Proxy *source, if (ace_mon.locked () == 0) { ACE_TIMEPROBE (TAO_EVENT_CHANNEL_PUSH_SOURCE_TYPE); - ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscription_Module::push_source_type.\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, + "ACE_ES_Subscription_Module::" + "push_source_type.\n"), -1); } ACE_ES_Subscription_Info::Type_Subscribers *subscribers; if (supplier_map.current_size () == 0) - { - ACE_TIMEPROBE (TAO_EVENT_CHANNEL_PUSH_SOURCE_TYPE); - return 0; - } + { + ACE_TIMEPROBE (TAO_EVENT_CHANNEL_PUSH_SOURCE_TYPE); + // ACE_DEBUG ((LM_DEBUG, "(%t) Subscription_Module::" + // "push_source_type - empty supplier map\n")); + return 0; + } if (supplier_map.find (event->type_, subscribers) == -1) { - ACE_DEBUG ((LM_ERROR, "ACE_ES_Subscription_Module::push_source_type" + ACE_DEBUG ((LM_ERROR, + "(%t) ACE_ES_Subscription_Module::push_source_type" " Warning: event type %d not registered.\n", event->type_)); ACE_TIMEPROBE (TAO_EVENT_CHANNEL_PUSH_SOURCE_TYPE); @@ -2336,10 +2451,13 @@ ACE_ES_Subscription_Module::push_source_type (ACE_Push_Supplier_Proxy *source, } if (subscribers->consumers_.size () == 0) - { - ACE_TIMEPROBE (TAO_EVENT_CHANNEL_PUSH_SOURCE_TYPE); - return 0; - } + { + // ACE_DEBUG ((LM_DEBUG, "(%t) Subscription_Module::" + // "push_source_type - empty consumer set for %d\n", + // event->type_)); + ACE_TIMEPROBE (TAO_EVENT_CHANNEL_PUSH_SOURCE_TYPE); + return 0; + } set = &subscribers->consumers_; @@ -2347,37 +2465,34 @@ ACE_ES_Subscription_Module::push_source_type (ACE_Push_Supplier_Proxy *source, // of event from this supplier. Forward the event to each. ACE_ES_Subscription_Info::Subscriber_Set_Iterator iter (*set); - TAO_TRY - { - for (ACE_ES_Consumer_Rep **consumer = 0; - iter.next (consumer) != 0; - iter.advance ()) - { - if ((*consumer)->receiving_events ()) - { - up_->push (*consumer, event, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - if ((*consumer)->disconnected ()) - disconnect_list.insert (*consumer); - } - } - TAO_CATCHANY + for (ACE_ES_Consumer_Rep **consumer = 0; + iter.next (consumer) != 0; + iter.advance ()) { - ACE_TIMEPROBE (TAO_EVENT_CHANNEL_PUSH_SOURCE_TYPE); - return -1; + if ((*consumer)->receiving_events ()) + { + up_->push (*consumer, event, _env); + if (_env.exception () != 0) return -1; + } + if ((*consumer)->disconnected ()) + disconnect_list.insert (*consumer); } - TAO_ENDTRY; } + // Acquire a write lock and remove all disconnected consumers. if (disconnect_list.size () != 0) - // Acquire a write lock and remove all disconnected consumers. { + ACE_DEBUG ((LM_DEBUG, + "(%t) Subscription_Module::push_source_type" + " - disconnecting consumers\n")); ACE_ES_WGUARD ace_mon (source->subscription_info ().lock_); if (ace_mon.locked () == 0) - ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Subscription_Module::push_source.\n"), -1); + ACE_ERROR_RETURN ((LM_ERROR, + "ACE_ES_Subscription_Module::" + "push_source.\n"), -1); - ACE_ES_CRSet_Iterator iter (disconnect_list.data (), disconnect_list.size ()); + ACE_ES_CRSet_Iterator iter (disconnect_list.data (), + disconnect_list.size ()); for (ACE_ES_Consumer_Rep **consumer = 0; iter.next (consumer) != 0; @@ -2388,6 +2503,9 @@ ACE_ES_Subscription_Module::push_source_type (ACE_Push_Supplier_Proxy *source, "ACE_ES_Subscription_Module::push_source.\n")); else (*consumer)->_release (); + ACE_DEBUG ((LM_DEBUG, "EC (%t) Subscription_Module::" + "push_source_type - consumer %x removed\n", + *consumer)); } } @@ -2471,6 +2589,8 @@ ACE_ES_Subscription_Module::subscribe_source (ACE_ES_Consumer_Rep *consumer, } // Add the consumer to the global source subscribers list. + // @@ TODO This seems to require that source IDs be unique, i.e. any + // new supplier with the same ID will be ignored. if (success == -1) return ACE_ES_Subscription_Info::insert_or_allocate (source_subscribers_, consumer, @@ -2486,7 +2606,7 @@ ACE_ES_Subscription_Module::subscribe_type (ACE_ES_Consumer_Rep *consumer, RtecEventComm::EventType type) { // ACE_DEBUG ((LM_DEBUG, - // "Subscription_Module::subscribe_type - %d\n", type)); + // "(%t) Subscription_Module::subscribe_type - %d\n", type)); // First insert <consumer> into the global type collection set // corresponding to <type>. The type collection will only be used @@ -2499,8 +2619,6 @@ ACE_ES_Subscription_Module::subscribe_type (ACE_ES_Consumer_Rep *consumer, -1); } - consumer->_duplicate (); - Supplier_Iterator iter (all_suppliers_); for (ACE_Push_Supplier_Proxy **proxy = 0; @@ -2517,7 +2635,6 @@ ACE_ES_Subscription_Module::subscribe_type (ACE_ES_Consumer_Rep *consumer, ((*proxy)->subscription_info ().type_subscribers_, consumer, type, dependency_info) == 0) { - consumer->_duplicate (); // Success. Add the supplier dependency info to the // consumer's dependency list. // @@ TODO handle exceptions. @@ -2600,7 +2717,6 @@ ACE_ES_Subscription_Module::subscribe_source_type (ACE_ES_Consumer_Rep *consumer -1); } TAO_ENDTRY; - consumer->_duplicate (); } /* FALLTHROUGH */ case 1: @@ -2613,22 +2729,15 @@ ACE_ES_Subscription_Module::subscribe_source_type (ACE_ES_Consumer_Rep *consumer } } + // If we failed to find a source, insert this consumer in the + // global source subscriber list. + // @@ TODO This seems to require that the supplier IDs be unique. if (success == -1) - // If we failed to find a source, insert this consumer in the - // global source subscriber list. - { - if (ACE_ES_Subscription_Info::insert_or_allocate (source_subscribers_, - consumer, - source) == 0) - { - consumer->_duplicate (); - return 0; - } - else - return -1; - } - else - return success; + return ACE_ES_Subscription_Info::insert_or_allocate (source_subscribers_, + consumer, + source); + + return success; } // <consumer> contains information for one type of subscription. @@ -2683,28 +2792,39 @@ ACE_ES_Subscription_Module::unsubscribe (ACE_ES_Consumer_Rep *consumer) if (event.type_ != ACE_ES_EVENT_ANY) { // Remove the consumer from the global type-based subscription list. - if (ACE_ES_Subscription_Info::remove (type_subscribers_, - consumer, - event.type_) == 0) - consumer->_release (); + ACE_ES_Subscription_Info::remove (type_subscribers_, + consumer, + event.type_); } else // Remove the consumer from the global source-based subscription list. - if (ACE_ES_Subscription_Info::remove (source_subscribers_, - consumer, - event.source_) == 0) - consumer->_release (); - - return 0; + ACE_ES_Subscription_Info::remove (source_subscribers_, + consumer, + event.source_); - /* - - This old code manually removed the consumer from the subscription - lists. Now we do lazy removal. +#if 0 + // @@ TODO This code was removed and I'm (coryan) adding it again + // because it does seem necessary, the only explanation for its + // removal is this comment: + // + // /* + // + // This old code manually removed the consumer from the subscription + // lists. Now we do lazy removal. + // */ + // + // I quite not follow what was going on. + // + // [CORYAN]: The mistery seems resolved: the code was here to remove + // the consumer proxy from the supplier sets, but the "new" strategy + // was to remove them as the supplier tries to push events through + // them, unfortunately that code was broken and did not remove the + // objects at all, hence the apparent need to re-instate this code. + // Bottom line: it seems the code is not needed after all. int result = 0; - if (CORBA::is_nil (event.source_)) + if (event.source_ == 0) { if (event.type_ == ACE_ES_EVENT_ANY) result = this->unsubscribe_all (consumer); @@ -2719,7 +2839,9 @@ ACE_ES_Subscription_Module::unsubscribe (ACE_ES_Consumer_Rep *consumer) result = this->unsubscribe_source_type (consumer, event.source_, event.type_); } return result; - */ +#else + return 0; +#endif /* 0 */ } int @@ -2771,6 +2893,7 @@ ACE_ES_Subscription_Module::unsubscribe_source (ACE_ES_Consumer_Rep *consumer, if (set.remove (consumer) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "Subscription Module::unsubscribe_source"), -1); + consumer->_release (); } } @@ -2808,17 +2931,19 @@ ACE_ES_Subscription_Module::unsubscribe_source_type (ACE_ES_Consumer_Rep *consum void ACE_ES_Subscription_Module::push (ACE_Push_Supplier_Proxy *source, ACE_ES_Event_Container *event, - CORBA::Environment &) + CORBA::Environment &_env) { + // ACE_DEBUG ((LM_DEBUG, "(%t) Subscription_Module::push\n")); + ACE_TIMEPROBE (TAO_EVENT_CHANNEL_DELIVER_TO_SUBSCRIPTION_MODULE); // These are all inline function calls. - if (this->push_source (source, event) == -1) + if (this->push_source (source, event, _env) == -1) return; { ACE_FUNCTION_TIMEPROBE (TAO_EVENT_CHANNEL_BEGIN_PUSH_SOURCE_TYPE); - if (this->push_source_type (source, event) == -1) + if (this->push_source_type (source, event, _env) == -1) return; } } @@ -2829,12 +2954,12 @@ ACE_ES_Subscription_Module::shutdown (void) ACE_ES_WGUARD ace_mon (lock_); if (ace_mon.locked () == 0) ACE_ERROR ((LM_ERROR, "%p.\n", - "ACE_ES_Subscription_Module::unsubscribe")); + "ACE_ES_Subscription_Module::shutdown")); // Remove all type_subscribers_ and source_subscribers_. ACE_ES_Subscription_Info::Subscriber_Map_Iterator type_iter (type_subscribers_); - for (ACE_ES_Subscription_Info::Subscriber_Map_Entry *entry; + for (ACE_ES_Subscription_Info::Subscriber_Map_Entry *entry = 0; type_iter.next (entry) != 0; type_iter.advance ()) { @@ -2912,7 +3037,7 @@ ACE_ES_Supplier_Module::disconnecting (ACE_Push_Supplier_Proxy *supplier, if (all_suppliers_.size () <= 0) { - ACE_DEBUG ((LM_DEBUG, "(%t) No more suppliers connected.\n")); + // ACE_DEBUG ((LM_DEBUG, "(%t) No more suppliers connected.\n")); channel_->report_disconnect_i (ACE_EventChannel::SUPPLIER); } @@ -2973,7 +3098,7 @@ ACE_ES_Supplier_Module::obtain_push_consumer (CORBA::Environment &_env) ACE_ERROR ((LM_ERROR, "ACE_ES_Supplier_Module insert failed.\n")); } - return new_supplier->get_ref (); + return new_supplier->get_ref (_env); } void @@ -2981,6 +3106,7 @@ ACE_ES_Supplier_Module::push (ACE_Push_Supplier_Proxy *proxy, const RtecEventComm::EventSet &event, CORBA::Environment &_env) { + // ACE_DEBUG ((LM_DEBUG, "(%t) Supplier_Module::push\n")); TAO_TRY { for (CORBA::ULong i = 0; i < event.length(); ++i) diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h index 2ea233f6912..5978412552a 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h +++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h @@ -198,7 +198,7 @@ public: virtual void destroy (CORBA::Environment &); // Explicitly shut down the channel. - RtecEventChannelAdmin::EventChannel_ptr get_ref (void); + RtecEventChannelAdmin::EventChannel_ptr get_ref (CORBA::Environment &); // Allow transformations to RtecEventChannelAdmin::EventChannel. ACE_RTU_Manager *rtu_manager (void); @@ -868,7 +868,7 @@ public: void push (const ACE_ES_Dispatch_Request *request, CORBA::Environment &); - RtecEventChannelAdmin::ConsumerAdmin_ptr get_ref (void); + RtecEventChannelAdmin::ConsumerAdmin_ptr get_ref (CORBA::Environment &); // Allow transformations to RtecEventChannelAdmin::ConsumerAdmin. void shutdown_request (ACE_ES_Dispatch_Request *request); @@ -940,7 +940,7 @@ public: int subscribe (ACE_ES_Consumer_Rep *consumer); // Forwards to the subscription module. - //int unsubscribe (ACE_ES_Consumer_Rep *consumer); + int unsubscribe (ACE_ES_Consumer_Rep *consumer); // Forwards to the subscription module. int schedule_timeout (ACE_ES_Consumer_Rep_Timeout *consumer); @@ -1073,12 +1073,14 @@ private: // = Push helper methods. int push_source (ACE_Push_Supplier_Proxy *source, - ACE_ES_Event_Container *event); + ACE_ES_Event_Container *event, + CORBA::Environment &_env); // Push <event> to all consumers subscribed to all events from // <source>. Returns 0 on success, -1 on failure. int push_source_type (ACE_Push_Supplier_Proxy *source, - ACE_ES_Event_Container *event); + ACE_ES_Event_Container *event, + CORBA::Environment &_env); // Push <event> to all consumers subscribed to <event>.type_ from // <source>. Returns 0 on success, -1 on failure. @@ -1142,7 +1144,7 @@ public: CORBA::Environment &); // Unregister the consumer from the Event Service. - RtecEventChannelAdmin::SupplierAdmin_ptr get_ref (void); + RtecEventChannelAdmin::SupplierAdmin_ptr get_ref (CORBA::Environment &); // Allow transformations to RtecEventComm::PushConsumer. void shutdown (void); @@ -1205,7 +1207,7 @@ public: // = Operations for the Event Channel. - RtecEventChannelAdmin::ProxyPushConsumer_ptr get_ref (void); + RtecEventChannelAdmin::ProxyPushConsumer_ptr get_ref (CORBA::Environment &); // Allow transformations to RtecEventChannelAdmin::ProxyPushConsumer. int connected (void); @@ -1290,7 +1292,7 @@ public: void shutdown (void); // Actively disconnect from the consumer. - RtecEventChannelAdmin::ProxyPushSupplier_ptr get_ref (void); + RtecEventChannelAdmin::ProxyPushSupplier_ptr get_ref (CORBA::Environment &); // Allow transformations to RtecEventChannelAdmin::ProxyPushSupplier. ACE_ES_Consumer_Correlation &correlation (void); @@ -1307,7 +1309,7 @@ private: // A hook so that the Correlation Module can associate correlation // information with the consumer. - RtecEventComm::PushConsumer_ptr push_consumer_; + RtecEventComm::PushConsumer_var push_consumer_; // Reference to our push consumer. ACE_ES_Consumer_Module *consumer_module_; diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.i b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.i index b61fac30645..4474509a8c4 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.i +++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.i @@ -12,9 +12,8 @@ const unsigned int ACE_INT2BIT[32] = // ************************************************** ACE_INLINE RtecEventChannelAdmin::ProxyPushConsumer_ptr -ACE_Push_Supplier_Proxy::get_ref (void) +ACE_Push_Supplier_Proxy::get_ref (CORBA::Environment &env) { - CORBA::Environment env; return this->_this (env); } @@ -52,9 +51,8 @@ ACE_Push_Supplier_Proxy::source_id (void) // ************************************************** ACE_INLINE RtecEventChannelAdmin::ProxyPushSupplier_ptr -ACE_Push_Consumer_Proxy::get_ref (void) +ACE_Push_Consumer_Proxy::get_ref (CORBA::Environment &env) { - CORBA::Environment env; return this->_this (env); } @@ -67,7 +65,7 @@ ACE_Push_Consumer_Proxy::qos (void) ACE_INLINE int ACE_Push_Consumer_Proxy::connected (void) { - return !CORBA::is_nil(push_consumer_); + return !CORBA::is_nil(push_consumer_.in ()); } ACE_INLINE ACE_ES_Consumer_Correlation & @@ -77,38 +75,35 @@ ACE_Push_Consumer_Proxy::correlation (void) } ACE_INLINE RtecEventChannelAdmin::ConsumerAdmin_ptr -ACE_ES_Consumer_Module::get_ref (void) +ACE_ES_Consumer_Module::get_ref (CORBA::Environment &env) { - CORBA::Environment env; return this->_this (env); } ACE_INLINE RtecEventChannelAdmin::SupplierAdmin_ptr -ACE_ES_Supplier_Module::get_ref (void) +ACE_ES_Supplier_Module::get_ref (CORBA::Environment &env) { - CORBA::Environment env; return this->_this (env); } // ************************************************** ACE_INLINE RtecEventChannelAdmin::EventChannel_ptr -ACE_EventChannel::get_ref (void) +ACE_EventChannel::get_ref (CORBA::Environment &env) { - CORBA::Environment env; return this->_this (env); } ACE_INLINE RtecEventChannelAdmin::SupplierAdmin_ptr -ACE_EventChannel::for_suppliers (CORBA::Environment &) +ACE_EventChannel::for_suppliers (CORBA::Environment &env) { - return supplier_module_->get_ref (); + return supplier_module_->get_ref (env); } ACE_INLINE RtecEventChannelAdmin::ConsumerAdmin_ptr -ACE_EventChannel::for_consumers (CORBA::Environment &) +ACE_EventChannel::for_consumers (CORBA::Environment &env) { - return consumer_module_->get_ref (); + return consumer_module_->get_ref (env); } ACE_INLINE ACE_ES_Priority_Timer * diff --git a/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp b/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp index ed03bd5bc73..5e86655309c 100644 --- a/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp @@ -111,7 +111,9 @@ ACE_RT_Task::svc (void) TAO_CHECK_ENV; if (ACE_OS::thr_setprio (thread_priority) == -1) { - ACE_ERROR ((LM_ERROR, "(%P|%t) RT_Task thr_setprio failed\n")); + ACE_ERROR ((LM_ERROR, + "(%P|%t) RT_Task thr_setprio failed, " + "this is OK if you don't want RT threads\n")); } int done = 0; diff --git a/TAO/orbsvcs/orbsvcs/Event_Utilities.cpp b/TAO/orbsvcs/orbsvcs/Event_Utilities.cpp index 8123251d80e..079e51df8ec 100644 --- a/TAO/orbsvcs/orbsvcs/Event_Utilities.cpp +++ b/TAO/orbsvcs/orbsvcs/Event_Utilities.cpp @@ -23,6 +23,7 @@ ACE_ConsumerQOS_Factory::start_conjunction_group (void) int l = qos_.dependencies.length (); qos_.dependencies.length (l + 1); qos_.dependencies[l].event.type_ = ACE_ES_CONJUNCTION_DESIGNATOR; + qos_.dependencies[l].rt_info = 0; // TODO: qos_.dependencies[l].event.data_.lval (0); designator_set_ = 1; return 0; @@ -34,6 +35,7 @@ ACE_ConsumerQOS_Factory::start_disjunction_group (void) int l = qos_.dependencies.length (); qos_.dependencies.length (l + 1); qos_.dependencies[l].event.type_ = ACE_ES_DISJUNCTION_DESIGNATOR; + qos_.dependencies[l].rt_info = 0; // TODO: qos_.dependencies[l].event.data_.lval (0); designator_set_ = 1; return 0; @@ -48,9 +50,11 @@ ACE_ConsumerQOS_Factory::insert (const RtecEventChannelAdmin::Dependency &subscr { int l = qos_.dependencies.length (); qos_.dependencies.length (l + 1); + qos_.dependencies[l].rt_info = 0; qos_.dependencies[l].event.type_ = ACE_ES_GLOBAL_DESIGNATOR; + // TODO: IDL union qos_.dependencies[l].event.data_.lval (0); - designator_set_ = 1; + this->designator_set_ = 1; } int l = qos_.dependencies.length (); diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp index ec33c81604f..5ab7de648ba 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp @@ -26,6 +26,8 @@ Test_ECG::Test_ECG (void) : lcl_name_ ("Test_ECG"), rmt_name_ (0), scheduling_type_ (Test_ECG::ss_runtime), + consumer_disconnects_ (0), + supplier_disconnects_ (0), short_circuit_ (0), hp_suppliers_ (1), hp_consumers_ (1), @@ -148,6 +150,8 @@ Test_ECG::run (int argc, char* argv[]) " lcl name = <%s>\n" " rmt name = <%s>\n" " scheduler type = <%d>\n" + " consumer disconnects = <%d>\n" + " supplier disconnects = <%d>\n" " short circuit EC = <%d>\n" " HP suppliers = <%d>\n" " HP consumers = <%d>\n" @@ -172,6 +176,8 @@ Test_ECG::run (int argc, char* argv[]) this->lcl_name_?this->lcl_name_:"nil", this->rmt_name_?this->rmt_name_:"nil", this->scheduling_type_, + this->consumer_disconnects_, + this->supplier_disconnects_, this->short_circuit_, this->hp_suppliers_, @@ -353,6 +359,7 @@ Test_ECG::run (int argc, char* argv[]) orb->object_to_string (ec.in (), TAO_TRY_ENV); TAO_CHECK_ENV; + ACE_OS::sleep (5); ACE_DEBUG ((LM_DEBUG, "The (local) EC IOR is <%s>\n", str.in ())); ACE_OS::strcpy (buf, "EventChannel@"); @@ -387,6 +394,16 @@ Test_ECG::run (int argc, char* argv[]) ACE_DEBUG ((LM_DEBUG, "located local EC\n")); + for (int sd = 0; sd < this->supplier_disconnects_; ++sd) + { + this->connect_suppliers (local_ec.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + this->disconnect_suppliers (TAO_TRY_ENV); + TAO_CHECK_ENV; + ACE_OS::sleep (5); + ACE_DEBUG ((LM_DEBUG, "Supplier disconnection %d\n", sd)); + } + this->connect_suppliers (local_ec.in (), TAO_TRY_ENV); TAO_CHECK_ENV; @@ -437,6 +454,15 @@ Test_ECG::run (int argc, char* argv[]) ec_impl.add_gateway (&this->ecg_); } + for (int cd = 0; cd < this->consumer_disconnects_; ++cd) + { + this->connect_consumers (local_ec.in (), TAO_TRY_ENV); + TAO_CHECK_ENV; + this->disconnect_consumers (TAO_TRY_ENV); + TAO_CHECK_ENV; + ACE_OS::sleep (5); + ACE_DEBUG ((LM_DEBUG, "Consumer disconnection %d\n", cd)); + } this->connect_consumers (local_ec.in (), TAO_TRY_ENV); TAO_CHECK_ENV; @@ -451,8 +477,7 @@ Test_ECG::run (int argc, char* argv[]) // Acquire the mutex for the ready mutex, blocking any supplier // that may start after this point. - ACE_GUARD_RETURN (ACE_Thread_Mutex, ready_mon, - this->ready_mtx_, 1); + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ready_mon, this->ready_mtx_, 1); this->ready_ = 1; this->test_start_ = ACE_OS::gethrtime (); ready_mon.release (); @@ -548,6 +573,16 @@ Test_ECG::get_ec (CosNaming::NamingContext_ptr naming_context, } void +Test_ECG::disconnect_suppliers (CORBA::Environment &_env) +{ + for (int i = 0; i < this->hp_suppliers_ + this->lp_suppliers_; ++i) + { + this->suppliers_[i]->close (_env); + if (_env.exception () != 0) return; + } +} + +void Test_ECG::connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, CORBA::Environment &_env) { @@ -609,6 +644,16 @@ Test_ECG::connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, } void +Test_ECG::disconnect_consumers (CORBA::Environment &_env) +{ + for (int i = 0; i < this->hp_consumers_ + this->lp_consumers_; ++i) + { + this->consumers_[i]->close (_env); + if (_env.exception () != 0) return; + } +} + +void Test_ECG::activate_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, CORBA::Environment &_env) { @@ -996,7 +1041,7 @@ Test_ECG::local_source (RtecEventComm::EventSourceID id) const int Test_ECG::parse_args (int argc, char *argv []) { - ACE_Get_Opt get_opt (argc, argv, "l:r:s:xh:w:p:d:"); + ACE_Get_Opt get_opt (argc, argv, "l:r:s:i:xh:w:p:d:"); int opt; while ((opt = get_opt ()) != EOF) @@ -1006,9 +1051,11 @@ Test_ECG::parse_args (int argc, char *argv []) case 'l': this->lcl_name_ = get_opt.optarg; break; + case 'r': this->rmt_name_ = get_opt.optarg; break; + case 's': if (ACE_OS::strcasecmp (get_opt.optarg, "global") == 0) { @@ -1031,10 +1078,21 @@ Test_ECG::parse_args (int argc, char *argv []) this->scheduling_type_ = Test_ECG::ss_local; } break; + case 'x': this->short_circuit_ = 1; break; + case 'i': + { + char* aux; + char* arg = ACE_OS::strtok_r (get_opt.optarg, ",", &aux); + this->consumer_disconnects_ = ACE_OS::atoi (arg); + arg = ACE_OS::strtok_r (0, ",", &aux); + this->supplier_disconnects_ = ACE_OS::atoi (arg); + } + break; + case 'h': { char* aux; @@ -1100,6 +1158,7 @@ Test_ECG::parse_args (int argc, char *argv []) "-l <local_name> " "-r <remote_name> " "-s <global|local|runtime> " + "-i <consumer disc.,supplier disc.> " "-x (short circuit EC) " "-h <high priority args> " "-w <low priority args> " @@ -1238,6 +1297,18 @@ Test_Supplier::open (const char* name, } void +Test_Supplier::close (CORBA::Environment &_env) +{ + if (CORBA::is_nil (this->consumer_proxy_.in ())) + return; + + this->consumer_proxy_->disconnect_push_consumer (_env); + if (_env.exception () != 0) return; + + this->consumer_proxy_ = 0; +} + +void Test_Supplier::activate (const char* name, const RtecScheduler::Period& rate, RtecEventChannelAdmin::EventChannel_ptr ec, @@ -1340,6 +1411,8 @@ Test_Supplier::push (const RtecEventComm::EventSet& events, if (e.type_ != ACE_ES_EVENT_INTERVAL_TIMEOUT) continue; + // ACE_DEBUG ((LM_DEBUG, "Test_Supplier - timeout (%t)\n")); + RtecEventComm::Event& s = sent[i]; s.source_ = this->supplier_id_; s.ttl_ = 1; @@ -1465,6 +1538,18 @@ Test_Consumer::open (const char* name, } void +Test_Consumer::close (CORBA::Environment &_env) +{ + if (CORBA::is_nil (this->supplier_proxy_.in ())) + return; + + this->supplier_proxy_->disconnect_push_supplier (_env); + if (_env.exception () != 0) return; + + this->supplier_proxy_ = 0; +} + +void Test_Consumer::push (const RtecEventComm::EventSet& events, CORBA::Environment &_env) { diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h index 86939873f4a..b9b727473e1 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h @@ -47,6 +47,9 @@ public: CORBA::Environment& _env); // This method connects the supplier to the EC. + void close (CORBA::Environment &_env); + // Disconnect from the EC. + void activate (const char* name, const RtecScheduler::Period& rate, RtecEventChannelAdmin::EventChannel_ptr ec, @@ -113,6 +116,9 @@ public: CORBA::Environment& _env); // This method connects the consumer to the EC. + void close (CORBA::Environment &_env); + // Disconnect from the EC. + virtual void push (const RtecEventComm::EventSet& events, CORBA::Environment &_env); virtual void disconnect_push_consumer (CORBA::Environment &); @@ -197,6 +203,7 @@ private: void connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, CORBA::Environment &_env); + void disconnect_suppliers (CORBA::Environment &_env); // Connect the suppliers. void activate_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, @@ -212,7 +219,8 @@ private: void connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, CORBA::Environment &_env); - // Connect the consumers. + void disconnect_consumers (CORBA::Environment &_env); + // Connect and disconnect the consumers. int shutdown (CORBA::Environment&); // Called when the main thread (i.e. not the scavenger thread) is @@ -259,6 +267,12 @@ private: // "local" instantiate a local config time scheduling service. // "runtime" instantiates a local rumtime scheduling service. + int consumer_disconnects_; + int supplier_disconnects_; + // How many times to disconnect the consumers (and suppliers) before + // the final connection. This is useful to test the disconnection in + // the EC. + int short_circuit_; // Don't send the messages through the EC. This is needed to measure // the overhead introduced by the EC. @@ -340,17 +354,17 @@ private: // Store the measurements for local and remote events.. int ready_; - ACE_Thread_Mutex ready_mtx_; - ACE_Condition<ACE_Thread_Mutex> ready_cnd_; + ACE_SYNCH_MUTEX ready_mtx_; + ACE_Condition<ACE_SYNCH_MUTEX> ready_cnd_; // Before accepting any events the suppliers must wait for the test // to setup all the consumers. // The suppliers wait on the condition variable. - ACE_Atomic_Op<ACE_Thread_Mutex,int> running_suppliers_; + ACE_Atomic_Op<ACE_SYNCH_MUTEX,int> running_suppliers_; // keep track of how many suppliers are still running so we shutdown // at the right moment. - ACE_Atomic_Op<ACE_Thread_Mutex,int> running_consumers_; + ACE_Atomic_Op<ACE_SYNCH_MUTEX,int> running_consumers_; // keep track of how many consumers are still running so we shutdown // at the right moment. diff --git a/TAO/orbsvcs/tests/EC_Multiple/Makefile b/TAO/orbsvcs/tests/EC_Multiple/Makefile index 3b93c6d650c..344d21125f7 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/Makefile +++ b/TAO/orbsvcs/tests/EC_Multiple/Makefile @@ -37,6 +37,309 @@ include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU # DO NOT DELETE THIS LINE -- g++dep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - +.obj/EC_Multiple.o .obj/EC_Multiple.so .shobj/EC_Multiple.o .shobj/EC_Multiple.so: EC_Multiple.cpp \ + $(ACE_ROOT)/ace/Get_Opt.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/config.h \ + $(ACE_ROOT)/ace/config-sunos5.5.h \ + $(ACE_ROOT)/ace/config-g++-common.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/Get_Opt.i \ + $(ACE_ROOT)/ace/Auto_Ptr.h \ + $(ACE_ROOT)/ace/Auto_Ptr.i \ + $(ACE_ROOT)/ace/Auto_Ptr.cpp \ + $(ACE_ROOT)/ace/Sched_Params.h \ + $(ACE_ROOT)/ace/Sched_Params.i \ + $(TAO_ROOT)/tao/Timeprobe.h \ + $(ACE_ROOT)/ace/Timeprobe.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ + $(TAO_ROOT)/tao/corba.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/SOCK_Stream.h \ + $(ACE_ROOT)/ace/SOCK_IO.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_IO.i \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_Stream.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers.cpp \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(ACE_ROOT)/ace/SOCK_Connector.h \ + $(ACE_ROOT)/ace/SOCK_Connector.i \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/Message_Queue.cpp \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Connector.h \ + $(ACE_ROOT)/ace/Map_Manager.h \ + $(ACE_ROOT)/ace/Map_Manager.i \ + $(ACE_ROOT)/ace/Map_Manager.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.h \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.i \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + $(ACE_ROOT)/ace/Dynamic.h \ + $(ACE_ROOT)/ace/Dynamic.i \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.i \ + $(ACE_ROOT)/ace/Svc_Handler.cpp \ + $(ACE_ROOT)/ace/Connector.i \ + $(ACE_ROOT)/ace/Connector.cpp \ + $(ACE_ROOT)/ace/Acceptor.h \ + $(ACE_ROOT)/ace/Acceptor.i \ + $(ACE_ROOT)/ace/Acceptor.cpp \ + $(TAO_ROOT)/tao/compat/objbase.h \ + $(TAO_ROOT)/tao/compat/initguid.h \ + $(TAO_ROOT)/tao/Align.h \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(TAO_ROOT)/tao/default_client.h \ + $(TAO_ROOT)/tao/default_client.i \ + $(TAO_ROOT)/tao/default_server.h \ + $(TAO_ROOT)/tao/ORB_Strategies_T.h \ + $(TAO_ROOT)/tao/ORB_Strategies_T.i \ + $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ + $(TAO_ROOT)/tao/default_server.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/Marshal.h \ + $(TAO_ROOT)/tao/Marshal.i \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Object_Table.h \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/Connect.h \ + $(TAO_ROOT)/tao/Connect.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)/ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/debug.h \ + $(TAO_ROOT)/tao/IIOP_Object.h \ + $(TAO_ROOT)/tao/IIOP_Object.i \ + $(TAO_ROOT)/tao/IIOP_ORB.h \ + $(TAO_ROOT)/tao/IIOP_ORB.i \ + $(TAO_ROOT)/tao/IIOP_Interpreter.h \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/singletons.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Scheduler_Factory.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Scheduler_Generic.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Sched/Config_Scheduler.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Runtime_Scheduler.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Local_ESTypes.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/CORBA_Utils_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/CORBA_Utils_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/CORBA_Utils_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Task_Manager.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Task_Manager.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/ReactorTask.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Fast_Reactor.h \ + $(ACE_ROOT)/ace/Select_Reactor.h \ + $(ACE_ROOT)/ace/Token.h \ + $(ACE_ROOT)/ace/Token.i \ + $(ACE_ROOT)/ace/Pipe.h \ + $(ACE_ROOT)/ace/Pipe.i \ + $(ACE_ROOT)/ace/Select_Reactor.i \ + $(ACE_ROOT)/ace/Timer_Heap.h \ + $(ACE_ROOT)/ace/Timer_Heap_T.h \ + $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ + $(ACE_ROOT)/ace/Timer_List.h \ + $(ACE_ROOT)/ace/Timer_List_T.h \ + $(ACE_ROOT)/ace/Timer_List_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Event_Channel.i \ + EC_Multiple.h \ + $(ACE_ROOT)/ace/High_Res_Timer.h \ + $(ACE_ROOT)/ace/High_Res_Timer.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Channel_Clients_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Gateway.h \ + Scheduler_Runtime1.h Scheduler_Runtime2.h # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/EC_Multiple/svc.conf b/TAO/orbsvcs/tests/EC_Multiple/svc.conf index 5b048c7e8cc..272f088b3dd 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/svc.conf +++ b/TAO/orbsvcs/tests/EC_Multiple/svc.conf @@ -2,6 +2,6 @@ # # The options are described in $TAO_ROOT/docs/Options.html # -dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global -ORBpoa global -ORBcoltable orb" +dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global -ORBpoa global -ORBcoltable global" dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128" +dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128 -ORBpoalock thread -ORBcoltbllock thread -ORBpoamgrlock thread" |