summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp50
1 files changed, 31 insertions, 19 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
index 74d4783a14a..a55f5e44f6c 100644
--- a/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
+++ b/TAO/orbsvcs/orbsvcs/Notify/EventChannel.cpp
@@ -1,20 +1,22 @@
// $Id$
-#include "EventChannel.h"
-
-#include "Container_T.h"
-#include "EventChannelFactory.h"
-#include "ConsumerAdmin.h"
-#include "SupplierAdmin.h"
-#include "Properties.h"
-#include "Factory.h"
-#include "Builder.h"
-#include "Find_Worker_T.h"
-#include "Seq_Worker_T.h"
-#include "Topology_Saver.h"
-#include "Save_Persist_Worker_T.h"
-#include "Reconnect_Worker_T.h"
-#include "Proxy.h"
+#include "orbsvcs/Notify/EventChannel.h"
+
+#include "orbsvcs/Notify/Container_T.h"
+#include "orbsvcs/Notify/EventChannelFactory.h"
+#include "orbsvcs/Notify/ConsumerAdmin.h"
+#include "orbsvcs/Notify/SupplierAdmin.h"
+#include "orbsvcs/Notify/Properties.h"
+#include "orbsvcs/Notify/Factory.h"
+#include "orbsvcs/Notify/Builder.h"
+#include "orbsvcs/Notify/Find_Worker_T.h"
+#include "orbsvcs/Notify/Seq_Worker_T.h"
+#include "orbsvcs/Notify/Topology_Saver.h"
+#include "orbsvcs/Notify/Save_Persist_Worker_T.h"
+#include "orbsvcs/Notify/Reconnect_Worker_T.h"
+#include "orbsvcs/Notify/Proxy.h"
+#include "orbsvcs/Notify/Event_Manager.h"
+#include "orbsvcs/Notify/POA_Helper.h"
#include "tao/debug.h"
//#define DEBUG_LEVEL 9
@@ -24,6 +26,8 @@
ACE_RCSID(Notify, TAO_Notify_EventChannel, "$Id$")
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
typedef TAO_Notify_Find_Worker_T<TAO_Notify_ConsumerAdmin
, CosNotifyChannelAdmin::ConsumerAdmin
, CosNotifyChannelAdmin::ConsumerAdmin_ptr
@@ -155,7 +159,6 @@ TAO_Notify_EventChannel::init (TAO_Notify::Topology_Parent* parent ACE_ENV_ARG_D
this->sa_container().init (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
-
// Set the admin properties.
TAO_Notify_AdminProperties* admin_properties = 0;
ACE_NEW_THROW_EX (admin_properties,
@@ -206,7 +209,10 @@ TAO_Notify_EventChannel::release (void)
int
TAO_Notify_EventChannel::shutdown (ACE_ENV_SINGLE_ARG_DECL)
{
- if (TAO_Notify_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
+ int sd_ret = TAO_Notify_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (1);
+
+ if (sd_ret == 1)
return 1;
this->ca_container().shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -226,13 +232,18 @@ TAO_Notify_EventChannel::destroy (ACE_ENV_SINGLE_ARG_DECL)
CORBA::SystemException
))
{
- if (this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
- return;
+ TAO_Notify_EventChannel::Ptr guard( this );
+ int result = this->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
+ if ( result == 1)
+ return;
this->ecf_->remove (this ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
+
+ this->sa_container_.reset( 0 );
+ this->ca_container_.reset( 0 );
}
void
@@ -671,3 +682,4 @@ TAO_Notify_EventChannel::sa_container()
return *sa_container_;
}
+TAO_END_VERSIONED_NAMESPACE_DECL