summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-04 21:54:56 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-04 21:54:56 +0000
commit49fbf9581e5ec613d80ae222d6dd5eecede6d248 (patch)
treebfb27d074f323861a2d6134c76af65a110eceea6
parent349626591b4feafa7e2a9f8926842ae596c4e3d2 (diff)
downloadATCD-49fbf9581e5ec613d80ae222d6dd5eecede6d248.tar.gz
ChangeLogTag:Sun Oct 4 16:37:23 1998 Carlos O'Ryan <coryan@tango.cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-98c41
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp359
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Event_Channel.h7
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp676
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.h239
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.i3
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/Makefile379
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/README9
-rwxr-xr-xTAO/orbsvcs/tests/EC_Basic/run_test.pl10
-rw-r--r--TAO/orbsvcs/tests/Makefile1
10 files changed, 1522 insertions, 202 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index bb10ee6c111..2f6bcd87dde 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,6 +1,33 @@
-Sun Oct 4 15:40:05 1998 Balachandra Natarajan <bala@lambada.cs.wustl.edu>
-
- * Any.cpp
+Sun Oct 4 16:37:23 1998 Carlos O'Ryan <coryan@tango.cs.wustl.edu>
+
+ * orbsvcs/orbsvcs/Event/Event_Channel.h:
+ * orbsvcs/orbsvcs/Event/Event_Channel.cpp:
+ It is now possible to have several suppliers with the same ID on
+ the same Event Channel.
+ I also fixed a bug with the supplier reconnections: if a
+ consumer was filtering by source it wouldn't receive the events
+ if the supplier disconnected and connected again. Thanks to
+ Thomas Venturella <tventurell@mdc.com> for some his hints on how
+ to fix this.
+ Fixed some problems with exception handling and propagation.
+
+ * orbsvcs/tests/Makefile:
+ * orbsvcs/tests/EC_Basic/Makefile:
+ * orbsvcs/tests/EC_Basic/README:
+ * orbsvcs/tests/EC_Basic/run_test.pl:
+ * orbsvcs/tests/EC_Basic/EC_Basic.h:
+ * orbsvcs/tests/EC_Basic/EC_Basic.i:
+ * orbsvcs/tests/EC_Basic/EC_Basic.cpp:
+ Added a new test for the Event Channel, this will grow to become
+ the main regression test for the EC, at this point it only tests
+ the use of several suppliers with the same ID.
+
+ * docs/releasenotes/TODO.html:
+ Update the file.
+
+Sun Oct 4 15:40:05 1998 Balachandra Natarajan <bala@lambada.cs.wustl.edu>
+
+ * Any.cpp
Anticipated fix for break in build. The TypeCode_ptr was not
completely qualified (as CORBA::TypeCode_ptr).
@@ -42,9 +69,11 @@ Sat Oct 3 20:20:14 1998 Alexander Babu Arulanthu <alex@cs.wustl.edu>
GPERF. Also extended testing for GPERF's existance in the case of
Binary Search strategy also.
-Sat Oct 3 19:35:05 1998 Balachandra Natarajan <bala@lambada.cs.wustl.edu>
- * Any.cpp
- Fix for memeory leaks in extraction.
+Sat Oct 3 19:35:05 1998 Balachandra Natarajan <bala@lambada.cs.wustl.edu>
+
+ * Any.cpp
+ Fix for memeory leaks in extraction.
+
Sat Oct 3 15:16:05 1998 Marina Igorevna Spivak <marina@mambo.cs.wustl.edu>
* orbsvcs/tests/Simple_Naming/client.cpp
diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp
index ee1aee6d32a..ec8c4f21fb5 100644
--- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ace/Service_Config.h"
+#include "ace/Auto_Ptr.h"
#include "orbsvcs/Scheduler_Factory.h"
#include "orbsvcs/Event_Utilities.h"
@@ -89,37 +90,22 @@ ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Event_Channel_Timeprobe_Description,
// ************************************************************
-static RtecScheduler::OS_Priority
-Preemption_Priority (RtecScheduler::handle_t rtinfo)
+static RtecScheduler::Preemption_Priority
+Preemption_Priority (RtecScheduler::handle_t rtinfo,
+ CORBA::Environment &_env)
{
RtecScheduler::OS_Priority thread_priority;
RtecScheduler::Preemption_Subpriority subpriority;
RtecScheduler::Preemption_Priority preemption_priority;
- TAO_TRY
- {
- ACE_TIMEPROBE (TAO_EVENT_CHANNEL_PREEMPTION_PRIORITY_PRIORITY_REQUESTED);
- ACE_Scheduler_Factory::server ()->priority
- (rtinfo,
- thread_priority,
- subpriority,
- preemption_priority,
- TAO_TRY_ENV);
- TAO_CHECK_ENV
- ACE_TIMEPROBE (TAO_EVENT_CHANNEL_CONNECTED_PRIORITY_OBTAINED);
- }
- TAO_CATCH (RtecScheduler::UNKNOWN_TASK, ex_ut)
- {
- ACE_ERROR_RETURN ((LM_ERROR, "UNKNOWN_TASK %p.\n",
- "Preemption_Priority"), 0);
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR, "Unexpected exception %p.\n",
- "Preemption_Priority"), 0);
-
- }
- TAO_ENDTRY;
+ ACE_TIMEPROBE (TAO_EVENT_CHANNEL_PREEMPTION_PRIORITY_PRIORITY_REQUESTED);
+ ACE_Scheduler_Factory::server ()->priority
+ (rtinfo,
+ thread_priority,
+ subpriority,
+ preemption_priority,
+ _env);
+ TAO_CHECK_ENV_RETURN (_env, 0);
return preemption_priority;
}
@@ -163,17 +149,28 @@ public:
// This is so the dispatching module can query us as a dispatch
// request to get the appropriate preemption priority.
ACE_ES_Dependency_Iterator iter (consumer->qos ().dependencies);
+ CORBA::Environment env;
+ RtecScheduler::Preemption_Priority p =
+ ACE_Scheduler_MIN_PREEMPTION_PRIORITY;
while (iter.advance_dependency () == 0)
{
RtecEventComm::EventType &type = (*iter).event.header.type;
+
if (type != ACE_ES_GLOBAL_DESIGNATOR &&
type != ACE_ES_CONJUNCTION_DESIGNATOR &&
type != ACE_ES_DISJUNCTION_DESIGNATOR)
{
- if (rt_info_ == 0 ||
- ::Preemption_Priority ((*iter).rt_info) <
- ::Preemption_Priority (rt_info_))
- rt_info_ = (*iter).rt_info;
+ env.clear ();
+ RtecScheduler::Preemption_Priority q =
+ ::Preemption_Priority ((*iter).rt_info, env);
+ if (env.exception () != 0)
+ continue;
+ if (rt_info_ == 0)
+ {
+ this->rt_info_ = ((*iter).rt_info);
+ p = q;
+ continue;
+ }
}
}
}
@@ -436,22 +433,14 @@ ACE_Push_Consumer_Proxy::push (const RtecEventComm::EventSet &events,
{
ACE_DEBUG ((LM_DEBUG,
"EC (%t) Push to disconnected consumer %s\n",
- ::ACE_ES_Consumer_Name (this->qos ())));
+ ::ACE_ES_Consumer_Name (this->qos (),
+ _env)));
// ACE_ES_DEBUG_ST (::dump_sequence (events));
return;
}
- TAO_TRY
- {
- push_consumer_->push (events, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCH (CORBA::SystemException, se)
- {
- ACE_ERROR ((LM_ERROR, "system exception.\n"));
- TAO_RETHROW;
- }
- TAO_ENDTRY;
+ push_consumer_->push (events, _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
}
void
@@ -942,8 +931,12 @@ ACE_ES_Subscription_Info::remove (SourceID_Map &source_subscribers,
// @@ Should probably remove the supplier from the consumers caller
// list.
- // If the set is empty, remove it from the type collection.
#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->size () == 0)
{
Subscriber_Set *removed_subscribers;
@@ -1121,6 +1114,17 @@ ACE_ES_Consumer_Module::shutdown_request (ACE_ES_Dispatch_Request *request)
// sc->consumer ()));
CORBA::Boolean dont_update = sc->consumer ()->qos ().is_gateway;
+
+ // Deactivate the consumer proxy
+ PortableServer::POA_var poa =
+ sc->consumer ()->_default_POA (TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+ PortableServer::ObjectId_var id =
+ poa->servant_to_id (sc->consumer (), TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+ poa->deactivate_object (id.in (), TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
// Delete the consumer proxy.
delete sc->consumer ();
@@ -1178,9 +1182,18 @@ ACE_ES_Consumer_Module::shutdown (void)
iter.advance ())
{
(*proxy)->shutdown ();
- // @@ Cannnot use CORBA::release (*proxy), since it is a servant.
- delete *proxy;
-
+ // @@ Cannnot use CORBA::release (*proxy), since it is a
+ // servant.
+ // Deactivate the proxy...
+ PortableServer::POA_var poa =
+ (*proxy)->_default_POA (env);
+ TAO_CHECK_ENV_RETURN_VOID (env);
+ PortableServer::ObjectId_var id =
+ poa->servant_to_id (*proxy, env);
+ TAO_CHECK_ENV_RETURN_VOID (env);
+ poa->deactivate_object (id.in (), env);
+ TAO_CHECK_ENV_RETURN_VOID (env);
+
// Remove the consumer from our list.
{
ACE_ES_GUARD ace_mon (lock_);
@@ -1190,6 +1203,8 @@ ACE_ES_Consumer_Module::shutdown (void)
if (all_consumers_.remove (*proxy) == -1)
ACE_ERROR ((LM_ERROR, "%p Failed to remove consumer.\n", "ACE_ES_Consumer_Module::shutdown"));
}
+
+ delete *proxy;
}
}
@@ -1283,10 +1298,11 @@ ACE_ES_Consumer_Module::push (const ACE_ES_Dispatch_Request *request,
RtecEventChannelAdmin::ProxyPushSupplier_ptr
ACE_ES_Consumer_Module::obtain_push_supplier (CORBA::Environment &_env)
{
- ACE_Push_Consumer_Proxy *new_consumer = new ACE_Push_Consumer_Proxy (this);
+ auto_ptr<ACE_Push_Consumer_Proxy> new_consumer =
+ new ACE_Push_Consumer_Proxy (this);
// Get a new supplier proxy object.
- if (new_consumer == 0)
+ if (new_consumer.get () == 0)
{
ACE_ERROR ((LM_ERROR, "ACE_EventChannel"
"::obtain_push_supplier failed.\n"));
@@ -1294,19 +1310,16 @@ ACE_ES_Consumer_Module::obtain_push_supplier (CORBA::Environment &_env)
}
{
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- {
- delete new_consumer;
- TAO_THROW_RETURN (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR(), 0);
- }
+ TAO_GUARD_THROW_RETURN (ACE_ES_MUTEX, ace_mon, this->lock_, 0, _env,
+ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR());
- if (all_consumers_.insert (new_consumer) == -1)
+ if (all_consumers_.insert (new_consumer.get ()) == -1)
ACE_ERROR ((LM_ERROR, "ACE_ES_Consumer_Module insert failed.\n"));
}
- // Return the CORBA object reference to the new supplier proxy.
- return new_consumer->get_ref (_env);
+ // Return the CORBA object reference to the new supplier proxy,
+ // there is no need to hold a pointer, it is now help in the map...
+ return new_consumer.release ()->get_ref (_env);
}
void
@@ -1424,7 +1437,8 @@ ACE_ES_Correlation_Module::disconnecting (ACE_Push_Consumer_Proxy *consumer,
CORBA::Environment &)
{
if (consumer->correlation ().disconnecting () == -1)
- ACE_ERROR ((LM_ERROR, "ACE_ES_Correlation_Module::disconnecting failed.\n"));
+ ACE_ERROR ((LM_ERROR,
+ "ACE_ES_Correlation_Module::disconnecting failed.\n"));
}
int
@@ -2555,82 +2569,71 @@ ACE_ES_Subscription_Module::subscribe_source (ACE_ES_Consumer_Rep *consumer,
// -supplier-. Add the -consumer- to the correct supplier proxy.
Supplier_Iterator iter (all_suppliers_);
- int success = -1;
-
for (ACE_Push_Supplier_Proxy **proxy = 0;
iter.next (proxy) != 0;
iter.advance ())
{
// Operator == checks if <proxy> is a proxy for <supplier>.
- if ((**proxy) == source)
- {
- ACE_ES_WGUARD mon ((*proxy)->subscription_info ().lock_);
+ if (!((**proxy) == source))
+ continue;
- ACE_ES_Subscription_Info::Subscriber_Set &set =
- (*proxy)->subscription_info ().source_subscribers_;
+ ACE_ES_WGUARD mon ((*proxy)->subscription_info ().lock_);
- // Insert the consumer to the supplier's subscription set for
- // the type.
- int insert_result = set.insert (consumer);
- switch (insert_result)
- {
- case -1:
- // Error.
- ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
- "Subscription Module::subscribe_source"), -1);
- case 0:
- default:
+ ACE_ES_Subscription_Info::Subscriber_Set &set =
+ (*proxy)->subscription_info ().source_subscribers_;
+
+ // Insert the consumer to the supplier's subscription set for
+ // the type.
+ int insert_result = set.insert (consumer);
+ switch (insert_result)
+ {
+ case -1:
+ // Error.
+ ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
+ "Subscription Module::subscribe_source"), -1);
+ case 1:
+ // Already there.
+ break;
+ case 0:
+ default:
+ {
+ // Increment the consumer rep's reference count.
+ consumer->_duplicate ();
+
+ // Add each of the supplier's dependency infos to the
+ // consumer's dependency list.
+ ACE_ES_Subscription_Info::Subscriber_Map_Iterator iter2
+ ((*proxy)->subscription_info ().type_subscribers_);
+
+ // Delete all type collections.
+ for (ACE_ES_Subscription_Info::Subscriber_Map_Entry *temp = 0;
+ iter2.next (temp) != 0;
+ iter2.advance ())
{
- // Increment the consumer rep's reference count.
- consumer->_duplicate ();
- // Success.
- // Add each of the supplier's dependency infos to the
- // consumer's dependency list.
- ACE_ES_Subscription_Info::Subscriber_Map_Iterator iter2
- ((*proxy)->subscription_info ().type_subscribers_);
-
- // Delete all type collections.
- for (ACE_ES_Subscription_Info::Subscriber_Map_Entry *temp = 0;
- iter2.next (temp) != 0;
- iter2.advance ())
+ TAO_TRY
{
- TAO_TRY
- {
- ACE_Scheduler_Factory::server()->add_dependency
- (consumer->dependency()->rt_info,
- temp->int_id_->dependency_info_->rt_info,
- temp->int_id_->dependency_info_->number_of_calls,
- RtecScheduler::ONE_WAY_CALL,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("error adding dependency");
- return -1;
- }
- TAO_ENDTRY;
+ ACE_Scheduler_Factory::server()->add_dependency
+ (consumer->dependency()->rt_info,
+ temp->int_id_->dependency_info_->rt_info,
+ temp->int_id_->dependency_info_->number_of_calls,
+ RtecScheduler::ONE_WAY_CALL,
+ TAO_TRY_ENV);
+ TAO_CHECK_ENV;
}
+ TAO_CATCHANY
+ {
+ TAO_TRY_ENV.print_exception ("error adding dependency");
+ return -1;
+ }
+ TAO_ENDTRY;
}
-
- case 1:
- // Already there.
- success = 0;
- break;
- }
+ }
}
}
- // 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,
- source);
- else
- return success;
+ return ACE_ES_Subscription_Info::insert_or_allocate (source_subscribers_,
+ consumer,
+ source);
}
// Step through all Supplier Proxies. For each proxy, if it generates
@@ -3126,24 +3129,21 @@ ACE_ES_Supplier_Module::shutdown (void)
RtecEventChannelAdmin::ProxyPushConsumer_ptr
ACE_ES_Supplier_Module::obtain_push_consumer (CORBA::Environment &_env)
{
- ACE_Push_Supplier_Proxy *new_supplier = new ACE_Push_Supplier_Proxy (this);
+ auto_ptr<ACE_Push_Supplier_Proxy> new_supplier =
+ new ACE_Push_Supplier_Proxy (this);
- if (new_supplier == 0)
+ if (new_supplier.get () == 0)
TAO_THROW_RETURN (CORBA::NO_MEMORY (CORBA::COMPLETED_NO), 0);
{
- ACE_ES_GUARD ace_mon (lock_);
- if (ace_mon.locked () == 0)
- {
- delete new_supplier;
- TAO_THROW_RETURN (RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR(), 0);
- }
+ TAO_GUARD_THROW_RETURN (ACE_ES_MUTEX, ace_mon, this->lock_, 0, _env,
+ RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR());
- if (all_suppliers_.insert (new_supplier) == -1)
+ if (all_suppliers_.insert (new_supplier.get ()) == -1)
ACE_ERROR ((LM_ERROR, "ACE_ES_Supplier_Module insert failed.\n"));
}
- return new_supplier->get_ref (_env);
+ return new_supplier.release ()->get_ref (_env);
}
void
@@ -3152,51 +3152,23 @@ ACE_ES_Supplier_Module::push (ACE_Push_Supplier_Proxy *proxy,
CORBA::Environment &_env)
{
// ACE_DEBUG ((LM_DEBUG, "EC (%t) Supplier_Module::push\n"));
- TAO_TRY
- {
- for (CORBA::ULong i = 0; i < event.length(); ++i)
- {
- ACE_ES_Event_Container *temp =
- new ACE_ES_Event_Container (event[i]);
- //RtecEventComm::Event *temp = new RtecEventComm::Event (event);
-
- if (temp == 0)
- TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
-
- // This will guarantee that release gets called when we exit
- // the scope.
- ACE_ES_Event_Container_var event_copy (temp);
- temp->_release ();
- ACE_TIMEPROBE (TAO_EVENT_CHANNEL_DELIVER_TO_SUPPLIER_MODULE_THRU_SUPPLIER_PROXY);
- up_->push (proxy, event_copy, TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- }
- TAO_CATCH (RtecEventChannelAdmin::TypeError, t)
+ for (CORBA::ULong i = 0; i < event.length(); ++i)
{
- ACE_ERROR ((LM_ERROR, "%p Type Error.\n",
- "ACE_ES_Supplier_Module::push"));
- TAO_RETHROW;
- }
- TAO_CATCH (CORBA::NO_MEMORY, e)
- {
- ACE_ERROR ((LM_ERROR, "%p No Memory.\n",
- "ACE_ES_Supplier_Module::push"));
- TAO_RETHROW;
- }
- TAO_CATCH (CORBA::SystemException, e)
- {
- ACE_ERROR ((LM_ERROR, "%p CORBA System Exception.\n",
- "ACE_ES_Supplier_Module::push"));
- TAO_RETHROW;
- }
- TAO_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "ACE_ES_Supplier_Module::push: "
- "Unknown exception.\n"));
- TAO_RETHROW;
+ ACE_ES_Event_Container *temp =
+ new ACE_ES_Event_Container (event[i]);
+ //RtecEventComm::Event *temp = new RtecEventComm::Event (event);
+
+ if (temp == 0)
+ TAO_THROW (CORBA::NO_MEMORY (CORBA::COMPLETED_NO));
+
+ // This will guarantee that release gets called when we exit
+ // the scope.
+ ACE_ES_Event_Container_var event_copy (temp);
+ temp->_release ();
+ ACE_TIMEPROBE (TAO_EVENT_CHANNEL_DELIVER_TO_SUPPLIER_MODULE_THRU_SUPPLIER_PROXY);
+ up_->push (proxy, event_copy, _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
}
- TAO_ENDTRY;
}
void
@@ -3303,32 +3275,23 @@ TAO_EC_Timeout_Handler::handle_timeout (const ACE_Time_Value &,
// ************************************************************
const char *
-ACE_ES_Consumer_Name (const RtecEventChannelAdmin::ConsumerQOS &qos)
+ACE_ES_Consumer_Name (const RtecEventChannelAdmin::ConsumerQOS &qos,
+ CORBA::Environment &_env)
{
// The first dependency should designate a correlation group.
- TAO_TRY
- {
- ACE_FUNCTION_TIMEPROBE (TAO_EVENT_CHANNEL_CONSUMER_NAME_PRIORITY_REQUESTED);
-
- if (qos.dependencies.length () <= 1)
- return "no-name";
+ ACE_FUNCTION_TIMEPROBE (TAO_EVENT_CHANNEL_CONSUMER_NAME_PRIORITY_REQUESTED);
+ if (qos.dependencies.length () <= 1)
+ return "no-name";
- RtecScheduler::RT_Info* rt_info = ACE_Scheduler_Factory::server ()->get
- (qos.dependencies[1].rt_info, TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ RtecScheduler::RT_Info* rt_info = ACE_Scheduler_Factory::server ()->get
+ (qos.dependencies[1].rt_info, _env);
+ TAO_CHECK_ENV_RETURN (_env, 0);
- if (rt_info == 0)
- return "no-name";
+ if (rt_info == 0)
+ return "no-name";
- return rt_info->entry_point;
- }
- TAO_CATCHANY
- {
- return "no-name";
- }
- TAO_ENDTRY;
- return "no-name";
+ return rt_info->entry_point;
}
// ************************************************************
@@ -3382,6 +3345,11 @@ template class ACE_Node<TAO_EC_Gateway*>;
template class ACE_Unbounded_Set<TAO_EC_Gateway*>;
template class ACE_Unbounded_Set_Iterator<TAO_EC_Gateway*>;
+template class ACE_Auto_Basic_Ptr<ACE_Push_Supplier_Proxy>;
+template class ACE_Auto_Basic_Ptr<ACE_Push_Consumer_Proxy>;
+template class auto_ptr<ACE_Push_Supplier_Proxy>;
+template class auto_ptr<ACE_Push_Consumer_Proxy>;
+
#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Atomic_Op<ACE_ES_MUTEX, int>
@@ -3427,4 +3395,9 @@ template class ACE_Unbounded_Set_Iterator<TAO_EC_Gateway*>;
#pragma instantiate ACE_Unbounded_Set<TAO_EC_Gateway*>
#pragma instantiate ACE_Unbounded_Set_Iterator<TAO_EC_Gateway*>
+#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Push_Supplier_Proxy>
+#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Push_Consumer_Proxy>
+#pragma instantiate auto_ptr<ACE_Push_Supplier_Proxy>
+#pragma instantiate auto_ptr<ACE_Push_Consumer_Proxy>
+
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h
index c15b82bd532..c955d57fce2 100644
--- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h
+++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h
@@ -1430,10 +1430,11 @@ private:
// ************************************************************
-// Helper function that returns
-// qos.dependencies_[0].rt_info_->entry_point or "no-name".
+// Helper function that returns the first RT_Info entry point name.
+// Use for debugging purposes only.
const TAO_ORBSVCS_Export char *
-ACE_ES_Consumer_Name (const RtecEventChannelAdmin::ConsumerQOS &qos);
+ACE_ES_Consumer_Name (const RtecEventChannelAdmin::ConsumerQOS &qos,
+ CORBA::Environment &_env);
// ************************************************************
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp
new file mode 100644
index 00000000000..aff72d722e4
--- /dev/null
+++ b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.cpp
@@ -0,0 +1,676 @@
+// $Id$
+
+#include "ace/Get_Opt.h"
+#include "ace/Auto_Ptr.h"
+#include "ace/Sched_Params.h"
+
+#include "orbsvcs/Event_Utilities.h"
+#include "orbsvcs/Event_Service_Constants.h"
+#include "orbsvcs/Scheduler_Factory.h"
+#include "orbsvcs/Time_Utilities.h"
+#include "orbsvcs/RtecEventChannelAdminC.h"
+#include "orbsvcs/Sched/Config_Scheduler.h"
+#include "orbsvcs/Runtime_Scheduler.h"
+#include "orbsvcs/Event/Event_Channel.h"
+#include "orbsvcs/Event/Module_Factory.h"
+#include "EC_Basic.h"
+
+#if !defined (__ACE_INLINE__)
+#include "EC_Basic.i"
+#endif /* __ACE_INLINE__ */
+
+ACE_RCSID(EC_Basic, EC_Basic, "$Id$")
+
+ECB_Driver::ECB_Driver (void)
+ : pid_filename_ (0)
+{
+}
+
+int
+ECB_Driver::run (int argc, char* argv[])
+{
+ TAO_TRY
+ {
+ this->orb_ =
+ CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ CORBA::Object_var poa_object =
+ this->orb_->resolve_initial_references("RootPOA");
+ if (CORBA::is_nil (poa_object.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Unable to initialize the POA.\n"),
+ 1);
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in (), TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager (TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ if (this->parse_args (argc, argv))
+ return 1;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "EC_Basic: Execution parameters:\n"
+ " pid file name = <%s>\n",
+ this->pid_filename_?this->pid_filename_:"nil") );
+
+ if (this->pid_filename_ != 0)
+ {
+ FILE* pid = ACE_OS::fopen (this->pid_filename_, "w");
+ if (pid != 0)
+ {
+ ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ());
+ ACE_OS::fclose (pid);
+ }
+ }
+
+ ACE_Config_Scheduler scheduler_impl;
+ RtecScheduler::Scheduler_var scheduler =
+ scheduler_impl._this (TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ CORBA::String_var str =
+ this->orb_->object_to_string (scheduler.in (), TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+ ACE_DEBUG ((LM_DEBUG,
+ "EC_Basic: The (local) scheduler IOR is <%s>\n",
+ str.in ()));
+
+ if (ACE_Scheduler_Factory::server (scheduler.in ()) == -1)
+ return -1;
+
+ // Create the EventService implementation, but don't start its
+ // internal threads.
+ TAO_Reactive_Module_Factory module_factory;
+ ACE_EventChannel ec_impl (0,
+ ACE_DEFAULT_EVENT_CHANNEL_TYPE,
+ &module_factory);
+
+ // Register Event_Service with the Naming Service.
+ RtecEventChannelAdmin::EventChannel_var ec =
+ ec_impl._this (TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ str = this->orb_->object_to_string (ec.in (), TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "EC_Basic: The (local) EC IOR is <%s>\n",
+ str.in ()));
+
+ poa_manager->activate (TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ RtecEventChannelAdmin::EventChannel_var local_ec =
+ ec_impl._this (TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ ec_impl.activate ();
+
+ ACE_DEBUG ((LM_DEBUG, "EC_Basic: local EC objref ready\n"));
+
+ ACE_DEBUG ((LM_DEBUG, "EC_Basic: start supplier_id_test\n"));
+
+ ECB_SupplierID_Test supplier_id_test;
+ supplier_id_test.run (this->orb_,
+ local_ec,
+ scheduler,
+ TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ if (supplier_id_test.dump_results () != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "EC_Basic: supplier_id test failed\n"),
+ -1);
+ ACE_DEBUG ((LM_DEBUG, "EC_Basic: end supplier_id_test\n"));
+
+ ACE_DEBUG ((LM_DEBUG, "EC_Basic: shutdown the EC\n"));
+ ec_impl.shutdown ();
+ }
+ TAO_CATCH (CORBA::SystemException, sys_ex)
+ {
+ TAO_TRY_ENV.print_exception ("SYS_EX");
+ }
+ TAO_CATCHANY
+ {
+ TAO_TRY_ENV.print_exception ("NON SYS EX");
+ }
+ TAO_ENDTRY;
+ return 0;
+}
+
+// ****************************************************************
+
+int
+ECB_Driver::parse_args (int argc, char *argv [])
+{
+ ACE_Get_Opt get_opt (argc, argv, "p:");
+ int opt;
+
+ while ((opt = get_opt ()) != EOF)
+ {
+ switch (opt)
+ {
+ case 'p':
+ this->pid_filename_ = get_opt.optarg;
+ break;
+
+
+ case '?':
+ default:
+ ACE_DEBUG ((LM_DEBUG,
+ "Usage: %s "
+ "[ORB options] "
+ "-p <pid file name> "
+ "\n",
+ argv[0]));
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+// ****************************************************************
+
+ECB_SupplierID_Test::ECB_SupplierID_Test (void)
+ : consumer0_ (this, 0),
+ consumer1_ (this, 1),
+ supplier0_ (this, ACE_ES_EVENT_UNDEFINED + 1),
+ supplier1_ (this, ACE_ES_EVENT_UNDEFINED + 2)
+{
+}
+
+void
+ECB_SupplierID_Test::run (CORBA::ORB_ptr orb,
+ RtecEventChannelAdmin::EventChannel_ptr ec,
+ RtecScheduler::Scheduler_ptr scheduler,
+ CORBA::Environment& _env)
+{
+ for (int i = 0; i < ECB_SupplierID_Test::PHASE_END; ++i)
+ {
+ this->event_count_[i] = 0;
+ this->error_count_[i] = 0;
+ }
+
+ // Startup
+ this->consumer0_.open ("SupplierID/consumer0",
+ ec, scheduler, _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->consumer1_.open ("SupplierID/consumer1",
+ ec, scheduler, _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier0_.open ("SupplierID/supplier0",
+ ec, scheduler, _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.open ("SupplierID/supplier1",
+ ec, scheduler, _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ // PHASE 0, test filtering by supplier ID in the presence of
+ // multiple suppliers with the same ID...
+ this->phase_ = ECB_SupplierID_Test::PHASE_0;
+
+ this->consumer0_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->consumer1_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ this->supplier0_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
+ {
+ this->supplier0_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ }
+
+ // PHASE 1, test disconnection of a single supplier.
+ this->phase_ = ECB_SupplierID_Test::PHASE_1;
+ this->supplier1_.disconnect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
+ {
+ this->supplier0_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ }
+
+ // PHASE 2, test reconnection of the supplier.
+ this->phase_ = ECB_SupplierID_Test::PHASE_2;
+ this->supplier1_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
+ {
+ this->supplier0_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ }
+
+ // PHASE 3, test disconnect of one consumer
+ this->phase_ = ECB_SupplierID_Test::PHASE_3;
+ this->consumer1_.disconnect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
+ {
+ this->supplier0_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ }
+
+ // PHASE 4, test reconnection of one consumer
+ this->phase_ = ECB_SupplierID_Test::PHASE_4;
+ this->consumer1_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
+ {
+ this->supplier0_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ }
+
+ // PHASE 5, test disconnection of two consumers.
+ this->phase_ = ECB_SupplierID_Test::PHASE_5;
+ this->consumer0_.disconnect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->consumer1_.disconnect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
+ {
+ this->supplier0_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ }
+
+ // PHASE 6, test reconnection of two consumers.
+ this->phase_ = ECB_SupplierID_Test::PHASE_6;
+ this->consumer0_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->consumer1_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
+ {
+ this->supplier0_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ }
+
+ // PHASE 7, test disconnect/reconnect of both suppliers.
+ this->phase_ = ECB_SupplierID_Test::PHASE_7;
+ this->supplier0_.disconnect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.disconnect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier0_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.connect (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ for (i = 0; i < ECB_SupplierID_Test::EVENTS_SENT; ++i)
+ {
+ this->supplier0_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier1_.send_event (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ }
+
+ // PHASE END, any events received after this are errors.
+ this->phase_ = ECB_SupplierID_Test::PHASE_END;
+
+ // Finish
+ this->supplier1_.close (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier0_.close (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->consumer1_.close (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->consumer0_.close (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+}
+
+int
+ECB_SupplierID_Test::dump_results (void)
+{
+ static int expected_count[PHASE_END]={
+ 4 * ECB_SupplierID_Test::EVENTS_SENT,
+ 2 * ECB_SupplierID_Test::EVENTS_SENT,
+ 4 * ECB_SupplierID_Test::EVENTS_SENT,
+ 2 * ECB_SupplierID_Test::EVENTS_SENT,
+ 4 * ECB_SupplierID_Test::EVENTS_SENT,
+ 0,
+ 4 * ECB_SupplierID_Test::EVENTS_SENT,
+ 4 * ECB_SupplierID_Test::EVENTS_SENT
+ };
+
+ int result = 0;
+ for (int i = 0; i < ECB_SupplierID_Test::PHASE_END; ++i)
+ {
+ if (this->error_count_[i] != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "SupplierID_Test: Error count for phase %d "
+ "is not zero\n", i));
+ result = -1;
+ }
+ if (this->event_count_[i] != expected_count[i])
+ {
+ ACE_ERROR ((LM_ERROR,
+ "SupplierID_Test: Mismatched event count in phase %d, "
+ "expected %d, count is %d\n",
+ i,
+ expected_count[i],
+ this->event_count_[i]));
+ result = -1;
+ }
+ }
+ if (this->error_count_[ECB_SupplierID_Test::PHASE_END] != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "SupplierID_Test: Events received after final phase\n"));
+ result = -1;
+ }
+ if (result == 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "SupplierID_Test: All phases successful\n"));
+ }
+
+ return result;
+}
+
+void
+ECB_SupplierID_Test::push (int consumer_id,
+ const RtecEventComm::EventSet& events,
+ CORBA::Environment &_env)
+{
+ switch (this->phase_)
+ {
+ case ECB_SupplierID_Test::PHASE_END:
+ default:
+ this->error_count_[ECB_SupplierID_Test::PHASE_END]++;
+ break;
+
+ case ECB_SupplierID_Test::PHASE_0:
+ this->event_count_[ECB_SupplierID_Test::PHASE_0]++;
+ break;
+
+ case ECB_SupplierID_Test::PHASE_1:
+ this->event_count_[ECB_SupplierID_Test::PHASE_1]++;
+ break;
+
+ case ECB_SupplierID_Test::PHASE_2:
+ this->event_count_[ECB_SupplierID_Test::PHASE_2]++;
+ break;
+
+ case ECB_SupplierID_Test::PHASE_3:
+ if (consumer_id == 0)
+ this->event_count_[ECB_SupplierID_Test::PHASE_3]++;
+ else
+ this->error_count_[ECB_SupplierID_Test::PHASE_3]++;
+ break;
+
+ case ECB_SupplierID_Test::PHASE_4:
+ this->event_count_[ECB_SupplierID_Test::PHASE_4]++;
+ break;
+
+ case ECB_SupplierID_Test::PHASE_5:
+ this->error_count_[ECB_SupplierID_Test::PHASE_5]++;
+ break;
+
+ case ECB_SupplierID_Test::PHASE_6:
+ this->event_count_[ECB_SupplierID_Test::PHASE_6]++;
+ break;
+
+ case ECB_SupplierID_Test::PHASE_7:
+ this->event_count_[ECB_SupplierID_Test::PHASE_7]++;
+ break;
+
+ }
+}
+
+// ****************************************************************
+
+ECB_SupplierID_Test::Consumer::Consumer (ECB_SupplierID_Test *test,
+ int consumer_id)
+ : test_ (test),
+ consumer_id_ (consumer_id)
+{
+}
+
+void
+ECB_SupplierID_Test::Consumer::open (const char* name,
+ RtecEventChannelAdmin::EventChannel_ptr ec,
+ RtecScheduler::Scheduler_ptr scheduler,
+ CORBA::Environment& _env)
+{
+ this->rt_info_ =
+ scheduler->create (name, _env);
+ TAO_CHECK_ENV_RETURN_VOID(_env);
+
+ // The worst case execution time is far less than 2
+ // milliseconds, but that is a safe estimate....
+ ACE_Time_Value tv (0, 2000);
+ TimeBase::TimeT time;
+ ORBSVCS_Time::Time_Value_to_TimeT (time, tv);
+ scheduler->set (this->rt_info_,
+ RtecScheduler::VERY_HIGH_CRITICALITY,
+ time, time, time,
+ 0,
+ RtecScheduler::VERY_LOW_IMPORTANCE,
+ time,
+ 0,
+ RtecScheduler::OPERATION,
+ _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ // = Connect as a consumer.
+ this->consumer_admin_ = ec->for_consumers (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+}
+
+void
+ECB_SupplierID_Test::Consumer::connect (CORBA::Environment& _env)
+{
+ if (CORBA::is_nil (this->consumer_admin_.in ()))
+ return;
+
+ this->supplier_proxy_ =
+ this->consumer_admin_->obtain_push_supplier (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ ACE_ConsumerQOS_Factory qos;
+ qos.start_disjunction_group ();
+ qos.insert_source (ECB_SupplierID_Test::SUPPLIER_ID,
+ this->rt_info_);
+
+ RtecEventComm::PushConsumer_var objref = this->_this (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ this->supplier_proxy_->connect_push_consumer (objref.in (),
+ qos.get_ConsumerQOS (),
+ _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+}
+
+void
+ECB_SupplierID_Test::Consumer::disconnect (CORBA::Environment& _env)
+{
+ if (CORBA::is_nil (this->supplier_proxy_.in ())
+ || CORBA::is_nil (this->consumer_admin_.in ()))
+ return;
+
+ this->supplier_proxy_->disconnect_push_supplier (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->supplier_proxy_ =
+ RtecEventChannelAdmin::ProxyPushSupplier::_nil ();
+}
+
+void
+ECB_SupplierID_Test::Consumer::close (CORBA::Environment &_env)
+{
+ this->disconnect (_env);
+ this->consumer_admin_ =
+ RtecEventChannelAdmin::ConsumerAdmin::_nil ();
+}
+
+void
+ECB_SupplierID_Test::Consumer::push (const RtecEventComm::EventSet& events,
+ CORBA::Environment &_env)
+{
+ this->test_->push (this->consumer_id_,
+ events,
+ _env);
+}
+
+void
+ECB_SupplierID_Test::Consumer::disconnect_push_consumer (CORBA::Environment &)
+{
+}
+
+// ****************************************************************
+
+ECB_SupplierID_Test::Supplier::Supplier (ECB_SupplierID_Test *test,
+ int supplier_id)
+ : test_ (test),
+ supplier_id_ (supplier_id)
+{
+}
+
+void
+ECB_SupplierID_Test::Supplier::open (const char* name,
+ RtecEventChannelAdmin::EventChannel_ptr ec,
+ RtecScheduler::Scheduler_ptr scheduler,
+ CORBA::Environment &_env)
+{
+ RtecScheduler::handle_t rt_info =
+ scheduler->create (name, _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ // The execution times are set to reasonable values, but
+ // actually they are changed on the real execution, i.e. we
+ // lie to the scheduler to obtain right priorities; but we
+ // don't care if the set is schedulable.
+ ACE_Time_Value tv (0, 2000);
+ TimeBase::TimeT time;
+ ORBSVCS_Time::Time_Value_to_TimeT (time, tv);
+
+ scheduler->set (rt_info,
+ RtecScheduler::VERY_HIGH_CRITICALITY,
+ time, time, time,
+ 0,
+ RtecScheduler::VERY_LOW_IMPORTANCE,
+ time,
+ 1,
+ RtecScheduler::OPERATION,
+ _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ // = Connect as a consumer.
+ this->supplier_admin_ = ec->for_suppliers (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+}
+
+void
+ECB_SupplierID_Test::Supplier::connect (CORBA::Environment& _env)
+{
+ if (CORBA::is_nil (this->supplier_admin_.in ()))
+ return;
+
+ this->consumer_proxy_ =
+ this->supplier_admin_->obtain_push_consumer (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ ACE_SupplierQOS_Factory qos;
+ qos.insert (ECB_SupplierID_Test::SUPPLIER_ID,
+ this->supplier_id_,
+ this->rt_info_,
+ 1);
+
+ RtecEventComm::PushSupplier_var objref = this->_this (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+
+ this->consumer_proxy_->connect_push_supplier (objref.in (),
+ qos.get_SupplierQOS (),
+ _env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+}
+
+void
+ECB_SupplierID_Test::Supplier::disconnect (CORBA::Environment& _env)
+{
+ if (CORBA::is_nil (this->consumer_proxy_.in ())
+ || CORBA::is_nil (this->supplier_admin_.in ()))
+ return;
+
+ this->consumer_proxy_->disconnect_push_consumer (_env);
+ TAO_CHECK_ENV_RETURN_VOID (_env);
+ this->consumer_proxy_ =
+ RtecEventChannelAdmin::ProxyPushConsumer::_nil ();
+}
+
+void
+ECB_SupplierID_Test::Supplier::close (CORBA::Environment &_env)
+{
+ this->disconnect (_env);
+ this->supplier_admin_ =
+ RtecEventChannelAdmin::SupplierAdmin::_nil ();
+}
+
+void
+ECB_SupplierID_Test::Supplier::send_event (CORBA::Environment& _env)
+{
+ RtecEventComm::EventSet events (1);
+ events.length (1);
+
+ RtecEventComm::Event& e = events[0];
+ e.header.source = ECB_SupplierID_Test::SUPPLIER_ID;
+ e.header.ttl = 1;
+ e.header.type = this->supplier_id_;
+
+ ACE_hrtime_t t = ACE_OS::gethrtime ();
+ ORBSVCS_Time::hrtime_to_TimeT (e.header.creation_time, t);
+ e.header.ec_recv_time = ORBSVCS_Time::zero;
+ e.header.ec_send_time = ORBSVCS_Time::zero;
+
+ e.data.x = 0;
+ e.data.y = 0;
+
+ this->consumer_proxy_->push (events, _env);
+}
+
+void
+ECB_SupplierID_Test::Supplier::disconnect_push_supplier (CORBA::Environment& _env)
+{
+ // this->supplier_proxy_->disconnect_push_supplier (_env);
+}
+
+// ****************************************************************
+
+int
+main (int argc, char *argv [])
+{
+ ECB_Driver driver;
+ return driver.run (argc, argv);
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h
new file mode 100644
index 00000000000..fe21abcc1ae
--- /dev/null
+++ b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h
@@ -0,0 +1,239 @@
+/* -*- C++ -*- */
+// $Id$
+//
+// ============================================================================
+//
+// = TITLE
+// A simple test for the Event Channel.
+//
+// = DESCRIPTION
+// This test exercises the basic features of the EC, such as
+// filtering, correlation, timeouts, etc.
+// The test creates a colocated EC, some suppliers, some consumers
+// and exercises each feature, one at a time.
+//
+// ============================================================================
+
+#if !defined (EC_BASIC_H)
+#define EC_BASIC_H
+
+#include "ace/SString.h"
+#include "ace/High_Res_Timer.h"
+#include "orbsvcs/RtecEventChannelAdminC.h"
+#include "orbsvcs/RtecEventCommS.h"
+#include "orbsvcs/Channel_Clients_T.h"
+
+class ECB_Driver
+{
+ //
+ // = TITLE
+ // A class to control the tests.
+ //
+ // = DESCRIPTION
+ // This class creates multiple tests and runs them in sequence,
+ // providing proper environment for each one (the event channel,
+ // the ORB configuration, etc.
+ //
+public:
+ ECB_Driver (void);
+
+ int run (int argc, char* argv[]);
+ // Run the test.
+
+private:
+ int shutdown (CORBA::Environment&);
+ // Called when the main thread is about to shutdown.
+
+ int parse_args (int argc, char* argv[]);
+ // parse the command line arguments
+
+ void dump_results (void);
+ // Dump the results to the standard output.
+
+private:
+ const char* pid_filename_;
+ // The name of a file where the process stores its pid
+
+ ACE_hrtime_t test_start_;
+ ACE_hrtime_t test_stop_;
+ // Measure the test elapsed time as well as mark the beginning of
+ // the frames.
+
+ CORBA::ORB_var orb_;
+ // The ORB, so we can shut it down.
+};
+
+// ****************************************************************
+
+// @@ TODO WE may need to split each test to its own file, but only
+// once the number of tests justifies that change.
+
+class ECB_SupplierID_Test
+{
+ //
+ // = TITLE
+ // Verifies that multiple suppliers can have the same ID.
+ //
+ // = DESCRIPTION
+ // This class creates two consumers and two suppliers, the
+ // suppliers connect with the same ID, but send out different
+ // events. The consumers subscribe by supplier ID.
+ //
+ // The test executes several phases (see the enum below).
+ //
+ // = TODO
+ // The test could be more flexible, but functionality is more
+ // important than flexiblitity.
+ //
+public:
+ ECB_SupplierID_Test (void);
+
+ enum
+ {
+ PHASE_0, // Verifies filtering for two suppliers with the same ID
+ PHASE_1, // Disconnect one of the suppliers
+ PHASE_2, // Reconnect the supplier
+ PHASE_3, // Disconnect a consumer
+ PHASE_4, // Reconnect the consumer
+ PHASE_5, // Disconnect both consumers
+ PHASE_6, // Reconnect both consumers
+ PHASE_7, // Disconnect both suppliers and reconnect them
+ PHASE_END // To check that no events are received after the test ends.
+ };
+
+ enum
+ {
+ EVENTS_SENT = 10, // How many events we send on each test
+ SUPPLIER_ID = 1
+ };
+
+ void run (CORBA::ORB_ptr orb,
+ RtecEventChannelAdmin::EventChannel_ptr event_channel,
+ RtecScheduler::Scheduler_ptr scheduler,
+ CORBA::Environment& _env);
+ // Start the test.
+
+ int dump_results (void);
+ // Print out the results, returns -1 if an error was detected.
+
+ void push (int consumer_id,
+ const RtecEventComm::EventSet& events,
+ CORBA::Environment &_env);
+ // The callback from the Consumer....
+
+ class Consumer : public POA_RtecEventComm::PushConsumer
+ {
+ public:
+ // = TITLE
+ // Implement one of the consumers in this test.
+ //
+ Consumer (ECB_SupplierID_Test* test,
+ int consumer_id);
+
+ void open (const char* name,
+ RtecEventChannelAdmin::EventChannel_ptr event_channel,
+ RtecScheduler::Scheduler_ptr scheduler,
+ CORBA::Environment& _env);
+ // This method connects the consumer to the EC.
+
+ void close (CORBA::Environment &_env);
+ // Disconnect from the EC.
+
+ void connect (CORBA::Environment &_env);
+ void disconnect (CORBA::Environment &_env);
+ // Disconnect from the supplier, but do not forget about it or close
+ // it.
+
+ // = The POA_RtecEventComm::PushComsumer methods.
+ virtual void push (const RtecEventComm::EventSet& events,
+ CORBA::Environment &_env);
+ virtual void disconnect_push_consumer (CORBA::Environment &);
+
+ private:
+ ECB_SupplierID_Test* test_;
+ // To callback.
+
+ int consumer_id_;
+ // So we can give our identity back to the test.
+
+ RtecScheduler::handle_t rt_info_;
+ // The handle for our RT_Info description.
+
+ RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_;
+ // We talk to the EC using this proxy.
+
+ RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_;
+ // We talk to the EC using this proxy.
+ };
+
+ class Supplier : public POA_RtecEventComm::PushSupplier
+ {
+ public:
+ // = TITLE
+ // Implement one of the consumers in this test.
+ //
+ Supplier (ECB_SupplierID_Test* test,
+ int supplier_id);
+ // We generate an id based on the name....
+
+ void open (const char* name,
+ RtecEventChannelAdmin::EventChannel_ptr event_channel,
+ RtecScheduler::Scheduler_ptr scheduler,
+ CORBA::Environment& _env);
+ // This method connects the supplier to the EC.
+
+ void close (CORBA::Environment &_env);
+ // Disconnect from the EC.
+
+ void connect (CORBA::Environment &_env);
+ void disconnect (CORBA::Environment &_env);
+ // Disconnect from the consumer, but do not forget about it or close
+ // it.
+
+ void send_event (CORBA::Environment &_env);
+ // Send one event.
+
+ // = The POA_RtecEventComm::PushSupplier methods.
+ virtual void disconnect_push_supplier (CORBA::Environment &);
+
+ private:
+ ECB_SupplierID_Test* test_;
+ // To callback.
+
+ int supplier_id_;
+ // This is NOT the supplier ID for the EC, just a number for the
+
+ RtecScheduler::handle_t rt_info_;
+ // The handle for our RT_Info description.
+
+ RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_;
+ // We talk to the EC using this proxy.
+
+ RtecEventChannelAdmin::SupplierAdmin_var supplier_admin_;
+ // We talk to the EC using this proxy.
+ };
+
+private:
+ Consumer consumer0_;
+ Consumer consumer1_;
+ // The consumers...
+
+ Supplier supplier0_;
+ Supplier supplier1_;
+ // The suppliers...
+
+ CORBA::ULong event_count_[ECB_SupplierID_Test::PHASE_END + 1];
+ // Count the correctly received events.
+
+ CORBA::ULong error_count_[ECB_SupplierID_Test::PHASE_END + 1];
+ // Store the number of errors for each phase.
+
+ int phase_;
+ // Keep track of the test we are running...
+};
+
+#if defined (__ACE_INLINE__)
+#include "EC_Basic.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /* EC_BASIC_H */
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.i b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.i
new file mode 100644
index 00000000000..3fa4969d503
--- /dev/null
+++ b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.i
@@ -0,0 +1,3 @@
+//
+// $Id$
+//
diff --git a/TAO/orbsvcs/tests/EC_Basic/Makefile b/TAO/orbsvcs/tests/EC_Basic/Makefile
new file mode 100644
index 00000000000..23a78a775a9
--- /dev/null
+++ b/TAO/orbsvcs/tests/EC_Basic/Makefile
@@ -0,0 +1,379 @@
+# $Id$
+
+BIN = EC_Basic
+
+SRC = $(BIN:%=%$(VAR).cpp)
+LDLIBS= -lorbsvcs -lTAO
+
+ifndef TAO_ROOT
+TAO_ROOT = $(ACE_ROOT)/TAO
+endif
+
+CPPFLAGS += -I$(TAO_ROOT)/orbsvcs \
+ -I$(TAO_ROOT)
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
+
+#### Local rules and variables...
+
+#----------------------------------------------------------------------------
+# Dependencies
+#----------------------------------------------------------------------------
+
+# DO NOT DELETE THIS LINE -- g++dep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+.obj/EC_Basic.o .obj/EC_Basic.so .shobj/EC_Basic.o .shobj/EC_Basic.so: EC_Basic.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 \
+ $(ACE_ROOT)/ace/Read_Buffer.h \
+ $(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/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.h \
+ $(ACE_ROOT)/ace/Event_Handler.h \
+ $(ACE_ROOT)/ace/Event_Handler.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/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/Signal.h \
+ $(ACE_ROOT)/ace/Containers.h \
+ $(ACE_ROOT)/ace/Containers.i \
+ $(ACE_ROOT)/ace/Containers_T.h \
+ $(ACE_ROOT)/ace/Containers_T.i \
+ $(ACE_ROOT)/ace/Containers_T.cpp \
+ $(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/Mem_Map.h \
+ $(ACE_ROOT)/ace/Mem_Map.i \
+ $(ACE_ROOT)/ace/Memory_Pool.i \
+ $(ACE_ROOT)/ace/Read_Buffer.i \
+ $(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/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/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/Thread_Manager.h \
+ $(ACE_ROOT)/ace/Thread_Manager.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/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_T.h \
+ $(ACE_ROOT)/ace/Message_Queue_T.i \
+ $(ACE_ROOT)/ace/Message_Queue_T.cpp \
+ $(ACE_ROOT)/ace/Message_Queue.i \
+ $(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/Svc_Handler.i \
+ $(ACE_ROOT)/ace/Svc_Handler.cpp \
+ $(ACE_ROOT)/ace/Dynamic.h \
+ $(ACE_ROOT)/ace/Singleton.h \
+ $(ACE_ROOT)/ace/Singleton.i \
+ $(ACE_ROOT)/ace/Singleton.cpp \
+ $(ACE_ROOT)/ace/Dynamic.i \
+ $(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/Align.h \
+ $(TAO_ROOT)/tao/Environment.h \
+ $(TAO_ROOT)/tao/Environment.i \
+ $(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/Union.h \
+ $(TAO_ROOT)/tao/ORB.i \
+ $(TAO_ROOT)/tao/try_macros.h \
+ $(TAO_ROOT)/tao/Exception.h \
+ $(TAO_ROOT)/tao/Exception.i \
+ $(TAO_ROOT)/tao/Any.h \
+ $(TAO_ROOT)/tao/Any.i \
+ $(TAO_ROOT)/tao/NVList.h \
+ $(TAO_ROOT)/tao/NVList.i \
+ $(TAO_ROOT)/tao/Principal.h \
+ $(TAO_ROOT)/tao/Principal.i \
+ $(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/varout.h \
+ $(TAO_ROOT)/tao/varout.i \
+ $(TAO_ROOT)/tao/varout.cpp \
+ $(TAO_ROOT)/tao/Typecode.h \
+ $(TAO_ROOT)/tao/Typecode.i \
+ $(TAO_ROOT)/tao/Marshal.h \
+ $(TAO_ROOT)/tao/Marshal.i \
+ $(TAO_ROOT)/tao/singletons.h \
+ $(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/DynAnyC.h \
+ $(TAO_ROOT)/tao/DynAnyC.i \
+ $(TAO_ROOT)/tao/POAS.i \
+ $(TAO_ROOT)/tao/Object_Table.h \
+ $(TAO_ROOT)/tao/Object_Table.i \
+ $(TAO_ROOT)/tao/POA.i \
+ $(TAO_ROOT)/tao/poa_macros.h \
+ $(TAO_ROOT)/tao/params.h \
+ $(TAO_ROOT)/tao/params.i \
+ $(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/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/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/Invocation.h \
+ $(TAO_ROOT)/tao/Invocation.i \
+ $(TAO_ROOT)/tao/Server_Request.h \
+ $(TAO_ROOT)/tao/Server_Request.i \
+ $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \
+ $(TAO_ROOT)/tao/DynAny_i.h \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.h \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/CosTimeBaseC.i \
+ $(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)/tao/Timeprobe.h \
+ $(ACE_ROOT)/ace/Timeprobe.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/Timer_Module.h \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.h \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/Event/RT_Task.i \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Timer_Module.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/Select_Reactor_T.h \
+ $(ACE_ROOT)/ace/Select_Reactor_Base.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_Base.i \
+ $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
+ $(ACE_ROOT)/ace/Timer_Heap.h \
+ $(ACE_ROOT)/ace/Timer_Heap_T.h \
+ $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
+ $(ACE_ROOT)/ace/Select_Reactor_T.i \
+ $(ACE_ROOT)/ace/Select_Reactor.i \
+ $(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 \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/Event/Module_Factory.h \
+ EC_Basic.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_UDP.h \
+ $(ACE_ROOT)/ace/SOCK_CODgram.h \
+ $(ACE_ROOT)/ace/SOCK_CODgram.i \
+ $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \
+ $(ACE_ROOT)/ace/SOCK_Dgram.h \
+ $(ACE_ROOT)/ace/SOCK_Dgram.i \
+ $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS.h \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminC.h \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminC.i \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS_T.h \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS_T.i \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS_T.cpp \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/RtecUDPAdminS.i \
+ $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_UDP_Admin.h \
+ EC_Basic.i
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/orbsvcs/tests/EC_Basic/README b/TAO/orbsvcs/tests/EC_Basic/README
new file mode 100644
index 00000000000..d590b6581d9
--- /dev/null
+++ b/TAO/orbsvcs/tests/EC_Basic/README
@@ -0,0 +1,9 @@
+# $Id$
+
+A regression test for the Event Channel.
+
+This program will be used to test the basic features of the Event
+Channel. The current tests are:
+
+ + SupplierID_Test: verify that several suppliers can can the
+ same supplier ID.
diff --git a/TAO/orbsvcs/tests/EC_Basic/run_test.pl b/TAO/orbsvcs/tests/EC_Basic/run_test.pl
new file mode 100755
index 00000000000..690995c9bff
--- /dev/null
+++ b/TAO/orbsvcs/tests/EC_Basic/run_test.pl
@@ -0,0 +1,10 @@
+# -*- perl -*-
+# $Id$
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+$status = system ("EC_Basic".$Process::EXE_EXT, "");
+
+# @@ Capture any errors from the server too.
+exit $status;
diff --git a/TAO/orbsvcs/tests/Makefile b/TAO/orbsvcs/tests/Makefile
index 7263c02f3aa..4108f7de43f 100644
--- a/TAO/orbsvcs/tests/Makefile
+++ b/TAO/orbsvcs/tests/Makefile
@@ -15,6 +15,7 @@ DIRS = Simple_Naming \
EC_Throughput \
EC_Mcast \
EC_Custom_Marshal \
+ EC_Basic \
Concurrency \
Trading