summaryrefslogtreecommitdiff
path: root/TAO/tao/Messaging
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2013-04-11 16:39:42 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2013-04-11 16:39:42 +0000
commitefc9cce557a187e7620616c742645b085f114c88 (patch)
treef1a7f20f418437d6ac5cca6a10ebafc4a13d1927 /TAO/tao/Messaging
parent537046fb5253868dbf1cb8573b00f1f3d5a9ded4 (diff)
downloadATCD-efc9cce557a187e7620616c742645b085f114c88.tar.gz
Thu Apr 11 16:16:21 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
Diffstat (limited to 'TAO/tao/Messaging')
-rw-r--r--TAO/tao/Messaging/AMH_Response_Handler.cpp37
-rw-r--r--TAO/tao/Messaging/AMH_Response_Handler.h1
2 files changed, 27 insertions, 11 deletions
diff --git a/TAO/tao/Messaging/AMH_Response_Handler.cpp b/TAO/tao/Messaging/AMH_Response_Handler.cpp
index 8416ec1c049..bf2ea0b9bbd 100644
--- a/TAO/tao/Messaging/AMH_Response_Handler.cpp
+++ b/TAO/tao/Messaging/AMH_Response_Handler.cpp
@@ -12,6 +12,7 @@
#include "tao/debug.h"
#include "tao/Buffer_Allocator_T.h"
#include "tao/SystemException.h"
+#include "tao/PortableServer/ForwardRequestC.h"
#include "ace/Copy_Disabled.h"
@@ -194,22 +195,36 @@ TAO_AMH_Response_Handler::_tao_rh_send_exception (const CORBA::Exception &ex)
// @@ It appears as if there should be a more efficient way to do
// this: the caller already knows this because it is part of the
// ExceptionHolder information.
- if (CORBA::SystemException::_downcast (&ex))
+
+ const PortableServer::ForwardRequest *fr =
+ PortableServer::ForwardRequest::_downcast (&ex);
+ if (fr != 0)
{
- reply_params.reply_status (GIOP::SYSTEM_EXCEPTION);
+ reply_params.reply_status (GIOP::LOCATION_FORWARD);
+ if (this->mesg_base_->generate_reply_header (this->_tao_out,
+ reply_params) == -1)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ this->_tao_out << fr->forward_reference;
}
else
{
- reply_params.reply_status (GIOP::USER_EXCEPTION);
- }
-
- if (this->mesg_base_->generate_exception_reply (this->_tao_out,
- reply_params,
- ex) == -1)
- {
- throw ::CORBA::INTERNAL ();
+ if (CORBA::SystemException::_downcast (&ex))
+ {
+ reply_params.reply_status (GIOP::SYSTEM_EXCEPTION);
+ }
+ else
+ {
+ reply_params.reply_status (GIOP::USER_EXCEPTION);
+ }
+ if (this->mesg_base_->generate_exception_reply (this->_tao_out,
+ reply_params,
+ ex) == -1)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
}
-
// Send the Exception
if (this->transport_->send_message (this->_tao_out,
0,
diff --git a/TAO/tao/Messaging/AMH_Response_Handler.h b/TAO/tao/Messaging/AMH_Response_Handler.h
index 12261a60cfa..36886d31c87 100644
--- a/TAO/tao/Messaging/AMH_Response_Handler.h
+++ b/TAO/tao/Messaging/AMH_Response_Handler.h
@@ -106,6 +106,7 @@ protected:
void _tao_rh_send_location_forward (CORBA::Object_ptr fwd,
CORBA::Boolean is_perm);
+
/// The outgoing CDR stream
/**
* The IDL-generated ResponseHandler implementations used this field