summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-09 19:02:39 +0000
committerpradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-09 19:02:39 +0000
commitf4da647244732b63221d50a1e5483c35ca88ac87 (patch)
tree923ee89540c79626748751987f75cbb8a7d34588
parent828df65f19a3b24518677d0b738b2bf6c3289a46 (diff)
downloadATCD-f4da647244732b63221d50a1e5483c35ca88ac87.tar.gz
ChangeLogTag: Sun Jun 8 19:53:04 2003 Pradeep Gore <pradeep@oomworks.com>
-rw-r--r--TAO/ChangeLog11
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp17
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/POA_Helper.h5
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.cpp15
-rw-r--r--TAO/orbsvcs/tests/Notify/Lanes/consumer.conf6
-rw-r--r--TAO/orbsvcs/tests/Notify/Lanes/supplier.conf6
6 files changed, 41 insertions, 19 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 14e2ed33c80..300eac9a667 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -370,6 +370,17 @@ Sun Jun 8 19:53:04 2003 Pradeep Gore <pradeep@oomworks.com>
Updated.
+ * orbsvcs/tests/Notify/Lanes/supplier.conf:
+ * orbsvcs/tests/Notify/Lanes/consumer.conf:
+
+ Corrected the Lane info set in the filter.
+
+ * POA_Helper.cpp:
+ * POA_Helper.h:
+ * RT_POA_Helper.h:
+
+ Added method <get_unique_id> to generate unique POA names.
+
Tue Jun 03 07:52:12 2003 Simon McQueen <sm@prismtechnologies.com>
* TAO version 1.3.2 released.
diff --git a/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp b/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp
index 36b950eec2b..379d8cdcf57 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp
@@ -19,6 +19,18 @@ TAO_NS_POA_Helper::~TAO_NS_POA_Helper ()
}
+ACE_CString
+TAO_NS_POA_Helper::get_unique_id (void)
+{
+ /// Factory for generating unique ids for the POAs.
+ static TAO_NS_ID_Factory poa_id_factory;
+
+ char buf[32];
+ ACE_OS_String::itoa (poa_id_factory.id (), buf, 10);
+
+ return ACE_CString (buf);
+}
+
void
TAO_NS_POA_Helper::init (PortableServer::POA_ptr parent_poa, const char* poa_name ACE_ENV_ARG_DECL)
{
@@ -33,10 +45,9 @@ TAO_NS_POA_Helper::init (PortableServer::POA_ptr parent_poa, const char* poa_nam
void
TAO_NS_POA_Helper::init (PortableServer::POA_ptr parent_poa ACE_ENV_ARG_DECL)
{
- char child_poa_name[32];
- ACE_OS_String::itoa (ACE_OS::rand (), child_poa_name, 10);
+ ACE_CString child_poa_name = this->get_unique_id ();
- this->init (parent_poa, child_poa_name ACE_ENV_ARG_PARAMETER);
+ this->init (parent_poa, child_poa_name.c_str () ACE_ENV_ARG_PARAMETER);
}
void
diff --git a/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.h b/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.h
index 122286482f3..04d6ffbd8c8 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.h
@@ -66,10 +66,13 @@ protected:
/// Apply the polices and create child POA.
void create_i (PortableServer::POA_ptr parent_poa, const char* poa_name, CORBA::PolicyList &policy_list ACE_ENV_ARG_DECL);
+ /// Generate a unique id for each POA created.
+ ACE_CString get_unique_id (void);
+
/// POA
PortableServer::POA_var poa_;
- /// ID Factory
+ /// ID Factory for objects.
TAO_NS_ID_Factory id_factory_;
/// Convert id to ObjectID
diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.cpp b/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.cpp
index fb3803286e7..b0bb7c96506 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/RT_POA_Helper.cpp
@@ -19,10 +19,9 @@ TAO_NS_RT_POA_Helper::~TAO_NS_RT_POA_Helper ()
void
TAO_NS_RT_POA_Helper::init (PortableServer::POA_ptr parent_poa, const NotifyExt::ThreadPoolParams& tp_params ACE_ENV_ARG_DECL)
{
- char child_poa_name[32];
- ACE_OS_String::itoa (ACE_OS::rand (), child_poa_name, 10);
+ ACE_CString child_poa_name = this->get_unique_id ();
- this->init (parent_poa, child_poa_name, tp_params ACE_ENV_ARG_PARAMETER);
+ this->init (parent_poa, child_poa_name.c_str (), tp_params ACE_ENV_ARG_PARAMETER);
}
void
@@ -79,10 +78,9 @@ TAO_NS_RT_POA_Helper::init (PortableServer::POA_ptr parent_poa, const char* poa_
void
TAO_NS_RT_POA_Helper::init (PortableServer::POA_ptr parent_poa, const NotifyExt::ThreadPoolLanesParams& tpl_params ACE_ENV_ARG_DECL)
{
- char child_poa_name[32];
- ACE_OS_String::itoa (ACE_OS::rand (), child_poa_name, 10);
+ ACE_CString child_poa_name = this->get_unique_id ();
- this->init (parent_poa, child_poa_name, tpl_params ACE_ENV_ARG_PARAMETER);
+ this->init (parent_poa, child_poa_name.c_str (), tpl_params ACE_ENV_ARG_PARAMETER);
}
void
@@ -159,8 +157,7 @@ TAO_NS_RT_POA_Helper::init (PortableServer::POA_ptr parent_poa ACE_ENV_ARG_DECL)
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- char child_poa_name[32];
- ACE_OS_String::itoa (ACE_OS::rand (), child_poa_name, 10);
+ ACE_CString child_poa_name = this->get_unique_id ();
- this->create_i (parent_poa, child_poa_name, policy_list ACE_ENV_ARG_PARAMETER);
+ this->create_i (parent_poa, child_poa_name.c_str (), policy_list ACE_ENV_ARG_PARAMETER);
}
diff --git a/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf b/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf
index 010cd3e95f1..d8e03ffc383 100644
--- a/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf
+++ b/TAO/orbsvcs/tests/Notify/Lanes/consumer.conf
@@ -27,7 +27,7 @@ static Command_Builder "PeriodicConsumer -Subscription c1 +Path1"
static Command_Builder "Filter -CreateFilter f_c1 ff"
static Command_Builder "Filter -Add_Constraint f_c1 'PoolId = 1'"
-static Command_Builder "Filter -Add_Constraint f_c1 'LaneId = 1'"
+static Command_Builder "Filter -Add_Constraint f_c1 'LaneId = 0'"
static Command_Builder "Filter -Add_Filter f_c1 c1_proxy"
@@ -37,7 +37,7 @@ static Command_Builder "PeriodicConsumer -Subscription c2 +Path2"
static Command_Builder "Filter -CreateFilter f_c2 ff"
static Command_Builder "Filter -Add_Constraint f_c2 'PoolId = 1'"
-static Command_Builder "Filter -Add_Constraint f_c2 'LaneId = 2'"
+static Command_Builder "Filter -Add_Constraint f_c2 'LaneId = 1'"
static Command_Builder "Filter -Add_Filter f_c2 c2_proxy"
@@ -47,7 +47,7 @@ static Command_Builder "PeriodicConsumer -Subscription c3 +Path3"
static Command_Builder "Filter -CreateFilter f_c3 ff"
static Command_Builder "Filter -Add_Constraint f_c3 'PoolId = 1'"
-static Command_Builder "Filter -Add_Constraint f_c3 'LaneId = 3'"
+static Command_Builder "Filter -Add_Constraint f_c3 'LaneId = 2'"
static Command_Builder "Filter -Add_Filter f_c3 c3_proxy"
diff --git a/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf b/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf
index 6c8a7f59da6..2b26c538bbb 100644
--- a/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf
+++ b/TAO/orbsvcs/tests/Notify/Lanes/supplier.conf
@@ -37,7 +37,7 @@ static Command_Builder "PeriodicSupplier -Create s1 -Admin sa1 -Proxy s1_proxy -
static Command_Builder "Filter -CreateFilter f1 ff"
static Command_Builder "Filter -Add_Constraint f1 'PoolId = 1'"
-static Command_Builder "Filter -Add_Constraint f1 'LaneId = 1'"
+static Command_Builder "Filter -Add_Constraint f1 'LaneId = 0'"
static Command_Builder "Filter -Add_Filter f1 s1_proxy"
### --- Create Supplier s2 connected to sa1 ----
@@ -45,14 +45,14 @@ static Command_Builder "PeriodicSupplier -Create s2 -Admin sa1 -Proxy s2_proxy -
static Command_Builder "Filter -CreateFilter f2 ff"
static Command_Builder "Filter -Add_Constraint f2 'PoolId = 1'"
-static Command_Builder "Filter -Add_Constraint f2 'LaneId = 2'"
+static Command_Builder "Filter -Add_Constraint f2 'LaneId = 1'"
static Command_Builder "Filter -Add_Filter f2 s2_proxy"
### --- Create Supplier s3 connected to sa2 ----
static Command_Builder "PeriodicSupplier -Create s3 -Admin sa1 -Proxy s3_proxy -EventType Path3 -Priority 3 -Period 10000 -ExecTime 10000 -Phase 0 -Iter 5 -Load 1 "
static Command_Builder "Filter -CreateFilter f3 ff"
static Command_Builder "Filter -Add_Constraint f3 'PoolId = 1'"
-static Command_Builder "Filter -Add_Constraint f3 'LaneId = 3'"
+static Command_Builder "Filter -Add_Constraint f3 'LaneId = 2'"
static Command_Builder "Filter -Add_Filter f3 s3_proxy"
##--------- Run -------------