diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2009-03-19 04:58:39 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2009-03-19 04:58:39 +0000 |
commit | 589adfe0ea501c97b0aad6acd77fd7b0fc59f2c6 (patch) | |
tree | 69db431eb5ce3a45ae2562a98860efa9b9e0d9b0 | |
parent | 7348d39f2eb1954fefa77c0dfbd674397cc68392 (diff) | |
download | ATCD-589adfe0ea501c97b0aad6acd77fd7b0fc59f2c6.tar.gz |
Thu Mar 19 04:55:02 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com>
* orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp:
* orbsvcs/orbsvcs/Notify/EventChannelFactory.h:
* orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp:
Ensure the validator thread is explicitly halted on shutdown of
the notify service. This was a problem on some platforms such as
Solaris where the validator thread continued to run during
service shutdown, yielding a crash.
-rw-r--r-- | TAO/ChangeLog | 17 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp | 13 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h | 3 |
4 files changed, 32 insertions, 7 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 58bc844545f..d8fd3ef900c 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,18 +1,29 @@ +Thu Mar 19 04:55:02 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com> + + * orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp: + * orbsvcs/orbsvcs/Notify/EventChannelFactory.h: + * orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp: + + Ensure the validator thread is explicitly halted on shutdown of + the notify service. This was a problem on some platforms such as + Solaris where the validator thread continued to run during + service shutdown, yielding a crash. + Thu Mar 19 03:02:52 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com> * orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp: * orbsvcs/orbsvcs/Notify/ETCL_FilterFactory.cpp: - + Improve defense against the same pointer value coincidently being reused when allocating a filter servant. This occasionally happens in some of the test drivers, where the same notify service instance is reused although the specific event channel is destroyed after each test. Unfortunately the filter_POA is not, and could hold stale pointers. - + * orbsvcs/orbsvcs/Notify/POA_Helper.cpp: Cleaned up the debug output a bit. - + Wed Mar 18 19:04:22 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl> * tao/Profile.cpp: diff --git a/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp b/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp index f23af84ac4d..261d117eee3 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/CosNotify_Service.cpp @@ -385,6 +385,12 @@ TAO_CosNotify_Service::finalize_service ( // We're shutting things down, so ignore exceptions } } + + TAO_Notify_EventChannelFactory* necf = + dynamic_cast<TAO_Notify_EventChannelFactory*> (ecf->_servant ()); + if (necf != 0) + necf->stop_validator(); + } void diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp index 9833986c94b..e615a5c588a 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.cpp @@ -163,10 +163,7 @@ TAO_Notify_EventChannelFactory::remove (TAO_Notify_EventChannel* event_channel) int TAO_Notify_EventChannelFactory::shutdown (void) { - if (this->validate_client_task_.get () != 0) - { - this->validate_client_task_->shutdown (); - } + this->stop_validator(); if (TAO_Notify_Object::shutdown () == 1) return 1; @@ -260,6 +257,14 @@ TAO_Notify_EventChannelFactory::validate () this->ec_container().collection()->for_each(&wrk); } +void +TAO_Notify_EventChannelFactory::stop_validator () +{ + if (this->validate_client_task_.get () != 0) + { + this->validate_client_task_->shutdown (); + } +} bool TAO_Notify_EventChannelFactory::is_persistent () const diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h index 67a9b070627..cc120bae4dd 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h +++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannelFactory.h @@ -109,6 +109,9 @@ public: virtual void reconnect (void); virtual void validate (); + /// at shutdown time, this causes the validator thread to exit. + void stop_validator (void); + /// Handle change notifications bool handle_change (void); |