summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-03-17 13:40:44 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-03-17 13:40:44 +0000
commitd5260c58059a8a9ad317e0207e2bcb43ebef2db0 (patch)
tree9158133c4a84b447d19c948b18c2d35618d682b6
parent81430d7e5842862fa0c8399691d517c59294ad4f (diff)
downloadATCD-d5260c58059a8a9ad317e0207e2bcb43ebef2db0.tar.gz
Mon Mar 17 13:39:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog40
-rw-r--r--TAO/orbsvcs/orbsvcs/IFRService/Repository_i.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Builder.cpp6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Builder.h15
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp41
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h6
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp21
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h9
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp31
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannel.h3
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp20
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h23
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h2
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp29
-rw-r--r--TAO/orbsvcs/tests/Notify/Bug_3252_Regression/server.cpp5
16 files changed, 134 insertions, 121 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 7ea4de837bf..11f7c45526b 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,43 @@
+Mon Mar 17 13:39:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * orbsvcs/orbsvcs/Notify/Builder.cpp:
+ * orbsvcs/orbsvcs/Notify/Builder.h:
+ Changed build_filter_factory to accept a POA_ptr instead
+ of retrieving it here
+
+ * orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp:
+ Use CORBA::is_nil to check for a nil object reference
+
+ * orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp:
+ * orbsvcs/orbsvcs/Notify/ETCL_Filter.h:
+ Store the POA used to activate the filter, use it then
+ when cleaning up
+
+ * orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp:
+ * orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h:
+ * orbsvcs/orbsvcs/Notify/FilterFactory.h:
+ Don't use _this but the POA passed. Also changed the
+ signatures of some methods to get the regular memory
+ management
+
+ * orbsvcs/orbsvcs/Notify/EventChannel.cpp:
+ * orbsvcs/orbsvcs/Notify/EventChannel.h:
+ Create a filter factory for each event channel instead
+ of a global singleton
+
+ * orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp:
+ * orbsvcs/orbsvcs/Notify/EventChannelFactory.h:
+ Removed the global event filter factory
+
+ * orbsvcs/orbsvcs/Notify/POA_Helper.cpp:
+ Layout changes
+
+ * orbsvcs/tests/Notify/Bug_3252_Regression/server.cpp:
+ Use 5 load/unload iterations
+
+ * orbsvcs/orbsvcs/IFRService/Repository_i.cpp:
+ Const change
+
Mon Mar 17 10:42:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/tests/Notify/Bug_3252_Regression/Persistent_POA.{h,cpp}:
diff --git a/TAO/orbsvcs/orbsvcs/IFRService/Repository_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/Repository_i.cpp
index 995534cce41..2614268b0b7 100644
--- a/TAO/orbsvcs/orbsvcs/IFRService/Repository_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/IFRService/Repository_i.cpp
@@ -581,7 +581,7 @@ TAO_Repository_i::create_sections (void)
1, // It doesn't exist so create it.
this->pkinds_key_);
- u_int num_pkinds = this->num_pkinds ();
+ u_int const num_pkinds = this->num_pkinds ();
for (u_int i = 0; i < num_pkinds; ++i)
{
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp b/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp
index d8079c6dcfa..712897a1756 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/Builder.cpp
@@ -166,7 +166,7 @@ TAO_Notify_Builder::~TAO_Notify_Builder ()
}
CosNotifyFilter::FilterFactory_ptr
-TAO_Notify_Builder::build_filter_factory (void)
+TAO_Notify_Builder::build_filter_factory (PortableServer::POA_ptr poa)
{
TAO_Notify_FilterFactory* ff = ACE_Dynamic_Service<TAO_Notify_FilterFactory>::instance ("TAO_Notify_FilterFactory");
@@ -177,9 +177,7 @@ TAO_Notify_Builder::build_filter_factory (void)
CORBA::NO_MEMORY ());
}
- PortableServer::POA_var default_poa = TAO_Notify_PROPERTIES::instance ()->default_poa ();
-
- return ff->create (default_poa);
+ return ff->create (poa);
}
CosNotifyChannelAdmin::EventChannelFactory_ptr
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Builder.h b/TAO/orbsvcs/orbsvcs/Notify/Builder.h
index 1eba8f19066..6fe36a0234d 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/Builder.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/Builder.h
@@ -60,8 +60,8 @@ public:
, const char* factory_name = 0);
/// Build the Filter Factory.
- virtual CosNotifyFilter::FilterFactory_ptr build_filter_factory (
- );
+ virtual CosNotifyFilter::FilterFactory_ptr
+ build_filter_factory (PortableServer::POA_ptr poa);
/// Build EventChannel.
virtual CosNotifyChannelAdmin::EventChannel_ptr
@@ -71,7 +71,6 @@ public:
, CosNotifyChannelAdmin::ChannelID_out id
, const char* ec_name = 0);
-
virtual TAO_Notify_EventChannel *
build_event_channel (TAO_Notify_EventChannelFactory* ecf
, const CosNotifyChannelAdmin::ChannelID id
@@ -143,21 +142,17 @@ public:
build_proxy (TAO_Notify_SupplierAdmin* sa);
/// Apply Reactive concurrency.
- virtual void apply_reactive_concurrency (
- TAO_Notify_Object& object
- );
+ virtual void apply_reactive_concurrency (TAO_Notify_Object& object);
/// Apply Thread Pools.
virtual void apply_thread_pool_concurrency (
TAO_Notify_Object& object,
- const NotifyExt::ThreadPoolParams& tp_params
- );
+ const NotifyExt::ThreadPoolParams& tp_params);
/// Apply Thread Pools with Lanes.
virtual void apply_lane_concurrency (
TAO_Notify_Object& object,
- const NotifyExt::ThreadPoolLanesParams& tpl_params
- );
+ const NotifyExt::ThreadPoolLanesParams& tpl_params);
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp b/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp
index 12d2ecb65ec..78ca7166d32 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp
@@ -226,7 +226,7 @@ TAO_CosNotify_Service::init_service (CORBA::ORB_ptr orb)
if (TAO_Notify_PROPERTIES::instance()->separate_dispatching_orb())
{
// got here by way of svc.conf. no second orb supplied so create one
- if (0 == TAO_Notify_PROPERTIES::instance()->dispatching_orb())
+ if (CORBA::is_nil (TAO_Notify_PROPERTIES::instance()->dispatching_orb()))
{
ACE_DEBUG ((LM_DEBUG, "No dispatching orb supplied. Creating default one.\n"));
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp
index a6549b1eace..85caa64ae99 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp
@@ -12,8 +12,9 @@ ACE_RCSID(Notify,
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-TAO_Notify_ETCL_Filter::TAO_Notify_ETCL_Filter (void)
- :constraint_expr_ids_ (0)
+TAO_Notify_ETCL_Filter::TAO_Notify_ETCL_Filter (PortableServer::POA_ptr poa)
+ : constraint_expr_ids_ (0),
+ poa_ (PortableServer::POA::_duplicate (poa))
{
}
@@ -42,12 +43,12 @@ TAO_Notify_ETCL_Filter::constraint_grammar (void)
}
void
-TAO_Notify_ETCL_Filter::add_constraints_i (const CosNotifyFilter::ConstraintInfoSeq& constraint_info_seq
- )
+TAO_Notify_ETCL_Filter::add_constraints_i (
+ const CosNotifyFilter::ConstraintInfoSeq& constraint_info_seq)
{
for (CORBA::ULong index = 0; index < constraint_info_seq.length (); ++index)
{
- TAO_Notify_Constraint_Expr* notify_constr_expr;
+ TAO_Notify_Constraint_Expr* notify_constr_expr = 0;
ACE_NEW_THROW_EX (notify_constr_expr,
TAO_Notify_Constraint_Expr (),
@@ -75,8 +76,8 @@ TAO_Notify_ETCL_Filter::add_constraints_i (const CosNotifyFilter::ConstraintInfo
}
CosNotifyFilter::ConstraintInfoSeq*
-TAO_Notify_ETCL_Filter::add_constraints (const CosNotifyFilter::ConstraintExpSeq& constraint_list
- )
+TAO_Notify_ETCL_Filter::add_constraints (
+ const CosNotifyFilter::ConstraintExpSeq& constraint_list)
{
ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
CORBA::INTERNAL ());
@@ -117,9 +118,9 @@ TAO_Notify_ETCL_Filter::add_constraints (const CosNotifyFilter::ConstraintExpSeq
}
void
-TAO_Notify_ETCL_Filter::modify_constraints (const CosNotifyFilter::ConstraintIDSeq & del_list,
- const CosNotifyFilter::ConstraintInfoSeq & modify_list
- )
+TAO_Notify_ETCL_Filter::modify_constraints (
+ const CosNotifyFilter::ConstraintIDSeq & del_list,
+ const CosNotifyFilter::ConstraintInfoSeq & modify_list)
{
ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
CORBA::INTERNAL ());
@@ -197,8 +198,8 @@ TAO_Notify_ETCL_Filter::modify_constraints (const CosNotifyFilter::ConstraintIDS
}
CosNotifyFilter::ConstraintInfoSeq*
-TAO_Notify_ETCL_Filter::get_constraints (const CosNotifyFilter::ConstraintIDSeq & id_list
- )
+TAO_Notify_ETCL_Filter::get_constraints (
+ const CosNotifyFilter::ConstraintIDSeq & id_list)
{
ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
CORBA::INTERNAL ());
@@ -305,11 +306,9 @@ TAO_Notify_ETCL_Filter::destroy (void)
this->remove_all_constraints_i ();
- PortableServer::POA_var my_POA = _default_POA ();
+ PortableServer::ObjectId_var refTemp = poa_->servant_to_id (this);
- PortableServer::ObjectId_var refTemp = my_POA->servant_to_id (this);
-
- my_POA->deactivate_object (refTemp.in ());
+ poa_->deactivate_object (refTemp.in ());
}
CORBA::Boolean
@@ -319,8 +318,8 @@ TAO_Notify_ETCL_Filter::match (const CORBA::Any & /*filterable_data */)
}
CORBA::Boolean
-TAO_Notify_ETCL_Filter::match_structured (const CosNotification::StructuredEvent & filterable_data
- )
+TAO_Notify_ETCL_Filter::match_structured (
+ const CosNotification::StructuredEvent & filterable_data)
{
ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
CORBA::INTERNAL ());
@@ -361,16 +360,14 @@ TAO_Notify_ETCL_Filter::match_typed (
CosNotifyFilter::CallbackID
TAO_Notify_ETCL_Filter::attach_callback (
- CosNotifyComm::NotifySubscribe_ptr /* callback */
- )
+ CosNotifyComm::NotifySubscribe_ptr /* callback */)
{
throw CORBA::NO_IMPLEMENT ();
}
void
TAO_Notify_ETCL_Filter::detach_callback (
- CosNotifyFilter::CallbackID /* callback */
- )
+ CosNotifyFilter::CallbackID /* callback */)
{
throw CORBA::NO_IMPLEMENT ();
}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h
index a5014412d7e..91305df0485 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.h
@@ -44,10 +44,10 @@ class TAO_Notify_Serv_Export TAO_Notify_ETCL_Filter
{
public:
/// Constuctor
- TAO_Notify_ETCL_Filter (void);
+ TAO_Notify_ETCL_Filter (PortableServer::POA_ptr poa);
/// Destructor
- virtual ~TAO_Notify_ETCL_Filter ();
+ virtual ~TAO_Notify_ETCL_Filter (void);
protected:
virtual char * constraint_grammar (void);
@@ -108,6 +108,8 @@ private:
CONSTRAINT_EXPR_LIST;
CONSTRAINT_EXPR_LIST constraint_expr_list_;
+
+ PortableServer::POA_var poa_;
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp
index 1475f2b0851..2d2b79d9f26 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp
@@ -8,7 +8,8 @@ ACE_RCSID(Notify, TAO_Notify_ETCL_FilterFactory, "$Id$")
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-TAO_Notify_ETCL_FilterFactory::TAO_Notify_ETCL_FilterFactory (void)
+TAO_Notify_ETCL_FilterFactory::TAO_Notify_ETCL_FilterFactory (void) :
+ filter_poa_ (PortableServer::POA::_nil ())
{
}
@@ -17,13 +18,19 @@ TAO_Notify_ETCL_FilterFactory::~TAO_Notify_ETCL_FilterFactory ()
}
CosNotifyFilter::FilterFactory_ptr
-TAO_Notify_ETCL_FilterFactory::create (PortableServer::POA_var& filter_poa)
+TAO_Notify_ETCL_FilterFactory::create (PortableServer::POA_ptr filter_poa)
{
- this->filter_poa_ = filter_poa; // save the filter poa.
+ this->filter_poa_ = PortableServer::POA::_duplicate(filter_poa); // save the filter poa.
PortableServer::ServantBase_var servant_var (this);
- return _this ();
+ PortableServer::ObjectId_var id = filter_poa->activate_object (this);
+
+ CORBA::Object_var object = filter_poa->id_to_reference (id.in ());
+
+ CosNotifyFilter::FilterFactory_var filter = CosNotifyFilter::FilterFactory::_narrow (object.in ());
+
+ return filter._retn();
}
CosNotifyFilter::Filter_ptr
@@ -35,12 +42,11 @@ TAO_Notify_ETCL_FilterFactory::create_filter (const char *constraint_grammar)
ACE_OS::strcmp (constraint_grammar, "EXTENDED_TCL") != 0)
throw CosNotifyFilter::InvalidGrammar ();
-
// Create the RefCounted servant.
TAO_Notify_ETCL_Filter* filter = 0;
ACE_NEW_THROW_EX (filter,
- TAO_Notify_ETCL_Filter (),
+ TAO_Notify_ETCL_Filter (this->filter_poa_.in ()),
CORBA::NO_MEMORY ());
PortableServer::ServantBase_var filter_var (filter);
@@ -56,8 +62,7 @@ TAO_Notify_ETCL_FilterFactory::create_filter (const char *constraint_grammar)
CosNotifyFilter::MappingFilter_ptr
TAO_Notify_ETCL_FilterFactory::create_mapping_filter (const char * /*constraint_grammar*/,
- const CORBA::Any & /*default_value*/
- )
+ const CORBA::Any & /*default_value*/)
{
throw CORBA::NO_IMPLEMENT ();
}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h
index 55871ecd0ca..a7ad9f70063 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.h
@@ -51,19 +51,16 @@ public:
///= TAO_Notify_FilterFactory methods.
virtual CosNotifyFilter::FilterFactory_ptr create (
- PortableServer::POA_var& filter_poa
- );
+ PortableServer::POA_ptr filter_poa);
///= CosNotifyFilter::FilterFactory methods
virtual CosNotifyFilter::Filter_ptr create_filter (
- const char * constraint_grammar
- );
+ const char * constraint_grammar);
virtual CosNotifyFilter::MappingFilter_ptr create_mapping_filter (
const char * constraint_grammar,
- const CORBA::Any & default_value
- );
+ const CORBA::Any & default_value);
protected:
/// The POA in which to activate the Filters.
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
index 47f2c4fa838..2292e6ef782 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
@@ -47,6 +47,7 @@ TAO_Notify_EventChannel::TAO_Notify_EventChannel (void)
: ecf_ (0)
, ca_container_ (0)
, sa_container_ (0)
+ , default_filter_factory_ (CosNotifyFilter::FilterFactory::_nil ())
{
}
@@ -109,6 +110,10 @@ TAO_Notify_EventChannel::init (TAO_Notify_EventChannelFactory* ecf
this->set_admin (initial_admin);
+ PortableServer::POA_var default_poa = TAO_Notify_PROPERTIES::instance ()->default_poa ();
+ this->default_filter_factory_ =
+ TAO_Notify_PROPERTIES::instance()->builder()->build_filter_factory (default_poa.in());
+
// Note originally default admins were allocated here, bt this caused problems
// attempting to save the topology changes before the Event Channel was completely
// constructed and linked to the ECF.
@@ -165,6 +170,9 @@ TAO_Notify_EventChannel::init (TAO_Notify::Topology_Parent* parent)
this->set_qos (default_ec_qos);
+ PortableServer::POA_var default_poa = TAO_Notify_PROPERTIES::instance ()->default_poa ();
+ this->default_filter_factory_ =
+ TAO_Notify_PROPERTIES::instance()->builder()->build_filter_factory (default_poa.in ());
}
@@ -188,8 +196,7 @@ TAO_Notify_EventChannel::release (void)
}
void
-TAO_Notify_EventChannel::cleanup_proxy (CosNotifyChannelAdmin::ProxyID
- , bool )
+TAO_Notify_EventChannel::cleanup_proxy (CosNotifyChannelAdmin::ProxyID, bool)
{ }
int
@@ -214,8 +221,7 @@ TAO_Notify_EventChannel::destroy (void)
{
TAO_Notify_EventChannel::Ptr guard( this );
- int result = this->shutdown ();
- if ( result == 1)
+ if (this->shutdown () == 1)
return;
this->ecf_->remove (this);
@@ -225,6 +231,8 @@ TAO_Notify_EventChannel::destroy (void)
this->sa_container_.reset( 0 );
this->ca_container_.reset( 0 );
+
+ this->default_filter_factory_ = CosNotifyFilter::FilterFactory::_nil();
}
void
@@ -306,16 +314,15 @@ TAO_Notify_EventChannel::default_supplier_admin (void)
return CosNotifyChannelAdmin::SupplierAdmin::_duplicate (this->default_supplier_admin_.in ());
}
-::CosNotifyFilter::FilterFactory_ptr TAO_Notify_EventChannel::default_filter_factory (void)
+::CosNotifyFilter::FilterFactory_ptr
+TAO_Notify_EventChannel::default_filter_factory (void)
{
- return this->ecf_->get_default_filter_factory ();
+ return CosNotifyFilter::FilterFactory::_duplicate (this->default_filter_factory_.in ());
}
::CosNotifyChannelAdmin::ConsumerAdmin_ptr
TAO_Notify_EventChannel::new_for_consumers (CosNotifyChannelAdmin::InterFilterGroupOperator op,
- CosNotifyChannelAdmin::AdminID_out id
- )
-
+ CosNotifyChannelAdmin::AdminID_out id)
{
::CosNotifyChannelAdmin::ConsumerAdmin_var ca =
TAO_Notify_PROPERTIES::instance()->builder()->build_consumer_admin (this, op, id);
@@ -325,8 +332,7 @@ TAO_Notify_EventChannel::new_for_consumers (CosNotifyChannelAdmin::InterFilterGr
::CosNotifyChannelAdmin::SupplierAdmin_ptr
TAO_Notify_EventChannel::new_for_suppliers (CosNotifyChannelAdmin::InterFilterGroupOperator op,
- CosNotifyChannelAdmin::AdminID_out id
- )
+ CosNotifyChannelAdmin::AdminID_out id)
{
::CosNotifyChannelAdmin::SupplierAdmin_var sa =
TAO_Notify_PROPERTIES::instance()->builder()->build_supplier_admin (this, op, id);
@@ -400,8 +406,7 @@ TAO_Notify_EventChannel::for_suppliers (void)
void
TAO_Notify_EventChannel::validate_qos (const CosNotification::QoSProperties & /*required_qos*/,
- CosNotification::NamedPropertyRangeSeq_out /*available_qos*/
- )
+ CosNotification::NamedPropertyRangeSeq_out /*available_qos*/)
{
throw CORBA::NO_IMPLEMENT ();
}
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.h b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.h
index 522867bda64..9adc95ec755 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.h
@@ -177,6 +177,9 @@ private:
/// SupplierAdmin Container.
ACE_Auto_Ptr< TAO_Notify_SupplierAdmin_Container > sa_container_;
+ /// The default filter factory.
+ CosNotifyFilter::FilterFactory_var default_filter_factory_;
+
/// Release
virtual void release (void);
};
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp
index 182464a9b39..d958167541c 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp
@@ -2,7 +2,9 @@
#include "orbsvcs/Notify/EventChannelFactory.h"
-ACE_RCSID(Notify, TAO_Notify_EventChannelFactory, "$Id$")
+ACE_RCSID(Notify,
+ TAO_Notify_EventChannelFactory,
+ "$Id$")
#include "orbsvcs/Notify/Properties.h"
#include "orbsvcs/Notify/Factory.h"
@@ -62,8 +64,7 @@ TAO_Notify_EventChannelFactory::~TAO_Notify_EventChannelFactory ()
void
TAO_Notify_EventChannelFactory::destroy (void)
{
- int result = this->shutdown ();
- if ( result == 1)
+ if (this->shutdown () == 1)
return;
TAO_Notify_Properties* properties = TAO_Notify_PROPERTIES::instance();
@@ -80,9 +81,6 @@ TAO_Notify_EventChannelFactory::init (PortableServer::POA_ptr poa)
{
ACE_ASSERT (this->ec_container_.get() == 0);
- this->default_filter_factory_ =
- TAO_Notify_PROPERTIES::instance()->builder()->build_filter_factory ();
-
// Init ec_container_
TAO_Notify_EventChannel_Container* ecc = 0;
ACE_NEW_THROW_EX (ecc,
@@ -149,9 +147,7 @@ TAO_Notify_EventChannelFactory::remove (TAO_Notify_EventChannel* event_channel)
int
TAO_Notify_EventChannelFactory::shutdown (void)
{
- int sd_ret = TAO_Notify_Object::shutdown ();
-
- if (sd_ret == 1)
+ if (TAO_Notify_Object::shutdown () == 1)
return 1;
this->ec_container().shutdown ();
@@ -159,12 +155,6 @@ TAO_Notify_EventChannelFactory::shutdown (void)
return 0;
}
-CosNotifyFilter::FilterFactory_ptr
-TAO_Notify_EventChannelFactory::get_default_filter_factory (void)
-{
- return CosNotifyFilter::FilterFactory::_duplicate (this->default_filter_factory_.in ());
-}
-
CosNotifyChannelAdmin::EventChannel_ptr
TAO_Notify_EventChannelFactory::create_named_channel (
const CosNotification::QoSProperties& initial_qos,
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
index d6ee6fc6b8e..eeb6f245191 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h
@@ -68,13 +68,9 @@ public:
virtual void _add_ref (void);
virtual void _remove_ref (void);
- /// Remove <channel> from the <ec_container_>
+ /// Remove @a channel from the <ec_container_>
virtual void remove (TAO_Notify_EventChannel* channel);
- /// Accesor for the default filter factory shared by all EC's.
- virtual CosNotifyFilter::FilterFactory_ptr get_default_filter_factory (
- );
-
/// This method is called by the Notify_Service when the event channel
/// is automatically created and bound in the name service.
virtual CosNotifyChannelAdmin::EventChannel_ptr create_named_channel (
@@ -98,7 +94,7 @@ public:
//-- Topology_Parent
- virtual bool is_persistent () const;
+ virtual bool is_persistent (void) const;
virtual void save_persistent (TAO_Notify::Topology_Saver& saver);
virtual bool change_to_parent (void);
@@ -118,16 +114,12 @@ public:
TAO_Notify_ProxyConsumer * find_proxy_consumer (TAO_Notify::IdVec & id_path, size_t position);
TAO_Notify_ProxySupplier * find_proxy_supplier (TAO_Notify::IdVec & id_path, size_t position);
TAO_Notify_Object * follow_id_path (TAO_Notify::IdVec & id_path, size_t position);
- virtual TAO_Notify_Object::ID get_id () const;
-
+ virtual TAO_Notify_Object::ID get_id (void) const;
private:
/// = Data Members
- /// The default filter factory.
- CosNotifyFilter::FilterFactory_var default_filter_factory_;
-
/// = NotifyExt methods
virtual void destroy (void);
@@ -148,15 +140,12 @@ protected:
virtual ::CosNotifyChannelAdmin::EventChannel_ptr create_channel (
const CosNotification::QoSProperties & initial_qos,
const CosNotification::AdminProperties & initial_admin,
- CosNotifyChannelAdmin::ChannelID_out id
- );
+ CosNotifyChannelAdmin::ChannelID_out id);
- virtual ::CosNotifyChannelAdmin::ChannelIDSeq * get_all_channels (
- );
+ virtual ::CosNotifyChannelAdmin::ChannelIDSeq * get_all_channels (void);
virtual ::CosNotifyChannelAdmin::EventChannel_ptr get_event_channel (
- CosNotifyChannelAdmin::ChannelID id
- );
+ CosNotifyChannelAdmin::ChannelID id);
private:
typedef TAO_Notify_Container_T<TAO_Notify_EventChannel> TAO_Notify_EventChannel_Container;
diff --git a/TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h b/TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h
index bc8e6a4e164..1e0b3c56895 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h
+++ b/TAO/orbsvcs/orbsvcs/Notify/FilterFactory.h
@@ -38,7 +38,7 @@ public:
/// Factory method to create a FilterFactory reference
/// The Factory is activated in the default POA. The filters created are activated in the <filter_poa>.
virtual CosNotifyFilter::FilterFactory_ptr create (
- PortableServer::POA_var& filter_poa) = 0;
+ PortableServer::POA_ptr filter_poa) = 0;
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp b/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp
index 9535a47a99c..d6926c6f8e4 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/POA_Helper.cpp
@@ -20,7 +20,7 @@ TAO_Notify_POA_Helper::TAO_Notify_POA_Helper (void)
{
}
-TAO_Notify_POA_Helper::~TAO_Notify_POA_Helper ()
+TAO_Notify_POA_Helper::~TAO_Notify_POA_Helper (void)
{
}
@@ -95,15 +95,16 @@ TAO_Notify_POA_Helper::set_persistent_policy (PortableServer::POA_ptr parent_poa
void
-TAO_Notify_POA_Helper::create_i (PortableServer::POA_ptr parent_poa, const char* poa_name, CORBA::PolicyList &policy_list)
+TAO_Notify_POA_Helper::create_i (
+ PortableServer::POA_ptr parent_poa,
+ const char* poa_name,
+ CORBA::PolicyList &policy_list)
{
PortableServer::POAManager_var manager =
parent_poa->the_POAManager ();
// Create the child POA.
- this->poa_ = parent_poa->create_POA (poa_name,
- manager.in (),
- policy_list);
+ this->poa_ = parent_poa->create_POA (poa_name, manager.in (), policy_list);
if (DEBUG_LEVEL > 0)
{
@@ -164,11 +165,9 @@ TAO_Notify_POA_Helper::activate (PortableServer::Servant servant, CORBA::Long& i
}
// Convert CORBA::Long to ObjectId
- PortableServer::ObjectId_var oid =
- this->long_to_ObjectId (id);
+ PortableServer::ObjectId_var oid = this->long_to_ObjectId (id);
- poa_->activate_object_with_id (oid.in (),
- servant);
+ poa_->activate_object_with_id (oid.in (), servant);
return poa_->id_to_reference (oid.in ());
}
@@ -184,11 +183,9 @@ TAO_Notify_POA_Helper::activate_with_id (PortableServer::Servant servant, CORBA:
this->id_factory_.set_last_used (id);
// Convert CORBA::Long to ObjectId
- PortableServer::ObjectId_var oid =
- this->long_to_ObjectId (id);
+ PortableServer::ObjectId_var oid = this->long_to_ObjectId (id);
- poa_->activate_object_with_id (oid.in (),
- servant);
+ poa_->activate_object_with_id (oid.in (), servant);
return poa_->id_to_reference (oid.in ());
}
@@ -197,8 +194,7 @@ void
TAO_Notify_POA_Helper::deactivate (CORBA::Long id) const
{
// Convert CORBA::Long to ObjectId
- PortableServer::ObjectId_var oid =
- this->long_to_ObjectId (id);
+ PortableServer::ObjectId_var oid = this->long_to_ObjectId (id);
poa_->deactivate_object (oid.in ());
}
@@ -207,8 +203,7 @@ CORBA::Object_ptr
TAO_Notify_POA_Helper::id_to_reference (CORBA::Long id) const
{
// Convert CORBA::Long to ObjectId
- PortableServer::ObjectId_var oid =
- this->long_to_ObjectId (id);
+ PortableServer::ObjectId_var oid = this->long_to_ObjectId (id);
return poa_->id_to_reference (oid.in ());
}
diff --git a/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/server.cpp b/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/server.cpp
index 66fce2ea01d..d2b42f59355 100644
--- a/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/server.cpp
+++ b/TAO/orbsvcs/tests/Notify/Bug_3252_Regression/server.cpp
@@ -5,17 +5,14 @@
#include "ace/Service_Config.h"
#include "ace/Log_Msg.h"
-
#include "tao/corba.h"
#include "tao/ORB.h"
#include "tao/PortableServer/PortableServer.h"
#include "orbsvcs/CosNotifyChannelAdminC.h"
#include "orbsvcs/Notify/CosNotify_Service.h"
-
#include "DllOrb.h"
-
char const * const scpc_loadOrb = ACE_DYNAMIC_SERVICE_DIRECTIVE(
"testDllOrb",
"Bug_3252",
@@ -177,7 +174,7 @@ ACE_TMAIN(int, ACE_TCHAR ** argv)
}
ACE_DEBUG ((LM_INFO, ACE_TEXT ("serviceConfig.open done\n")));
- for(int i = 0; i < 2; ++i)
+ for(int i = 0; i < 5; ++i)
{
ACE_DEBUG ((LM_INFO, ACE_TEXT ("loadOrb ...\n")));
result = loadOrb(serviceConfig);