diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-11-16 19:34:49 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-11-16 19:34:49 +0000 |
commit | 28b53cae81c0f05b191238ab7b9bef1613a2b070 (patch) | |
tree | b2ee31e5c50942d2011b59b093f41e02b363cb52 /TAO | |
parent | 8af53995b634b6eb7db0c1396da0a58c7368cbdc (diff) | |
download | ATCD-28b53cae81c0f05b191238ab7b9bef1613a2b070.tar.gz |
Fri Nov 15 15:29:24 2002 Pradeep Gore <pradeep@oomworks.com>
Diffstat (limited to 'TAO')
55 files changed, 709 insertions, 337 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 10cb01200db..0d86c73351f 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,143 @@ +Fri Nov 15 15:29:24 2002 Pradeep Gore <pradeep@oomworks.com> + + * orbsvcs/tests/Notify/Basic/run_test.pl: + Modified to run the basic tests with a reactive and + multithreaded Notification. + * orbsvcs/tests/Notify/Basic/notify.mt.conf: + Added MT conf for the Basic test. + * orbsvcs/tests/Notify/Basic/notify.reactive.conf: + Added reactive conf for the Basic test. + + * orbsvcs/tests/Notify/Blocking/notify.conf: + * orbsvcs/tests/Notify/Discarding/notify.conf: + * orbsvcs/tests/Notify/MT_Dispatching/notify_mtdispatching.conf: + * orbsvcs/tests/Notify/Ordering/notify.conf: + * orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/notify.conf: + * orbsvcs/tests/Notify/Sequence_Multi_Filter/notify.conf + * orbsvcs/tests/Notify/performance-tests/Filter/notify.conf + * orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf + * orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf + * orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf + * orbsvcs/logging_service/notify_logging_service/svc.conf: + * orbsvcs/Notify_Service/svc.conf: + Reverted factory back to + Notify_Default_Event_Manager_Objects_Factory. + I have decided not to introduce any changes for Notify Options in + TAO 1.3. + Better replacements will be introduced gradually in subsequent releases. + + * orbsvcs/Notify_Service/Notify_Server.cpp: + Not handling signals. + The shutdown code and event handler is maintained in case we want to address this in the future. + + * orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl: + - Modified to run all 3 test cases described in the README. + * orbsvcs/tests/Notify/performance-tests/RedGreen/Red + + * orbsvcs/tests/Notify/Discarding/Notify_Structured_Push_Consumer.cpp: + Changed hardcoded "10" to the expected number of events that can + be specified on the command line. + + * orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp: + - Changed low=2 and high=20. Here is the explaination: + The Supplier sends 96 events as 6 batches of 16 events. + The Notification is run with 1 dispatching thread. The Discarding + Policy is set and the MaxEventsPerConsumer is set to 2 (Event + Batches).The Batch size is 5 so the maximum batches that can be + received is 20 (19 batches with 5 events each and 1 batch with 1 + event).if we receive 20 batches then the channel + hasn't discarded anything. so high = 20. In the worst case the + consumer starts *after* the supplier has send all the events to + the Notification. This means that only 2 batches are queued and + all others are discarded. Hence low = 2. + - Changed the sleep time that the consumer was polling fior + excess events, from 3 to 1 sec. otherwise the perl script was + timing out. + + * orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.h: + * orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.cpp: + * orbsvcs/tests/Notify/Ordering/Sequence_Consumer.cpp: + Removed high-low logic. There is *no* discarding policy set so + the Sequence Consumer should received the expected number of 96 events. + + * orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Consumer.cpp: + - Changed ConsumerAdmin interfilter operator to AND_OP. With an + OR_OP, all the filters would return true! this is because the + filters of the Admin and Proxy, both are combined to determine event + eligibility. Note that this test success/failure has to be + determined visually. + + * orbsvcs/tests/Notify/listener.conf: + * orbsvcs/tests/Notify/lookup.conf: + * orbsvcs/tests/Notify/reactive.conf: + Reverted to Notify_Default_Event_Manager_Objects_Factory for + backward compatibility. + + * orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Consumer.dsp: + * orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Supplier.dsp: + * orbsvcs/tests/Notify/Structured_Filter/Structured_Multi_Filter_Consumer.dsp: + * orbsvcs/tests/Notify/Structured_Filter/Structured_Multi_Filter_Supplier.dsp: + * orbsvcs/tests/Notify/Structured_Filter/run_test.pl: + Reverted executable name to Structured_* prefix. + + * orbsvcs/orbsvcs/Notify/Buffering_Strategy.cpp: + Discarding condition should be executed when buffering limit has + reached. Current logic was enqueing 1 extra event. + + * orbsvcs/orbsvcs/Notify/Builder.cpp: + Added call to set default startup QoS options on the Proxys and Admins. + + * orbsvcs/orbsvcs/Notify/Notify_Service.cpp: + * orbsvcs/orbsvcs/Notify/Notify_Service.h: + - Added support for configuring startup threads at the proxy and + Admin level while maintaining backward compatibility. + - Modified updates logic - Updates are send synchronously by + default. If the -AsynchUpdates option is set, updates are queued along + with the regular events in the Proxy objects worker task. + + * orbsvcs/orbsvcs/Notify/Properties.h: + * orbsvcs/orbsvcs/Notify/Properties.inl: + Added get/set methods for Proxy and Admin level default QoS. + Changed <updates> to <asynch_updates> flag. + + * orbsvcs/orbsvcs/Notify/Property_T.h: + * orbsvcs/orbsvcs/Notify/Property_T.inl: + - Added assignment operator to TAO_NS_Property_T. + - Added an <invalidate> method to TAO_NS_PropertyBase_T + + * orbsvcs/orbsvcs/Notify/Proxy.cpp: + - Send updates synchronously unless default properties mandate + asynchrony. In that case the event is executed in the current + thread context. + + * orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h: + * orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h: + Added dummy methods and ACE_ASSERT in them if called. + + * orbsvcs/orbsvcs/Notify/Sequence/EventBatch.h: + * orbsvcs/orbsvcs/Notify/Sequence/EventBatch.inl: + Added an accessor for the current size of the EventBatch. + Note that this size can be greater than the batchsize. + + * orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp: + * orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h: + Overloaded ProxyPushSupplier::push method. + The overloaded implementation executes the filtering and + dispatch in the current thread context. Now, this dispatch + doesn't immediately go remote but is stored in an event batch + waiting for the pacing interval to expire after which the + batchsize events are queued in the SequenceProxy's worker thread + to be finally dispatched to the remote consumer. + + * orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h: + Removed <dispatch_immediate> and <cancel_timer> methods. + There was no need for these seperate methods. + + * orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.cpp: + Modified the implementation so that the Pacing Timer is deployed + only if there is atleast 1 event queued to send, otherwise the + existing timer is removed. This will avoid needless timeouts. + Sat Nov 16 08:22:38 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> * orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h: diff --git a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/svc.conf b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/svc.conf index 509c0ee230f..eb86f799f6e 100755 --- a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/svc.conf +++ b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/svc.conf @@ -1,5 +1,6 @@ ##$Id$ ## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1" +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1" + diff --git a/TAO/orbsvcs/Notify_Service/Notify_Server.cpp b/TAO/orbsvcs/Notify_Service/Notify_Server.cpp index b499cebd09a..95521e73548 100644 --- a/TAO/orbsvcs/Notify_Service/Notify_Server.cpp +++ b/TAO/orbsvcs/Notify_Service/Notify_Server.cpp @@ -19,7 +19,8 @@ extern "C" void handler (int signum) int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); + // ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); + // Not handling signals. the shutdown code and event handler is maintained in case we want to address this in the future. // Init factories. diff --git a/TAO/orbsvcs/Notify_Service/svc.conf b/TAO/orbsvcs/Notify_Service/svc.conf index d733dd71d4c..fbe7d7f3a57 100644 --- a/TAO/orbsvcs/Notify_Service/svc.conf +++ b/TAO/orbsvcs/Notify_Service/svc.conf @@ -1,7 +1,3 @@ ## $Id$ -## Uncomment the following line to load the service dynamically. -## dynamic TAO_NS_Service Service_Object * TAO_CosNotification:_make_TAO_NS_Notify_Service() "-DispatchingThreads 1" - -## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1"
\ No newline at end of file +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1" diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.cpp index 985530caffb..a8f0fa35236 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.cpp @@ -40,6 +40,13 @@ TAO_NS_CosEC_ProxyPushConsumer::destroy (ACE_ENV_SINGLE_ARG_DECL) } void +TAO_NS_CosEC_ProxyPushConsumer::push (TAO_NS_Event_var &/*event*/) +{ + // This should never be called. + ACE_ASSERT (1); +} + +void TAO_NS_CosEC_ProxyPushConsumer::push (const CORBA::Any& data ACE_ENV_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h index 928a37defbe..780eb08aaa2 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Any/CosEC_ProxyPushConsumer.h @@ -72,7 +72,8 @@ protected: CORBA::SystemException )); private: - void push (TAO_NS_Event_var & ns) {TAO_NS_ProxyConsumer::push (ns); } + // Overloaded TAO_NS_ProxyConsumer::push to get around Borland compiler warnings. + virtual void push (TAO_NS_Event_var &event); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp index 81b2b058d97..c3f3a56f9aa 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.cpp @@ -49,6 +49,13 @@ TAO_NS_ProxyPushConsumer::MyType (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } void +TAO_NS_ProxyPushConsumer::push (TAO_NS_Event_var &/*event*/) +{ + // This should never be called. + ACE_ASSERT (1); +} + +void TAO_NS_ProxyPushConsumer::push (const CORBA::Any& data ACE_ENV_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException diff --git a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h index 0779e8f7399..83eb801af1f 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Any/ProxyPushConsumer.h @@ -77,7 +77,9 @@ protected: CORBA::SystemException )); - void push (TAO_NS_Event_var &ns) {TAO_NS_ProxyConsumer::push (ns);} +private: + // Overloaded TAO_NS_ProxyConsumer::push to get around Borland compiler warnings. + virtual void push (TAO_NS_Event_var &event); }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/orbsvcs/orbsvcs/Notify/Buffering_Strategy.cpp b/TAO/orbsvcs/orbsvcs/Notify/Buffering_Strategy.cpp index 814ed93b649..fb3bab05339 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Buffering_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Buffering_Strategy.cpp @@ -74,9 +74,9 @@ TAO_NS_Buffering_Strategy::execute (TAO_NS_Method_Request& method_request, ACE_T // and queue_length_ is more than max_events_per_consumer_. CORBA::Long current = this->queue_length_.value (); if ((this->use_max_queue_ && this->max_queue_length_ != 0 && - current > this->max_queue_length_.value ()) || + current >= this->max_queue_length_.value ()) || (!this->use_max_queue_ && this->max_events_per_consumer_ != 0 && - current > this->max_events_per_consumer_.value ())) + current >= this->max_events_per_consumer_.value ())) { if (this->blocking_timeout_.is_valid ()) { diff --git a/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp b/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp index 61829012133..df5655ae404 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp @@ -227,6 +227,12 @@ TAO_NS_Builder::build_consumer_admin (TAO_NS_EventChannel* ec, CosNotifyChannelA id = ca->id (); + const CosNotification::QoSProperties &default_ca_qos = + TAO_NS_PROPERTIES::instance ()->default_consumer_admin_qos_properties (); + + ca->set_qos (default_ca_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (ca_ret._retn ()); + // Pass EC QoS ec->qos_properties_.transfer (ca->qos_properties_); ca->qos_changed (ca->qos_properties_); @@ -273,6 +279,12 @@ TAO_NS_Builder::build_supplier_admin (TAO_NS_EventChannel* ec, CosNotifyChannelA id = sa->id (); + const CosNotification::QoSProperties &default_sa_qos = + TAO_NS_PROPERTIES::instance ()->default_supplier_admin_qos_properties (); + + sa->set_qos (default_sa_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (sa_ret._retn ()); + // Pass EC QoS ec->qos_properties_.transfer (sa->qos_properties_); sa->qos_changed (sa->qos_properties_); @@ -323,6 +335,12 @@ TAO_NS_Builder::build_notification_push_consumer (TAO_NS_SupplierAdmin* sa, CosN proxy_id = pc->id (); + const CosNotification::QoSProperties &default_pc_qos = + TAO_NS_PROPERTIES::instance ()->default_proxy_consumer_qos_properties (); + + pc->set_qos (default_pc_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (proxy_ret._retn ()); + // Pass SA QoS sa->qos_properties_.transfer (pc->qos_properties_); pc->qos_changed (pc->qos_properties_); @@ -358,6 +376,12 @@ TAO_NS_Builder::build_notification_push_consumer (TAO_NS_SupplierAdmin* sa, CosN proxy_id = pc->id (); + const CosNotification::QoSProperties &default_pc_qos = + TAO_NS_PROPERTIES::instance ()->default_proxy_consumer_qos_properties (); + + pc->set_qos (default_pc_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (proxy_ret._retn ()); + // Pass SA QoS sa->qos_properties_.transfer (pc->qos_properties_); pc->qos_changed (pc->qos_properties_); @@ -393,6 +417,12 @@ TAO_NS_Builder::build_notification_push_consumer (TAO_NS_SupplierAdmin* sa, CosN proxy_id = pc->id (); + const CosNotification::QoSProperties &default_pc_qos = + TAO_NS_PROPERTIES::instance ()->default_proxy_consumer_qos_properties (); + + pc->set_qos (default_pc_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (proxy_ret._retn ()); + // Pass SA QoS sa->qos_properties_.transfer (pc->qos_properties_); pc->qos_changed (pc->qos_properties_); @@ -452,6 +482,12 @@ TAO_NS_Builder::build_notification_push_supplier (TAO_NS_ConsumerAdmin* ca, CosN ps->init_ps (ACE_ENV_SINGLE_ARG_PARAMETER); + const CosNotification::QoSProperties &default_ps_qos = + TAO_NS_PROPERTIES::instance ()->default_proxy_supplier_qos_properties (); + + ps->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (proxy_ret._retn ()); + // Pass CA QoS ca->qos_properties_.transfer (ps->qos_properties_); ps->qos_changed (ps->qos_properties_); @@ -489,6 +525,12 @@ TAO_NS_Builder::build_notification_push_supplier (TAO_NS_ConsumerAdmin* ca, CosN ps->init_ps (ACE_ENV_SINGLE_ARG_PARAMETER); + const CosNotification::QoSProperties &default_ps_qos = + TAO_NS_PROPERTIES::instance ()->default_proxy_supplier_qos_properties (); + + ps->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (proxy_ret._retn ()); + // Pass CA QoS ca->qos_properties_.transfer (ps->qos_properties_); ps->qos_changed (ps->qos_properties_); @@ -526,6 +568,12 @@ TAO_NS_Builder::build_notification_push_supplier (TAO_NS_ConsumerAdmin* ca, CosN ps->init_ps (ACE_ENV_SINGLE_ARG_PARAMETER); + const CosNotification::QoSProperties &default_ps_qos = + TAO_NS_PROPERTIES::instance ()->default_proxy_supplier_qos_properties (); + + ps->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (proxy_ret._retn ()); + // Pass CA QoS ca->qos_properties_.transfer (ps->qos_properties_); ps->qos_changed (ps->qos_properties_); @@ -577,6 +625,12 @@ TAO_NS_Builder::build_push_supplier (TAO_NS_ConsumerAdmin* ca ACE_ENV_ARG_DECL) ps->init_ps (ACE_ENV_SINGLE_ARG_PARAMETER); + const CosNotification::QoSProperties &default_ps_qos = + TAO_NS_PROPERTIES::instance ()->default_proxy_supplier_qos_properties (); + + ps->set_qos (default_ps_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (proxy_ret._retn ()); + // Pass CA QoS ca->qos_properties_.transfer (ps->qos_properties_); ps->qos_changed (ps->qos_properties_); @@ -619,6 +673,12 @@ TAO_NS_Builder::build_push_consumer (TAO_NS_SupplierAdmin* sa ACE_ENV_ARG_DECL) CORBA::Object_var obj = pc->activate (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (proxy_ret._retn ()); + const CosNotification::QoSProperties &default_pc_qos = + TAO_NS_PROPERTIES::instance ()->default_proxy_consumer_qos_properties (); + + pc->set_qos (default_pc_qos ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (proxy_ret._retn ()); + // Pass SA QoS sa->qos_properties_.transfer (pc->qos_properties_); pc->qos_changed (pc->qos_properties_); diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Service.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_Service.cpp index d45a1b30d87..e61646739fc 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Service.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Service.cpp @@ -31,102 +31,149 @@ TAO_NS_Notify_Service::init (int argc, char *argv[]) const ACE_TCHAR *current_arg = 0; + int dispatching_threads = 0; + int listener_threads = 0; + int source_threads = 0; + int lookup_threads = 0; + int task_per_proxy = 0; + while (arg_shifter.is_anything_left ()) { - if (arg_shifter.cur_arg_strncasecmp (ACE_LIB_TEXT("-Updates")) == 0) // -Updates update_period_uS + if (arg_shifter.cur_arg_strncasecmp (ACE_LIB_TEXT("-MTDispatching")) == 0) { + // If Dispatching Threads are initalized, the option is implicit. arg_shifter.consume_arg (); - - current_arg = arg_shifter.get_current (); - - if (current_arg != 0) - { - ACE_Time_Value update_period (0, ACE_OS::atoi (current_arg)); - - TAO_NS_PROPERTIES::instance()->updates (1); - TAO_NS_PROPERTIES::instance()->update_period (update_period); - } - } - else if (arg_shifter.cur_arg_strncasecmp (ACE_LIB_TEXT("-NoUpdates")) == 0) // No Updates - { - arg_shifter.consume_arg (); - - TAO_NS_PROPERTIES::instance()->updates (0); } else if ((current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-DispatchingThreads")))) { - int dispatching_threads = ACE_OS::atoi (current_arg); - - arg_shifter.consume_arg (); - - if (dispatching_threads > 0) - { - NotifyExt::ThreadPoolParams tp_params = - {0, (unsigned)dispatching_threads, 0, 0, 0, 0, 0 }; - CosNotification::QoSProperties ec_qos; - - ec_qos.length (1); - ec_qos[0].name = CORBA::string_dup (NotifyExt::ThreadPool); - ec_qos[0].value <<= tp_params; - - TAO_NS_PROPERTIES::instance()->default_event_channel_qos_properties (ec_qos); - } - } - else if (arg_shifter.cur_arg_strncasecmp (ACE_LIB_TEXT("-MTDispatching")) == 0) - { - // If Dispatching Threads are initalized, the option is implicit. + dispatching_threads = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } else if (arg_shifter.cur_arg_strncasecmp (ACE_LIB_TEXT("-MTSourceEval")) == 0) { - // Users interested in this arcane feature should look to the upcomming RT-Notification for a better solution. + // If Source Threads are initalized, the option is implicit. arg_shifter.consume_arg (); } else if ((current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-SourceThreads")))) { - // Users interested in this arcane feature should look to the upcomming RT-Notification for a better solution. + source_threads = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } else if (arg_shifter.cur_arg_strncasecmp (ACE_LIB_TEXT("-MTLookup")) == 0) { - // Users interested in this arcane feature should look to the upcomming RT-Notification for a better solution. + // If Source Threads are initalized, the option is implicit. arg_shifter.consume_arg (); } else if ((current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-LookupThreads")))) { - // Users interested in this arcane feature should look to the upcomming RT-Notification for a better solution. + lookup_threads = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } else if (arg_shifter.cur_arg_strncasecmp (ACE_LIB_TEXT("-MTListenerEval")) == 0) { - // Users interested in this arcane feature should look to the upcomming RT-Notification for a better solution. + // If Source Threads are initalized, the option is implicit. arg_shifter.consume_arg (); } else if ((current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-ListenerThreads")))) { - // Users interested in this arcane feature should look to the upcomming RT-Notification for a better solution. + listener_threads = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } else if (arg_shifter.cur_arg_strncasecmp (ACE_LIB_TEXT("-AsynchUpdates")) == 0) { arg_shifter.consume_arg (); - TAO_NS_PROPERTIES::instance()->updates (1); - - ACE_Time_Value update_period (0, TAO_NS_DEFAULT_UPDATES_PERIOD); - - TAO_NS_PROPERTIES::instance()->update_period (update_period); + TAO_NS_PROPERTIES::instance()->asynch_updates (1); } - else if (ACE_OS::strcasecmp (current_arg, ACE_LIB_TEXT("-AllocateTaskperProxy")) == 0) + else if (arg_shifter.cur_arg_strncasecmp (ACE_LIB_TEXT("-AllocateTaskperProxy")) == 0) { - // Not supported any more. + task_per_proxy = 1; arg_shifter.consume_arg (); } } + if (task_per_proxy == 0) + { + this->set_consumer_admin_threads (dispatching_threads + listener_threads); + this->set_supplier_admin_threads (lookup_threads + source_threads); + } + else + { + this->set_proxy_supplier_threads (dispatching_threads + listener_threads); + this->set_proxy_consumer_threads (source_threads); // lookup thread per proxy doesn't make sense. + } + return 0; } +void +TAO_NS_Notify_Service::set_consumer_admin_threads (int threads) +{ + if (threads > 0) + { + NotifyExt::ThreadPoolParams tp_params = + {0, (unsigned)threads, 0, 0, 0, 0, 0 }; + CosNotification::QoSProperties qos; + + qos.length (1); + qos[0].name = CORBA::string_dup (NotifyExt::ThreadPool); + qos[0].value <<= tp_params; + + TAO_NS_PROPERTIES::instance()->default_consumer_admin_qos_properties (qos); + } +} + +void +TAO_NS_Notify_Service::set_supplier_admin_threads (int threads) +{ + if (threads > 0) + { + NotifyExt::ThreadPoolParams tp_params = + {0, (unsigned)threads, 0, 0, 0, 0, 0 }; + CosNotification::QoSProperties qos; + + qos.length (1); + qos[0].name = CORBA::string_dup (NotifyExt::ThreadPool); + qos[0].value <<= tp_params; + + TAO_NS_PROPERTIES::instance()->default_supplier_admin_qos_properties (qos); + } +} + +void +TAO_NS_Notify_Service::set_proxy_consumer_threads (int threads) +{ + if (threads > 0) + { + NotifyExt::ThreadPoolParams tp_params = + {0, (unsigned)threads, 0, 0, 0, 0, 0 }; + CosNotification::QoSProperties qos; + + qos.length (1); + qos[0].name = CORBA::string_dup (NotifyExt::ThreadPool); + qos[0].value <<= tp_params; + + TAO_NS_PROPERTIES::instance()->default_proxy_consumer_qos_properties (qos); + } +} + +void +TAO_NS_Notify_Service::set_proxy_supplier_threads (int threads) +{ + if (threads > 0) + { + NotifyExt::ThreadPoolParams tp_params = + {0, (unsigned)threads, 0, 0, 0, 0, 0 }; + CosNotification::QoSProperties qos; + + qos.length (1); + qos[0].name = CORBA::string_dup (NotifyExt::ThreadPool); + qos[0].value <<= tp_params; + + TAO_NS_PROPERTIES::instance()->default_proxy_supplier_qos_properties (qos); + } +} + int TAO_NS_Notify_Service::fini (void) { diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Service.h b/TAO/orbsvcs/orbsvcs/Notify/Notify_Service.h index 37dcc41547a..32a9a45c6e5 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Service.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Service.h @@ -67,6 +67,18 @@ protected: /// Apply ORB Scheduling policy to main thread and set its priority to the lowest available. void init_main_thread (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL); + /// Set consumer admin thread options. + void set_consumer_admin_threads (int threads); + + /// Set supplier admin thread options. + void set_supplier_admin_threads (int threads); + + /// Set proxy supplier thread options. + void set_proxy_supplier_threads (int threads); + + // Set proxy consumer threads options. + void set_proxy_consumer_threads (int threads); + /// Service component for object factory operations. TAO_NS_Factory* factory_; diff --git a/TAO/orbsvcs/orbsvcs/Notify/Properties.cpp b/TAO/orbsvcs/orbsvcs/Notify/Properties.cpp index 0fd58a95f53..6018b876659 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Properties.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Properties.cpp @@ -10,7 +10,7 @@ ACE_RCSID(RT_Notify, TAO_NS_Properties, "$Id$") TAO_NS_Properties::TAO_NS_Properties (void) - :updates_ (1), update_period_ (0, TAO_NS_DEFAULT_UPDATES_PERIOD) + :asynch_updates_ (0) { if (TAO_debug_level > 1) ACE_DEBUG ((LM_DEBUG, "in TAO_Properties ctos %x\n", this)); diff --git a/TAO/orbsvcs/orbsvcs/Notify/Properties.h b/TAO/orbsvcs/orbsvcs/Notify/Properties.h index da1765770d6..0f88b710689 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Properties.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Properties.h @@ -63,11 +63,8 @@ public: long sched_policy (void); void sched_policy (long sched_policy); - CORBA::Boolean updates (void); - void updates (CORBA::Boolean updates); - - ACE_Time_Value& update_period (void); - void update_period (ACE_Time_Value& time_value); + CORBA::Boolean asynch_updates (void); + void asynch_updates (CORBA::Boolean asynch_updates); // The QoS Property that must be applied to each newly created Event Channel const CosNotification::QoSProperties& default_event_channel_qos_properties (void); @@ -75,6 +72,30 @@ public: // Set the default EC QoS Property. void default_event_channel_qos_properties (const CosNotification::QoSProperties &ec_qos); + // The QoS Property that must be applied to each newly created Supplier Admin + const CosNotification::QoSProperties& default_supplier_admin_qos_properties (void); + + // Set the default SA QoS Property. + void default_supplier_admin_qos_properties (const CosNotification::QoSProperties &sa_qos); + + // The QoS Property that must be applied to each newly created Consumer Admin + const CosNotification::QoSProperties& default_consumer_admin_qos_properties (void); + + // Set the default CA QoS Property. + void default_consumer_admin_qos_properties (const CosNotification::QoSProperties &ca_qos); + + // The QoS Property that must be applied to each newly created Proxy Supplier + const CosNotification::QoSProperties& default_proxy_supplier_qos_properties (void); + + // Set the default PS QoS Property. + void default_proxy_supplier_qos_properties (const CosNotification::QoSProperties &ps_qos); + + // The QoS Property that must be applied to each newly created Proxy Consumer + const CosNotification::QoSProperties& default_proxy_consumer_qos_properties (void); + + // Set the default PC QoS Property. + void default_proxy_consumer_qos_properties (const CosNotification::QoSProperties &pc_qos); + protected: /// Object Factory TAO_NS_Factory* factory_; @@ -94,17 +115,27 @@ protected: /// Scope policy long thr_scope_policy_; - /// True if updates are sent. - CORBA::Boolean updates_; + /// True if send asynch updates. + CORBA::Boolean asynch_updates_; /// The Update period for updates. ACE_Time_Value update_period_; /// The default EC QoS Properties. CosNotification::QoSProperties ec_qos_; -}; -#define TAO_NS_DEFAULT_UPDATES_PERIOD 10000 // 10mS + /// The default SA QoS Properties. + CosNotification::QoSProperties sa_qos_; + + /// The default CA QoS Properties. + CosNotification::QoSProperties ca_qos_; + + /// The default PS QoS Properties. + CosNotification::QoSProperties ps_qos_; + + /// The default PC QoS Properties. + CosNotification::QoSProperties pc_qos_; +}; typedef ACE_Singleton<TAO_NS_Properties, TAO_SYNCH_MUTEX> TAO_NS_PROPERTIES; diff --git a/TAO/orbsvcs/orbsvcs/Notify/Properties.inl b/TAO/orbsvcs/orbsvcs/Notify/Properties.inl index e838bba9f92..a066c3907a5 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Properties.inl +++ b/TAO/orbsvcs/orbsvcs/Notify/Properties.inl @@ -73,37 +73,73 @@ TAO_NS_Properties::sched_policy (long sched_policy) } ACE_INLINE CORBA::Boolean -TAO_NS_Properties::updates (void) +TAO_NS_Properties::asynch_updates (void) { - return this->updates_; + return this->asynch_updates_; } ACE_INLINE void -TAO_NS_Properties::updates (CORBA::Boolean synchronous_updates) +TAO_NS_Properties::asynch_updates (CORBA::Boolean asynch_updates) { - this->updates_ = synchronous_updates; + this->asynch_updates_ = asynch_updates; } -ACE_INLINE ACE_Time_Value& -TAO_NS_Properties::update_period (void) +ACE_INLINE const CosNotification::QoSProperties& +TAO_NS_Properties::default_event_channel_qos_properties (void) { - return this->update_period_; + return this->ec_qos_; } ACE_INLINE void -TAO_NS_Properties::update_period (ACE_Time_Value& time_value) +TAO_NS_Properties::default_event_channel_qos_properties (const CosNotification::QoSProperties &ec_qos) { - this->update_period_ = time_value; + this->ec_qos_ = ec_qos; } ACE_INLINE const CosNotification::QoSProperties& -TAO_NS_Properties::default_event_channel_qos_properties (void) +TAO_NS_Properties::default_supplier_admin_qos_properties (void) { - return this->ec_qos_; + return this->sa_qos_; } ACE_INLINE void -TAO_NS_Properties::default_event_channel_qos_properties (const CosNotification::QoSProperties &ec_qos) +TAO_NS_Properties::default_supplier_admin_qos_properties (const CosNotification::QoSProperties &sa_qos) { - this->ec_qos_ = ec_qos; + this->sa_qos_ = sa_qos; +} + +ACE_INLINE const CosNotification::QoSProperties& +TAO_NS_Properties::default_consumer_admin_qos_properties (void) +{ + return this->ca_qos_; +} + +ACE_INLINE void +TAO_NS_Properties::default_consumer_admin_qos_properties (const CosNotification::QoSProperties &ca_qos) +{ + this->ca_qos_ = ca_qos; +} + +ACE_INLINE const CosNotification::QoSProperties& +TAO_NS_Properties::default_proxy_supplier_qos_properties (void) +{ + return this->ps_qos_; +} + +ACE_INLINE void +TAO_NS_Properties::default_proxy_supplier_qos_properties (const CosNotification::QoSProperties &ps_qos) +{ + this->ps_qos_ = ps_qos; +} + +ACE_INLINE const CosNotification::QoSProperties& +TAO_NS_Properties::default_proxy_consumer_qos_properties (void) +{ + return this->pc_qos_; +} + +ACE_INLINE void +TAO_NS_Properties::default_proxy_consumer_qos_properties (const CosNotification::QoSProperties &pc_qos) +{ + this->pc_qos_ = pc_qos; } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Property_T.h b/TAO/orbsvcs/orbsvcs/Notify/Property_T.h index c4200fc2b63..5b05d472b9f 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Property_T.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Property_T.h @@ -67,6 +67,9 @@ public: /// Is the current value valid CORBA::Boolean is_valid (void) const; + /// Invalidate this property's value. + void invalidate (void); + protected: /// The Property name. ACE_CString name_; @@ -96,6 +99,9 @@ public: /// Constuctor TAO_NS_Property_T (const ACE_CString& name); + /// Assignment from TYPE + TAO_NS_Property_T& operator= (const TYPE& rhs); + /// Init this Property from the sequence. /// Returns 0 on success, -1 on error int set (const TAO_NS_PropertySeq& property_seq); diff --git a/TAO/orbsvcs/orbsvcs/Notify/Property_T.inl b/TAO/orbsvcs/orbsvcs/Notify/Property_T.inl index fefa4ec01d2..3442b0fe7c4 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Property_T.inl +++ b/TAO/orbsvcs/orbsvcs/Notify/Property_T.inl @@ -48,6 +48,21 @@ TAO_NS_PropertyBase_T<TYPE>::operator=(const TYPE& value) return *this; } +template <class TYPE> ACE_INLINE void +TAO_NS_PropertyBase_T<TYPE>:: invalidate (void) +{ + this->valid_ = 0; +} + +/******************************************************************************/ + +template <class TYPE> ACE_INLINE TAO_NS_Property_T<TYPE>& +TAO_NS_Property_T<TYPE>::operator=(const TYPE& value) +{ + this->TAO_NS_PropertyBase_T<TYPE>::operator= (value); + return *this; +} + /******************************************************************************/ template <class TYPE> ACE_INLINE const TYPE& diff --git a/TAO/orbsvcs/orbsvcs/Notify/Proxy.cpp b/TAO/orbsvcs/orbsvcs/Notify/Proxy.cpp index 690bcf823c9..db24f2df95f 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Proxy.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Proxy.cpp @@ -16,6 +16,7 @@ ACE_RCSID(RT_Notify, TAO_NS_Proxy, "$Id$") #include "Notify_Service.h" #include "Method_Request_Updates.h" #include "Worker_Task.h" +#include "Properties.h" TAO_NS_Proxy::TAO_NS_Proxy (void) :updates_off_ (0) @@ -31,7 +32,15 @@ TAO_NS_Proxy::types_changed (const TAO_NS_EventTypeSeq& added, const TAO_NS_Even { TAO_NS_Method_Request_Updates request (added, removed, this); - this->worker_task ()->exec (request); + if (TAO_NS_PROPERTIES::instance()->asynch_updates () == 1) // if we should send the updates synchronously. + { + this->worker_task ()->exec (request); + } + else // execute in the current thread context. + { + ACE_DECLARE_NEW_CORBA_ENV; + request.execute (ACE_ENV_SINGLE_ARG_PARAMETER); + } } CORBA::Boolean diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/EventBatch.h b/TAO/orbsvcs/orbsvcs/Notify/Sequence/EventBatch.h index 0330fe78061..b5f5ada395a 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/EventBatch.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/EventBatch.h @@ -55,6 +55,9 @@ public: /// Populate <event_batch> with <event_collection> static void populate (const TAO_NS_Event_Collection& event_collection, CosNotification::EventBatch& event_batch); + /// The size of the batch. + int size (void); + protected: // Event Batch TAO_NS_Event_Collection event_collection_; diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/EventBatch.inl b/TAO/orbsvcs/orbsvcs/Notify/Sequence/EventBatch.inl index b934c9deeef..5394ad97ad4 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/EventBatch.inl +++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/EventBatch.inl @@ -7,3 +7,9 @@ TAO_NS_EventBatch::batch_size (CORBA::Long batch_size) { this->batch_size_ = batch_size; } + +ACE_INLINE int +TAO_NS_EventBatch::size (void) +{ + return this->event_collection_.size (); +} diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp index fb3a6a72a6b..640f2ce255e 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.cpp @@ -44,6 +44,16 @@ TAO_NS_SequenceProxyPushSupplier::release (void) } void +TAO_NS_SequenceProxyPushSupplier::push (TAO_NS_Event_var &event) +{ + TAO_NS_Method_Request_Dispatch request (event, this); + + ACE_DECLARE_NEW_CORBA_ENV; + + request.execute(ACE_ENV_SINGLE_ARG_PARAMETER); +} + +void TAO_NS_SequenceProxyPushSupplier::connect_sequence_push_consumer (CosNotifyComm::SequencePushConsumer_ptr push_consumer ACE_ENV_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h index 0eba8479006..a51afb6fc4e 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequenceProxyPushSupplier.h @@ -53,6 +53,11 @@ public: /// TAO_NS_Destroy_Callback methods virtual void release (void); + /// Override, TAO_NS_ProxySupplier::push method. + /// This implementation executes fiter evaluation in the invoking thread. + /// Dispatching for Sequences will be initiated via a timer. + virtual void push (TAO_NS_Event_var &event); + /// = Servant methods virtual CosNotifyChannelAdmin::ProxyType MyType (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (( diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.cpp b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.cpp index 7284a6b10fb..ab247f0bb8c 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.cpp @@ -43,7 +43,7 @@ TAO_NS_SequencePushConsumer::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_Reactor* reactor = orb->orb_core ()->reactor (); - this->cancel_timer (reactor); + reactor->cancel_timer (this); } void @@ -64,6 +64,13 @@ TAO_NS_SequencePushConsumer::qos_changed (const TAO_NS_QoSProperties& qos_proper this->pacing_interval_ = qos_properties.pacing_interval (); if (!this->pacing_interval_.is_valid ()) + this->pacing_interval_ = 0; +} + +void +TAO_NS_SequencePushConsumer::schedule_timer (void) +{ + if (this->pacing_interval_ == 0) return; // Get the ORB @@ -71,27 +78,6 @@ TAO_NS_SequencePushConsumer::qos_changed (const TAO_NS_QoSProperties& qos_proper ACE_Reactor* reactor = orb->orb_core ()->reactor (); - if (this->cancel_timer (reactor) != 1) // Cancel existing timer. - return; - - ///Yamuna: Added the following so the comparison works - ACE_Time_Value pacing_interval (this->pacing_interval_.value ()); - if (pacing_interval != ACE_Time_Value::zero) - this->schedule_timer (reactor); -} - -int -TAO_NS_SequencePushConsumer::cancel_timer (ACE_Reactor* reactor) -{ - if (this->timer_id_ == -1) - return 1; - else - return reactor->cancel_timer (this->timer_id_); -} - -void -TAO_NS_SequencePushConsumer::schedule_timer (ACE_Reactor* reactor) -{ TimeBase::TimeT pacing_interval = this->pacing_interval_.value(); # if defined (ACE_CONFIG_WIN32_H) @@ -101,13 +87,8 @@ TAO_NS_SequencePushConsumer::schedule_timer (ACE_Reactor* reactor) # endif /* ACE_CONFIG_WIN32_H */ // Schedule the timer. - this->timer_id_ = reactor->schedule_timer (this, 0, interval, interval); - - if (this->timer_id_ == -1) - { - // Failed to set the timer, treat as if no timer was required. - //this->pacing_interval_ = 0;//ACE_Time_Value::zero; - } + if (reactor->schedule_timer (this, 0, interval, interval) == -1) + this->pacing_interval_ = 0; } void @@ -116,10 +97,14 @@ TAO_NS_SequencePushConsumer::push_i (const TAO_NS_Event_var& event ACE_ENV_ARG_D { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, *this->proxy_lock ()); this->event_batch_.insert (event); + + if (this->event_batch_.size () == 1) + this->schedule_timer (); } - if (this->timer_id_ == -1 && this->is_suspended_ == 0) - this->dispatch_immediate (); + // If pacing is zero, there is no timer, hence dispatch immediately + if (this->pacing_interval_ == 0 ) + this->handle_timeout (ACE_Time_Value::zero, 0); } void @@ -134,20 +119,6 @@ TAO_NS_SequencePushConsumer::push (const CosNotification::StructuredEvent& /*not //NOP } -void -TAO_NS_SequencePushConsumer::dispatch_immediate (void) -{ - TAO_NS_Event_Collection event_collection; - - { - ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, *this->proxy_lock ()); - this->event_batch_.extract (event_collection); - } - - ACE_DECLARE_NEW_CORBA_ENV; - this->push (event_collection ACE_ENV_ARG_PARAMETER); -} - int TAO_NS_SequencePushConsumer::handle_timeout (const ACE_Time_Value& /*current_time*/, const void* /*act*/) @@ -156,6 +127,10 @@ TAO_NS_SequencePushConsumer::handle_timeout (const ACE_Time_Value& /*current_tim { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, *this->proxy_lock (), 0); + + if (this->event_batch_.size () == 0) + return -1; // Cancel the timer. + this->event_batch_.extract (event_collection); } diff --git a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h index eda9a3161e0..c05243d0692 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Sequence/SequencePushConsumer.h @@ -26,7 +26,6 @@ #include "../Consumer.h" #include "EventBatch.h" -class ACE_Reactor; class TAO_NS_ProxySupplier; class TAO_NS_QoSProperties; @@ -78,14 +77,8 @@ protected: virtual int handle_timeout (const ACE_Time_Value& current_time, const void* act = 0); - /// Dispatch events immediately if no pacing is set. - void dispatch_immediate (void); - /// Schedule timer - void schedule_timer (ACE_Reactor* reactor); - - /// Cancel timer. Return 1 on success. - int cancel_timer (ACE_Reactor* reactor); + void schedule_timer (void); /// The Pacing Interval TAO_NS_Property_Time pacing_interval_; diff --git a/TAO/orbsvcs/orbsvcs/Notify/Service.h b/TAO/orbsvcs/orbsvcs/Notify/Service.h index 39df48e4a3d..af8a28a2fd2 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Service.h +++ b/TAO/orbsvcs/orbsvcs/Notify/Service.h @@ -47,7 +47,7 @@ public: }; #define TAO_NOTIFY_DEF_EMO_FACTORY_NAME "Notify_Default_Event_Manager_Objects_Factory" -#define TAO_NS_COS_NOTIFICATION_SERVICE_NAME "TAO_NS_CosNotification_Service" +#define TAO_NS_COS_NOTIFICATION_SERVICE_NAME "CosNotify_Service" #include "ace/post.h" #endif /* TAO_NS_SERVICE_H */ diff --git a/TAO/orbsvcs/tests/Notify/Basic/notify.mt.conf b/TAO/orbsvcs/tests/Notify/Basic/notify.mt.conf new file mode 100644 index 00000000000..d9f7dbeb983 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Basic/notify.mt.conf @@ -0,0 +1,2 @@ +##$Id$ +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1" diff --git a/TAO/orbsvcs/tests/Notify/Basic/notify.reactive.conf b/TAO/orbsvcs/tests/Notify/Basic/notify.reactive.conf new file mode 100644 index 00000000000..ca5144bd072 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Basic/notify.reactive.conf @@ -0,0 +1,2 @@ +##$Id$ +static Notify_Default_Event_Manager_Objects_Factory "" diff --git a/TAO/orbsvcs/tests/Notify/Basic/run_test.pl b/TAO/orbsvcs/tests/Notify/Basic/run_test.pl index 0e059f3c9a0..4872f4ad804 100755 --- a/TAO/orbsvcs/tests/Notify/Basic/run_test.pl +++ b/TAO/orbsvcs/tests/Notify/Basic/run_test.pl @@ -19,11 +19,8 @@ unlink $namingior; $Naming = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $namingior"); -$Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service", - "-ORBInitRef NameService=file://$namingior " . - "-IORoutput $notifyior " . - "-ORBSvcConf ../../../Notify_Service/svc.conf"); -@tests = + +@tests = ( "AdminProperties", "ConnectDisconnect", @@ -36,41 +33,56 @@ $Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service", "Updates", ); +@test_configs = + ( + "notify.mt.conf", + "notify.reactive.conf", + ); + $Naming->Spawn (); if (PerlACE::waitforfile_timed ($namingior, $startup_timeout) == -1) { - print STDERR "ERROR: waiting for the naming service to start\n"; - $Naming->Kill (); - exit 1; + print STDERR "ERROR: waiting for the naming service to start\n"; + $Naming->Kill (); + exit 1; } -$Notification->Spawn (); - -if (PerlACE::waitforfile_timed ($notifyior, $startup_timeout) == -1) { - print STDERR "ERROR: waiting for the notify service to start\n"; - $Notification->Kill (); - $Naming->Kill (); - exit 1; -} - -for $name (@tests) +for $config (@test_configs) { - print STDERR "\nTesting $name....\n\n"; - $test = new PerlACE::Process ("./$name", + print STDERR "\nTesting Notification Service with config file = $config ....\n\n"; + + $Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service", + "-ORBInitRef NameService=file://$namingior " . + "-IORoutput $notifyior " . + "-ORBSvcConf $config"); + $Notification->Spawn (); + + if (PerlACE::waitforfile_timed ($notifyior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + + for $name (@tests) + { + print STDERR "\nTesting $name....\n\n"; + $test = new PerlACE::Process ("./$name", "-ORBInitRef NameService=file://$namingior "); - $test->Spawn (); + $test->Spawn (); - $status = $test->WaitKill ($experiment_timeout); + $status = $test->WaitKill ($experiment_timeout); - if ($status != 0) - { - print STDERR "ERROR: $name returned $status\n"; - break; - } + if ($status != 0) + { + print STDERR "ERROR: $name returned $status\n"; + break; + } + } + + $Notification->Kill (); } - -$Notification->Kill (); $Naming->Kill (); unlink $namingior; diff --git a/TAO/orbsvcs/tests/Notify/Blocking/notify.conf b/TAO/orbsvcs/tests/Notify/Blocking/notify.conf index b88b0efdfcc..b0e7e961b0e 100644 --- a/TAO/orbsvcs/tests/Notify/Blocking/notify.conf +++ b/TAO/orbsvcs/tests/Notify/Blocking/notify.conf @@ -1,4 +1,4 @@ ## $Id$ ## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1"
\ No newline at end of file +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1 -MTSourceEval"
\ No newline at end of file diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Notify_Sequence_Push_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Notify_Sequence_Push_Consumer.cpp index 7253a498a20..41cb60c6626 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Notify_Sequence_Push_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Notify_Sequence_Push_Consumer.cpp @@ -96,6 +96,7 @@ Notify_Sequence_Push_Consumer::push_structured_events ( ACE_DEBUG ((LM_DEBUG, "-------------------------\n")); this->count_++; + if (this->count_ > this->high_) { this->done_ = 2; @@ -112,5 +113,3 @@ Notify_Sequence_Push_Consumer::push_structured_events ( ACE_OS::sleep (1); } } - - diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Notify_Structured_Push_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Notify_Structured_Push_Consumer.cpp index e1de3435996..5a01d3261b2 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Notify_Structured_Push_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Notify_Structured_Push_Consumer.cpp @@ -44,7 +44,7 @@ Notify_Structured_Push_Consumer::connect ( properties[0].name = CORBA::string_dup (CosNotification::DiscardPolicy); properties[0].value <<= this->discard_policy_; properties[1].name = CORBA::string_dup (CosNotification::MaxEventsPerConsumer); - properties[1].value <<= (CORBA::Long)10; + properties[1].value <<= (CORBA::Long)this->expected_; this->proxy_supplier_->set_qos (properties); this->proxy_supplier_->connect_structured_push_consumer (objref.in () @@ -98,4 +98,3 @@ Notify_Structured_Push_Consumer::push_structured_event ( ACE_OS::sleep (1); } } - diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp index e0e9a6098a7..0d80d0c0a55 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.cpp @@ -19,8 +19,8 @@ static const char* ior = "file://supplier.ior"; static CORBA::Short discard_policy = CosNotification::FifoOrder; -static unsigned int low = 10; -static unsigned int high = 13; +static unsigned int low = 2; +static unsigned int high = 20; // ****************************************************************** // Subroutine Section @@ -199,7 +199,7 @@ int main (int argc, char* argv[]) // See if we can get any more events if (client.done ()) { - ACE_OS::sleep (3); + ACE_OS::sleep (1); try_count++; if (try_count >= try_max) break; diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.dsp b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.dsp index ce49193dee1..cb5c8dd3c22 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.dsp +++ b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Consumer.dsp @@ -50,7 +50,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 TAO_NotifyTests.lib TAO_ETCL.lib TAO_CosNotification.lib TAO_CosNaming.lib TAO_Svc_Utils.lib TAO_PortableServer.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /out:"Release/Sequence_Consumer.exe" /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
+# ADD LINK32 TAO_NotifyTests.lib TAO_ETCL.lib TAO_CosNotification.lib TAO_CosNaming.lib TAO_Svc_Utils.lib TAO_PortableServer.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
!ELSEIF "$(CFG)" == "Discarding Sequence Consumer - Win32 Debug"
@@ -65,8 +65,8 @@ LINK32=link.exe # PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\\" /I "..\..\..\..\..\\" /I "..\lib" /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\\" /I "..\..\..\..\..\\" /I "..\lib" /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@@ -74,7 +74,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAO_NotifyTestsd.lib TAO_ETCLd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"Sequence_Consumer.exe" /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
+# ADD LINK32 TAO_NotifyTestsd.lib TAO_ETCLd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
!ENDIF
@@ -87,10 +87,6 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
-SOURCE=.\Sequence_Consumer.cpp
-# End Source File
-# Begin Source File
-
SOURCE=.\common.cpp
# End Source File
# Begin Source File
@@ -105,6 +101,10 @@ SOURCE=.\goS.cpp SOURCE=.\Notify_Sequence_Push_Consumer.cpp
# End Source File
+# Begin Source File
+
+SOURCE=.\Sequence_Consumer.cpp
+# End Source File
# End Group
# Begin Group "Header Files"
@@ -151,7 +151,7 @@ SOURCE=.\go.idl InputPath=.\go.idl
InputName=go
-"$(InputName)C.h": $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\..\..\bin\Release\tao_idl -Ge 1 $(InputName).idl
# End Custom Build
@@ -162,7 +162,7 @@ InputName=go InputPath=.\go.idl
InputName=go
-"$(InputName)C.h": $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\..\..\bin\tao_idl -Ge 1 $(InputName).idl
# End Custom Build
diff --git a/TAO/orbsvcs/tests/Notify/Discarding/notify.conf b/TAO/orbsvcs/tests/Notify/Discarding/notify.conf index b88b0efdfcc..f64fecac0c5 100644 --- a/TAO/orbsvcs/tests/Notify/Discarding/notify.conf +++ b/TAO/orbsvcs/tests/Notify/Discarding/notify.conf @@ -1,4 +1,4 @@ ## $Id$ ## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1"
\ No newline at end of file +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1"
\ No newline at end of file diff --git a/TAO/orbsvcs/tests/Notify/MT_Dispatching/notify_mtdispatching.conf b/TAO/orbsvcs/tests/Notify/MT_Dispatching/notify_mtdispatching.conf index c49c90c962a..0492d996d89 100644 --- a/TAO/orbsvcs/tests/Notify/MT_Dispatching/notify_mtdispatching.conf +++ b/TAO/orbsvcs/tests/Notify/MT_Dispatching/notify_mtdispatching.conf @@ -1,4 +1,4 @@ ## $Id$ ## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 2"
\ No newline at end of file +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 2" diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.cpp index 4be9ad43668..08f54a6cddb 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.cpp @@ -7,13 +7,11 @@ Notify_Sequence_Push_Consumer::Notify_Sequence_Push_Consumer ( const char* name, CORBA::Short policy, - unsigned int low, - unsigned int high, + unsigned int expected, CORBA::Boolean& done) : name_ (name), order_policy_ (policy), - low_ (low), - high_ (high), + expected_ (expected), count_ (0), done_ (done) { @@ -69,126 +67,123 @@ Notify_Sequence_Push_Consumer::push_structured_events ( { static long previous = 0; static CORBA::Boolean first = 1; - // Since the Notification Service begins to dispatch before all the - // events are queued, the first 2 events are not in the "expected" - // order. - static const unsigned int expected_out_of_order = 2 * 4; - if (this->count_ >= expected_out_of_order) - { - CORBA::ULong length = events.length (); + CORBA::ULong length = events.length (); - ACE_DEBUG ((LM_DEBUG, "Received %u events:\n", length)); + ACE_DEBUG ((LM_DEBUG, "Received %u events:\n", length)); - for (CORBA::ULong e = 0; e < length; e++) + for (CORBA::ULong e = 0; e < length; e++) + { + CORBA::ULong hlength = events[e].header.variable_header.length (); + for (CORBA::ULong hi = 0; hi < hlength; hi++) { - CORBA::ULong hlength = events[e].header.variable_header.length (); - for (CORBA::ULong hi = 0; hi < hlength; hi++) + ACE_DEBUG ((LM_DEBUG, + "%s = %s\n", + (const char*)events[e].header.variable_header[hi].name, + Any_String (events[e].header.variable_header[hi].value))); + if (this->order_policy_ == CosNotification::PriorityOrder) { - ACE_DEBUG ((LM_DEBUG, - "%s = %s\n", - (const char*)events[e].header.variable_header[hi].name, - Any_String (events[e].header.variable_header[hi].value))); - if (this->order_policy_ == CosNotification::PriorityOrder) + if (ACE_OS::strcmp ( + events[e].header.variable_header[hi].name, "Priority") == 0) { - if (ACE_OS::strcmp ( - events[e].header.variable_header[hi].name, "Priority") == 0) + CORBA::Short current; + events[e].header.variable_header[hi].value >>= current; + if (first) { - CORBA::Short current; - events[e].header.variable_header[hi].value >>= current; - if (first) - { - first = 0; - } - else + first = 0; + } + else + { + if (current > + ACE_static_cast (CORBA::Short, previous)) { - if (current > - ACE_static_cast (CORBA::Short, previous)) - { - this->done_ = 1; - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: Priority Ordering failed\n"))); - } + this->done_ = 1; + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("ERROR: Priority Ordering failed\n"))); } - previous = ACE_static_cast (long, current); } + previous = ACE_static_cast (long, current); } - else if (this->order_policy_ == CosNotification::DeadlineOrder) + } + else if (this->order_policy_ == CosNotification::DeadlineOrder) + { + if (ACE_OS::strcmp ( + events[e].header.variable_header[hi].name, "Timeout") == 0) { - if (ACE_OS::strcmp ( - events[e].header.variable_header[hi].name, "Timeout") == 0) + TimeBase::TimeT current; + events[e].header.variable_header[hi].value >>= current; + if (first) { - TimeBase::TimeT current; - events[e].header.variable_header[hi].value >>= current; - if (first) - { - first = 0; - } - else + first = 0; + } + else + { + if (current < + ACE_static_cast (TimeBase::TimeT, previous)) { - if (current < - ACE_static_cast (TimeBase::TimeT, previous)) - { - this->done_ = 1; - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: Deadline Ordering failed\n"))); - } + this->done_ = 1; + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("ERROR: Deadline Ordering failed\n"))); } + } # if defined (ACE_CONFIG_WIN32_H) - previous = ACE_static_cast (long, current); + previous = ACE_static_cast (long, current); # else - // Convert ACE_ULong_Long to 32-bit integer - previous = (current / 1); + // Convert ACE_ULong_Long to 32-bit integer + previous = (current / 1); # endif /* ACE_CONFIG_WIN32_H */ - } } } + } - CORBA::ULong flength = events[e].filterable_data.length (); - for (CORBA::ULong i = 0; i < flength; i++) + CORBA::ULong flength = events[e].filterable_data.length (); + for (CORBA::ULong i = 0; i < flength; i++) + { + ACE_DEBUG ((LM_DEBUG, + "%s = %s\n", + (const char*)events[e].filterable_data[i].name, + Any_String (events[e].filterable_data[i].value))); + if (this->order_policy_ == CosNotification::FifoOrder) { - ACE_DEBUG ((LM_DEBUG, - "%s = %s\n", - (const char*)events[e].filterable_data[i].name, - Any_String (events[e].filterable_data[i].value))); - if (this->order_policy_ == CosNotification::FifoOrder) + if (ACE_OS::strcmp (events[e].filterable_data[i].name, "enum") == 0) { - if (ACE_OS::strcmp (events[e].filterable_data[i].name, "enum") == 0) + CORBA::ULong current; + events[e].filterable_data[i].value >>= current; + if (first) { - CORBA::ULong current; - events[e].filterable_data[i].value >>= current; - if (first) - { - first = 0; - } - else + first = 0; + } + else + { + if (current < + ACE_static_cast (CORBA::ULong, previous)) { - if (current < - ACE_static_cast (CORBA::ULong, previous)) - { - this->done_ = 1; - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: FIFO Ordering failed.\n"))); - } + this->done_ = 1; + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("ERROR: FIFO Ordering failed.\n"))); } - previous = ACE_static_cast (long, current); } + previous = ACE_static_cast (long, current); } } } - ACE_DEBUG ((LM_DEBUG, - "-------------------------\n")); } - this->count_++; - if (this->count_ > this->high_) + ACE_DEBUG ((LM_DEBUG, + "-------------------------\n")); + + this->count_+= events.length (); + + if (this->count_ > this->expected_) { - this->done_ = 2; + this->done_ = 1; + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sequence Consumer (%P|%t): ERROR: too " "many events received.\n"))); + } - else if (this->count_ == this->low_) + else if (this->count_ == this->expected_) { this->done_ = 1; } @@ -197,5 +192,3 @@ Notify_Sequence_Push_Consumer::push_structured_events ( ACE_OS::sleep (1); } } - - diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.h b/TAO/orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.h index 0cf74e4e896..f90c939165b 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.h +++ b/TAO/orbsvcs/tests/Notify/Ordering/Notify_Sequence_Push_Consumer.h @@ -26,8 +26,7 @@ class Notify_Sequence_Push_Consumer: public TAO_Notify_SequencePushConsumer public: Notify_Sequence_Push_Consumer (const char* name, CORBA::Short policy, - unsigned int low, - unsigned int high, + unsigned int expected_count, CORBA::Boolean& done); void connect (CosNotifyChannelAdmin::ConsumerAdmin_ptr consumer_admin @@ -41,8 +40,8 @@ protected: ACE_CString name_; CORBA::Short order_policy_; - unsigned int low_; - unsigned int high_; + unsigned int expected_; + unsigned int count_; CORBA::Boolean& done_; }; diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Consumer.cpp index af732c75251..a815bdf4d98 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Consumer.cpp @@ -23,8 +23,8 @@ static const char* ior = "file://supplier.ior"; static CORBA::Short order_policy = CosNotification::FifoOrder; -static unsigned int low = 19; -static unsigned int high = 20; +static unsigned int expected = 6*16; // Look in Sequence_Supplier.cpp, the supplier is sending 6*16 events. +static unsigned int high = expected + 4; // If we go over the expected we're getting more events. // ****************************************************************** // Subroutine Section @@ -51,7 +51,7 @@ Consumer_Client::parse_args (int argc, char *argv[]) break; case 'l': - low = ACE_OS::atoi (get_opts.optarg); + expected = ACE_OS::atoi (get_opts.optarg); break; case 'h': @@ -131,8 +131,7 @@ create_consumers (CosNotifyChannelAdmin::ConsumerAdmin_ptr admin, ACE_NEW_THROW_EX (consumer_1, Notify_Sequence_Push_Consumer ("consumer1", order_policy, - low, - high, + expected, client->done ()), CORBA::NO_MEMORY ()); @@ -207,13 +206,13 @@ int main (int argc, char* argv[]) } unsigned int try_count = 0; - unsigned int try_max = (high - low) * 2; + unsigned int try_max = (high - expected) * 2; while (client.done () <= 1) { // See if we can get any more events if (client.done ()) { - ACE_OS::sleep (3); + ACE_OS::sleep (1); try_count++; if (try_count >= try_max) break; diff --git a/TAO/orbsvcs/tests/Notify/Ordering/notify.conf b/TAO/orbsvcs/tests/Notify/Ordering/notify.conf index b88b0efdfcc..7a531569a88 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/notify.conf +++ b/TAO/orbsvcs/tests/Notify/Ordering/notify.conf @@ -1,4 +1,4 @@ ## $Id$ ## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1"
\ No newline at end of file +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1" diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/notify.conf b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/notify.conf index b88b0efdfcc..7a531569a88 100644 --- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/notify.conf +++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/notify.conf @@ -1,4 +1,4 @@ ## $Id$ ## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1"
\ No newline at end of file +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1" diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Consumer.cpp index acebac21499..439d70d78d7 100644 --- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/Sequence_Consumer.cpp @@ -106,7 +106,7 @@ create_consumeradmin (CosNotifyChannelAdmin::EventChannel_ptr ec { CosNotifyChannelAdmin::AdminID adminid = 0; CosNotifyChannelAdmin::ConsumerAdmin_var admin = - ec->new_for_consumers (CosNotifyChannelAdmin::OR_OP, + ec->new_for_consumers (CosNotifyChannelAdmin::AND_OP, adminid ACE_ENV_ARG_PARAMETER); diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/notify.conf b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/notify.conf index c944c732f33..d953e04618e 100644 --- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/notify.conf +++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/notify.conf @@ -1,4 +1,5 @@ ## $Id$ ## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1" +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1" + diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Consumer.dsp b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Consumer.dsp index e8c3144fb6c..845a5d474ff 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Consumer.dsp +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Consumer.dsp @@ -76,7 +76,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAO_NotifyTestsd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"Consumer.exe" /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
+# ADD LINK32 TAO_NotifyTestsd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"Structured_Consumer.exe" /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
!ENDIF
diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Supplier.dsp b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Supplier.dsp index f409423d024..33fb96fe189 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Supplier.dsp +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Filter_Supplier.dsp @@ -76,7 +76,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAO_NotifyTestsd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"Supplier.exe" /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
+# ADD LINK32 TAO_NotifyTestsd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"Structured_Supplier.exe" /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
!ENDIF
diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/notify.conf b/TAO/orbsvcs/tests/Notify/Structured_Filter/notify.conf index c944c732f33..fbe7d7f3a57 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Filter/notify.conf +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/notify.conf @@ -1,4 +1,3 @@ ## $Id$ -## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1" +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1" diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/run_test.pl b/TAO/orbsvcs/tests/Notify/Structured_Filter/run_test.pl index 68db0ee4452..739b6e0326a 100755 --- a/TAO/orbsvcs/tests/Notify/Structured_Filter/run_test.pl +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/run_test.pl @@ -22,9 +22,9 @@ $TS = new PerlACE::Process ("../../../Notify_Service/Notify_Service", "localhost:$port/NameService " . "-IORoutput $notifyior -ORBSvcConf " . "$notify_conf" ); -$STS = new PerlACE::Process ("Supplier"); +$STS = new PerlACE::Process ("Structured_Supplier"); -$STC = new PerlACE::Process ("Consumer"); +$STC = new PerlACE::Process ("Structured_Consumer"); $args = " -ORBInitRef NameService=iioploc://localhost:$port/NameService "; $cargs = "-f -n100 -c2 "; diff --git a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Multi_Filter_Consumer.dsp b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Multi_Filter_Consumer.dsp index 73240af2d1c..96bf406c050 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Multi_Filter_Consumer.dsp +++ b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Multi_Filter_Consumer.dsp @@ -76,7 +76,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAO_NotifyTestsd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"Consumer.exe" /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
+# ADD LINK32 TAO_NotifyTestsd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"Structured_Consumer.exe" /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
!ENDIF
diff --git a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Multi_Filter_Supplier.dsp b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Multi_Filter_Supplier.dsp index 3a855aec354..338ba63d656 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Multi_Filter_Supplier.dsp +++ b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Multi_Filter_Supplier.dsp @@ -76,7 +76,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAO_NotifyTestsd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"Supplier.exe" /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
+# ADD LINK32 TAO_NotifyTestsd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /out:"Structured_Supplier.exe" /pdbtype:sept /libpath:"..\lib" /libpath:"..\..\..\orbsvcs" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\ace"
!ENDIF
diff --git a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/notify.conf b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/notify.conf index c944c732f33..63aae5f52e2 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/notify.conf +++ b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/notify.conf @@ -1,4 +1,4 @@ ## $Id$ -## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1" +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1" + diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf index 53289ffd647..1901a01c584 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/notify.conf @@ -1,5 +1,6 @@ ## $Id$ ## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1" +static Notify_Default_Event_Manager_Objects_Factory "-MTDispatching -DispatchingThreads 1" + diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen.dsp b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen.dsp index c264ff12331..36bf594cbe0 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen.dsp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen.dsp @@ -51,7 +51,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib TAO_ETCL.lib TAO_CosNotification.lib TAO_CosNaming.lib TAO_Svc_Utils.lib /nologo /subsystem:console /incremental:yes /map /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\orbsvcs" /libpath:"..\..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\..\tao" /libpath:"..\..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\..\ace"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib TAO_ETCL.lib TAO_CosNotification.lib TAO_CosNaming.lib TAO_Svc_Utils.lib /nologo /subsystem:console /incremental:yes /map /debug /machine:I386 /out:"Release/RedGreen_Test.exe" /pdbtype:sept /libpath:"..\..\..\..\orbsvcs" /libpath:"..\..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\..\tao" /libpath:"..\..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\..\ace"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "Performance RedGreen - Win32 Debug"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAOd.lib TAO_PortableServerd.lib TAO_ETCLd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib /nologo /subsystem:console /map /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\orbsvcs" /libpath:"..\..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\..\tao" /libpath:"..\..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\..\ace"
+# ADD LINK32 aced.lib TAOd.lib TAO_PortableServerd.lib TAO_ETCLd.lib TAO_CosNotificationd.lib TAO_CosNamingd.lib TAO_Svc_Utilsd.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"RedGreen_Test.exe" /pdbtype:sept /libpath:"..\..\..\..\orbsvcs" /libpath:"..\..\..\..\orbsvcs\ETCL" /libpath:"..\..\..\..\..\tao" /libpath:"..\..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\..\..\ace"
# SUBTRACT LINK32 /pdb:none
!ENDIF
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf index d839d4a0250..8d8b52818ef 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/listener.conf @@ -1,5 +1,5 @@ -# static Notify_Default_Event_Manager_Objects_Factory "-AllocateTaskperProxy -MTListenerEval -ListenerThreads 1" ## $Id$ +static Notify_Default_Event_Manager_Objects_Factory "-AllocateTaskperProxy -MTListenerEval -ListenerThreads 1" + + -## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 1" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf index 781ea9a8267..ad55a75a73f 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/lookup.conf @@ -1,5 +1,2 @@ -##static Notify_Default_Event_Manager_Objects_Factory "-AllocateTaskperProxy -MTLookup -LookupThreads 2" ## $Id$ - -## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "-DispatchingThreads 2" +static Notify_Default_Event_Manager_Objects_Factory "-MTLookup -LookupThreads 2"
\ No newline at end of file diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf index 5a30fde66db..d4399938cec 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/reactive.conf @@ -1,4 +1,3 @@ ## $Id$ +static Notify_Default_Event_Manager_Objects_Factory "" -## Load the static Cos Notification Service -static TAO_NS_CosNotification_Service "" diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl index 6d3ea13963f..e327e41e671 100755 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl @@ -12,7 +12,6 @@ $experiment_timeout = 60; $startup_timeout = 60; $notifyior = PerlACE::LocalFile ("notify.ior"); $namingior = PerlACE::LocalFile ("naming.ior"); -$experiment = "RedGreen"; $status = 0; unlink $notifyior; @@ -20,50 +19,58 @@ unlink $namingior; $Naming = new PerlACE::Process ("../../../../Naming_Service/Naming_Service", "-o $namingior"); -$Notification = new PerlACE::Process ("../../../../Notify_Service/Notify_Service", - "-ORBInitRef NameService=file://$namingior " . - "-IORoutput $notifyior"); + +$test = new PerlACE::Process ("RedGreen", + "-ORBInitRef NameService=file://$namingior"); + @test_configs = ( + "reactive.conf", "lookup.conf", - "", + "listener.conf", ); $Naming->Spawn (); -if (PerlACE::waitforfile_timed ($namingior, $startup_timeout) == -1) { +if (PerlACE::waitforfile_timed ($namingior, $startup_timeout) == -1) + { print STDERR "ERROR: waiting for the naming service to start\n"; $Naming->Kill (); exit 1; -} - -$Notification->Spawn (); - -if (PerlACE::waitforfile_timed ($notifyior, $startup_timeout) == -1) { - print STDERR "ERROR: waiting for the notify service to start\n"; - $Notification->Kill (); - $Naming->Kill (); - exit 1; -} + } for $config (@test_configs) { - print STDERR "\nTesting $experiment with config file = $config ....\n\n"; - $test = new PerlACE::Process ("./$experiment", - "-ORBInitRef NameService=file://$namingior -ORBSvcConf $config"); + print STDERR "\nTesting Notification Service with config file = $config ....\n\n"; + + $Notification = + new PerlACE::Process ("../../../../Notify_Service/Notify_Service", + "-ORBInitRef NameService=file://$namingior " . + "-IORoutput $notifyior " . + "-ORBSvcConf $config"); + + $Notification->Spawn (); + + if (PerlACE::waitforfile_timed ($notifyior, $startup_timeout) == -1) { + print STDERR "ERROR: waiting for the notify service to start\n"; + $Notification->Kill (); + $Naming->Kill (); + exit 1; + } + $test->Spawn (); $status = $test->WaitKill ($experiment_timeout); if ($status != 0) - { + { print STDERR "ERROR: $name returned $status\n"; break; - } - } + } + $Notification->Kill (); + } -$Notification->Kill (); $Naming->Kill (); unlink $namingior; |