summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-01-08 10:53:22 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-01-08 10:53:22 +0000
commitb25663cd79d0482923a68b2124c97350bf6cb6f0 (patch)
tree64a9ce6314b6b9afe95a06aa0bec96ffa14c6057
parentb6808ae544b1e3b23fb07208eaf535ceea45fc5b (diff)
downloadATCD-b25663cd79d0482923a68b2124c97350bf6cb6f0.tar.gz
Mon Jan 8 10:52:55 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog20
-rw-r--r--TAO/tao/Invocation_Base.cpp1
-rw-r--r--TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp31
3 files changed, 50 insertions, 2 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index d05f62f9a52..ac54c0ed282 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,23 @@
+Mon Jan 8 10:52:55 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tao/Invocation_Base.cpp (exception):
+ Set the forwarded_to_ member to nil again, it can be that
+ we had a forward request which was converted to a regular
+ exeption in a PI call and then we have to make sure we don't
+ keep the old data
+
+ * tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp (receive_other):
+ When an exception occurs make sure we implement the following
+ behaviour from the OMG spec section 21.3.6.5:
+ This interception point may raise a system exception. If it does, no other
+ Interceptors’ receive_other operations are called. The remaining
+ Interceptors in the Flow Stack are popped and have their receive_exception
+ interception point called.
+
+ This fixes the failing of bug 2287 regression on svn head. Thanks to
+ Simon McQueen for explaining the meaning of this test and reviewing
+ the changes above
+
Mon Jan 8 00:18:21 UTC 2007 Iliyan Jeliazkov <iliyan@ociweb.com>
* tests/TransportCurrent/Framework/run_test.pl:
diff --git a/TAO/tao/Invocation_Base.cpp b/TAO/tao/Invocation_Base.cpp
index 7f306a4231a..a5558b74465 100644
--- a/TAO/tao/Invocation_Base.cpp
+++ b/TAO/tao/Invocation_Base.cpp
@@ -265,6 +265,7 @@ namespace TAO
else if (CORBA::UserException::_downcast (exception) != 0)
this->invoke_status_ = TAO::TAO_INVOKE_USER_EXCEPTION;
+ this->forwarded_to_ = CORBA::Object::_nil ();
this->caught_exception_ = exception;
}
diff --git a/TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp b/TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp
index ee0c9b17a75..1d1dd7429b2 100644
--- a/TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp
+++ b/TAO/tao/PI/ClientRequestInterceptor_Adapter_Impl.cpp
@@ -29,7 +29,7 @@ namespace TAO
// This method implements one of the "starting" client side
// interception point.
- bool is_remote_request = invocation.is_remote_request();
+ bool const is_remote_request = invocation.is_remote_request();
ACE_TRY
{
@@ -237,8 +237,35 @@ namespace TAO
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
+ ACE_CATCHANY
+ {
+ // The receive_exception() interception point in the remaining
+ // interceptors must be called so call this method (not the
+ // interceptor's corresponding method) recursively. The call is
+ // made recursively since the caught exception must survive
+ // until the remaining interceptors have been called.
+
+ // Note that the recursion will stop once the flow stack size
+ // drops to zero, i.e., once each interceptor has been invoked.
+ // This prevents infinite recursion from occuring.
+
+ invocation.exception (&ACE_ANY_EXCEPTION);
+
+ this->receive_exception (invocation ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ PortableInterceptor::ReplyStatus status =
+ this->reply_status (invocation);
+
+ // Only re-throw the exception if it hasn't been transformed by
+ // the receive_exception() interception point (e.g. to a
+ // LOCATION_FORWARD).
+ if (status == PortableInterceptor::SYSTEM_EXCEPTION
+ || status == PortableInterceptor::USER_EXCEPTION)
+ ACE_RE_THROW;
+ }
ACE_ENDTRY;
- ACE_CHECK;
+ ACE_CHECK;
}
void