summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-06 21:09:35 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-06 21:09:35 +0000
commit8693e8076182ab38f16aba03f173ec2bbae93290 (patch)
treecc04185582e1603ca68840f97c23999adce7ade5
parent0b3df6bdba0e3b2ae82423898c839af308836fc6 (diff)
downloadATCD-8693e8076182ab38f16aba03f173ec2bbae93290.tar.gz
ChangeLogTag:Fri Dec 6 21:02:48 UTC 2002 Don Hinton <dhinton@ieee.org>
-rw-r--r--TAO/ChangeLog16
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp41
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h4
-rw-r--r--TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile2
-rw-r--r--TAO/orbsvcs/tests/EC_MT_Mcast/Makefile2
-rw-r--r--TAO/orbsvcs/tests/EC_Mcast/Makefile2
-rw-r--r--TAO/orbsvcs/tests/EC_Multiple/Makefile2
-rw-r--r--TAO/orbsvcs/tests/EC_Throughput/Makefile2
-rw-r--r--TAO/orbsvcs/tests/Event/Basic/Makefile2
-rw-r--r--TAO/orbsvcs/tests/Event/Performance/Makefile2
10 files changed, 57 insertions, 18 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index f883ef97c49..49981097f5e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,19 @@
+Fri Dec 6 21:02:48 UTC 2002 Don Hinton <dhinton@ieee.org>
+
+ * orbsvcs/orbsvcs/Event/ECG_Mcast_EH.{h,cpp}: Removed use of
+ TAO:Utils:Implicit_Deactivator since it has problems on windows.
+ Made dtor exception safe. Thanks to Bala for pointing this out.
+
+ * orbsvcs/tests/EC_Custom_Marshal/Makefile:
+ * orbsvcs/tests/EC_MT_Mcast/Makefile:
+ * orbsvcs/tests/EC_Mcast/Makefile:
+ * orbsvcs/tests/EC_Multiple/Makefile:
+ * orbsvcs/tests/EC_Throughput/Makefile:
+ * orbsvcs/tests/Event/Basic/Makefile:
+ * orbsvcs/tests/Event/Performance/Makefile: Removed link to
+ libTAO_Utils to pick up Implicit_Deactivator due to windows
+ problem cited above.
+
Fri Dec 6 05:20:28 UTC 2002 Don Hinton <dhinton@ieee.org>
* orbsvcs/orbsvcs/Event/ECG_Mcast_EH.{h,i,cpp}: Refactored
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp
index 6661680cbfc..1e8934553c7 100644
--- a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp
@@ -8,7 +8,6 @@
#include "orbsvcs/Event/EC_Gateway_UDP.h"
#include "orbsvcs/Event_Service_Constants.h"
-#include "tao/Utils/Implicit_Deactivator.h"
#include "ace/Reactor.h"
@@ -58,8 +57,14 @@ TAO_ECG_Mcast_EH::TAO_ECG_Mcast_EH (TAO_ECG_UDP_Receiver *recv,
TAO_ECG_Mcast_EH::~TAO_ECG_Mcast_EH (void)
{
- if (this->handle_)
- this->close ();
+ ACE_TRY
+ {
+ if (this->handle_)
+ this->close ();
+ }
+ ACE_CATCHALL
+ ACE_ENDTRY;
+
ACE::strdelete (this->net_if_);
delete this->lock_;
}
@@ -96,8 +101,18 @@ TAO_ECG_Mcast_EH::open (RtecEventChannelAdmin::EventChannel_ptr ec
}
ACE_CATCH(CORBA::SystemException, ex)
{
- TAO::Utils::Implicit_Deactivator deactivator (&this->observer_
- ACE_ENV_ARG_PARAMETER);
+ // @@ TODO This code is tedious and error prone, plus its
+ // exceptions should be ignored (no way to recover from them),
+ // we should encapsulate it in a Deactivator.
+
+ PortableServer::POA_var poa =
+ this->observer_._default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+ PortableServer::ObjectId_var id =
+ poa->servant_to_id (&this->observer_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+ poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
ACE_RE_THROW;
}
@@ -139,14 +154,24 @@ TAO_ECG_Mcast_EH::close (ACE_ENV_SINGLE_ARG_DECL)
this->subscriptions_.unbind_all ();
this->handles_.unbind_all ();
- TAO::Utils::Implicit_Deactivator deactivator (&this->observer_
- ACE_ENV_ARG_PARAMETER);
-
RtecEventChannelAdmin::Observer_Handle h = this->handle_;
this->handle_ = 0;
this->ec_->remove_observer (h ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
+ // @@ TODO If the first operation raises an exception then the
+ // second one never executes!!!
+ {
+ PortableServer::POA_var poa =
+ this->observer_._default_POA (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+ PortableServer::ObjectId_var id =
+ poa->servant_to_id (&this->observer_ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+ poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+ }
+
return 0;
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h
index dc0359e9089..1ce709b1472 100644
--- a/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.h
@@ -29,7 +29,6 @@
#include "ace/Synch.h"
#include "ace/Atomic_Op.h"
#include "tao/Synch_Refcountable.h"
-//#include "tao/Utils/Servant_Var.h"
/**
* @class TAO_ECG_Mcast_Socket
@@ -128,8 +127,7 @@ public:
*/
class Observer
- : public virtual POA_RtecEventChannelAdmin::Observer
- , public virtual PortableServer::RefCountServantBase
+ : public POA_RtecEventChannelAdmin::Observer
{
public:
/// We report changes in the EC subscriptions to the event
diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile b/TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile
index abc3acc52fa..74f55ecdca2 100644
--- a/TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile
+++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/Makefile
@@ -1,6 +1,6 @@
# $Id$
-LDLIBS= -lTAO_RTEvent -lTAO_RTSched -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_PortableServer -lTAO -lTAO_Utils
+LDLIBS= -lTAO_RTEvent -lTAO_RTSched -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_PortableServer -lTAO
ifndef TAO_ROOT
TAO_ROOT = $(ACE_ROOT)/TAO
diff --git a/TAO/orbsvcs/tests/EC_MT_Mcast/Makefile b/TAO/orbsvcs/tests/EC_MT_Mcast/Makefile
index 59daff5ebde..2bd88b5c1db 100644
--- a/TAO/orbsvcs/tests/EC_MT_Mcast/Makefile
+++ b/TAO/orbsvcs/tests/EC_MT_Mcast/Makefile
@@ -15,7 +15,7 @@ endif # ! TAO_ROOT
BIN2 = MCast
SRC=MCast.cpp Consumer.cpp Supplier.cpp AddrServer.cpp
-LDLIBS = -lTAO_RTEvent -lTAO_RTSched -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_Messaging -lTAO_PortableServer -lTAO -lTAO_Utils
+LDLIBS = -lTAO_RTEvent -lTAO_RTSched -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_Messaging -lTAO_PortableServer -lTAO
CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs \
$(foreach svc, $(TAO_ORBSVCS), -DTAO_ORBSVCS_HAS_$(svc))
diff --git a/TAO/orbsvcs/tests/EC_Mcast/Makefile b/TAO/orbsvcs/tests/EC_Mcast/Makefile
index c139fc0ca44..bda0daaf7d3 100644
--- a/TAO/orbsvcs/tests/EC_Mcast/Makefile
+++ b/TAO/orbsvcs/tests/EC_Mcast/Makefile
@@ -1,7 +1,7 @@
# $Id$
SRC = $(BIN:%=%$(VAR).cpp)
-LDLIBS= -lTAO_RTEvent -lTAO_Svc_Utils -lTAO_Messaging -lTAO_PortableServer -lTAO -lTAO_Utils
+LDLIBS= -lTAO_RTEvent -lTAO_Svc_Utils -lTAO_Messaging -lTAO_PortableServer -lTAO
ifndef TAO_ROOT
TAO_ROOT = $(ACE_ROOT)/TAO
diff --git a/TAO/orbsvcs/tests/EC_Multiple/Makefile b/TAO/orbsvcs/tests/EC_Multiple/Makefile
index 9d7978a5a73..cc5a6c32e8e 100644
--- a/TAO/orbsvcs/tests/EC_Multiple/Makefile
+++ b/TAO/orbsvcs/tests/EC_Multiple/Makefile
@@ -1,7 +1,7 @@
# $Id$
SRC = $(BIN:%=%$(VAR).cpp)
-LDLIBS= -lTAO_RTOLDEvent -lTAO_RTSchedEvent -lTAO_RTSched -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_PortableServer -lTAO -lTAO_Utils
+LDLIBS= -lTAO_RTOLDEvent -lTAO_RTSchedEvent -lTAO_RTSched -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_PortableServer -lTAO
ifndef TAO_ROOT
TAO_ROOT = $(ACE_ROOT)/TAO
diff --git a/TAO/orbsvcs/tests/EC_Throughput/Makefile b/TAO/orbsvcs/tests/EC_Throughput/Makefile
index c2bad07ac5d..d2b7a9ad0ee 100644
--- a/TAO/orbsvcs/tests/EC_Throughput/Makefile
+++ b/TAO/orbsvcs/tests/EC_Throughput/Makefile
@@ -1,6 +1,6 @@
# $Id$
-LDLIBS = -lTAO_RTOLDEvent -lTAO_RTSched -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_Messaging -lTAO_PortableServer -lTAO -lTAO_Utils
+LDLIBS = -lTAO_RTOLDEvent -lTAO_RTSched -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_Messaging -lTAO_PortableServer -lTAO
ifndef TAO_ROOT
TAO_ROOT = $(ACE_ROOT)/TAO
diff --git a/TAO/orbsvcs/tests/Event/Basic/Makefile b/TAO/orbsvcs/tests/Event/Basic/Makefile
index 5099b310dde..28ac0e04ae1 100644
--- a/TAO/orbsvcs/tests/Event/Basic/Makefile
+++ b/TAO/orbsvcs/tests/Event/Basic/Makefile
@@ -29,7 +29,7 @@ BIN2 = Reconnect \
Random
PSRC=$(addsuffix .cpp,$(BIN2)) Schedule.cpp
-LDLIBS = -lECTests -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_Messaging -lTAO_IORTable -lTAO_PortableServer -lTAO -lTAO_Utils
+LDLIBS = -lECTests -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_Messaging -lTAO_IORTable -lTAO_PortableServer -lTAO
CPPFLAGS += -I../lib -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs \
$(foreach svc, $(TAO_ORBSVCS), -DTAO_ORBSVCS_HAS_$(svc))
diff --git a/TAO/orbsvcs/tests/Event/Performance/Makefile b/TAO/orbsvcs/tests/Event/Performance/Makefile
index 508ae681dce..72ab2e9a3ae 100644
--- a/TAO/orbsvcs/tests/Event/Performance/Makefile
+++ b/TAO/orbsvcs/tests/Event/Performance/Makefile
@@ -19,7 +19,7 @@ BIN2 = Throughput \
Latency_Server
PSRC=$(addsuffix .cpp,$(BIN2))
-LDLIBS = -lECTests -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_Messaging -lTAO_PortableServer -lTAO_Strategies -lTAO -lTAO_Utils
+LDLIBS = -lECTests -lTAO_RTEvent -lTAO_CosNaming -lTAO_Svc_Utils -lTAO_IORTable -lTAO_Messaging -lTAO_PortableServer -lTAO_Strategies -lTAO
CPPFLAGS += -I../lib -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs \
$(foreach svc, $(TAO_ORBSVCS), -DTAO_ORBSVCS_HAS_$(svc))