summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/ClientRequestInfo.cpp443
-rw-r--r--TAO/tao/ClientRequestInfo.h139
-rw-r--r--TAO/tao/ClientRequestInfo.inl46
-rw-r--r--TAO/tao/ClientRequestInfo_i.cpp579
-rw-r--r--TAO/tao/ClientRequestInfo_i.h287
-rw-r--r--TAO/tao/ClientRequestInfo_i.inl33
-rw-r--r--TAO/tao/ClientRequestInterceptor_Adapter.cpp37
-rw-r--r--TAO/tao/ClientRequestInterceptor_Adapter.h27
-rw-r--r--TAO/tao/ClientRequestInterceptor_Adapter.inl2
-rw-r--r--TAO/tao/Invocation_Base.h4
-rw-r--r--TAO/tao/ORB_Core_TSS_Resources.cpp10
-rw-r--r--TAO/tao/ORB_Core_TSS_Resources.h5
-rw-r--r--TAO/tao/tao.mpc2
13 files changed, 522 insertions, 1092 deletions
diff --git a/TAO/tao/ClientRequestInfo.cpp b/TAO/tao/ClientRequestInfo.cpp
index 40332c8d035..8d825802236 100644
--- a/TAO/tao/ClientRequestInfo.cpp
+++ b/TAO/tao/ClientRequestInfo.cpp
@@ -9,18 +9,83 @@ ACE_RCSID (tao,
ClientRequestInfo,
"$Id$")
-#include "ClientRequestInfo_i.h"
#include "Any.h"
#include "PolicyC.h"
#include "PortableInterceptorC.h"
+#include "PICurrent.h"
+#include "Invocation_Base.h"
+#include "Stub.h"
+#include "ORB_Core.h"
+#include "Profile.h"
+#include "debug.h"
+#include "Service_Context.h"
# if !defined (__ACE_INLINE__)
# include "ClientRequestInfo.inl"
# endif /* !__ACE_INLINE__ */
-TAO_ClientRequestInfo::TAO_ClientRequestInfo (void)
- : info_ (0)
+TAO_ClientRequestInfo::TAO_ClientRequestInfo (TAO::Invocation_Base *inv)
+ : invocation_ (inv),
+ caught_exception_ (0),
+ reply_status_ (-1),
+ rs_pi_current_ (),
+ copy_callback_ ()
{
+ this->setup_picurrent ();
+}
+
+void
+TAO_ClientRequestInfo::setup_picurrent (void)
+{
+ // Retrieve the thread scope current (no TSS access incurred yet).
+ TAO::PICurrent *pi_current =
+ this->invocation_->orb_core ()->pi_current ();
+
+ // If the slot count is zero, then there is nothing to copy.
+ // Prevent any copying (and hence TSS accesses) from occurring.
+ if (pi_current != 0 && pi_current->slot_count () != 0)
+ {
+ // Retrieve the thread scope current.
+ TAO::PICurrent_Impl *tsc = pi_current->tsc ();
+
+ // Logically copy the TSC's slot table to the RSC.
+ this->rs_pi_current_.lc_slot_table (tsc);
+
+ // PICurrent will potentially have to call back on the request
+ // scope current so that it can deep copy the contents of the
+ // thread scope current if the contents of the thread scope
+ // current are about to be modified. It is necessary to do this
+ // deep copy once in order to completely isolate the request
+ // scope current from the thread scope current. This is only
+ // necessary, if the thread scope current is modified after its
+ // contents have been *logically* copied to the request scope
+ // current.
+ this->copy_callback_.src_and_dst (tsc, &this->rs_pi_current_);
+ tsc->copy_callback (&this->copy_callback_);
+ }
+}
+
+IOP::ServiceContext *
+TAO_ClientRequestInfo::get_service_context_i (
+ TAO_Service_Context &service_context_list,
+ IOP::ServiceId id
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ IOP::ServiceContext_var service_context;
+
+ if (service_context_list.get_context (id, service_context.out ()) != 0)
+ {
+ // Found.
+ return service_context._retn ();
+ }
+ else
+ {
+ // Not found.
+ ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 26,
+ CORBA::COMPLETED_NO),
+ 0);
+ }
}
CORBA::Object_ptr
@@ -30,7 +95,7 @@ TAO_ClientRequestInfo::target (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
- return this->info_->target (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return CORBA::Object::_duplicate (this->invocation_->target ());
}
CORBA::Object_ptr
@@ -40,7 +105,7 @@ TAO_ClientRequestInfo::effective_target (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
- return this->info_->effective_target (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return CORBA::Object::_duplicate (this->invocation_->effective_target ());
}
IOP::TaggedProfile *
@@ -50,7 +115,36 @@ TAO_ClientRequestInfo::effective_profile (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->effective_profile (ACE_ENV_SINGLE_ARG_PARAMETER);
+ IOP::TaggedProfile *tagged_profile = 0;
+ ACE_NEW_THROW_EX (tagged_profile,
+ IOP::TaggedProfile,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ TAO::VMCID,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK_RETURN (0);
+
+ IOP::TaggedProfile_var safe_tagged_profile = tagged_profile;
+
+ TAO_Stub *stub =
+ this->invocation_->effective_target ()->_stubobj ();
+
+ IOP::TaggedProfile *ep =
+ stub->profile_in_use ()->create_tagged_profile ();
+
+ if (ep == 0)
+ {
+ ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28,
+ CORBA::COMPLETED_NO),
+ 0);
+ }
+
+ // @@BAD_PARAM exception
+ tagged_profile->tag = ep->tag;
+ tagged_profile->profile_data = ep->profile_data; // Deep copy
+
+ return safe_tagged_profile._retn ();
}
// Use at own risk. There is no way currently of extracting an
@@ -63,7 +157,34 @@ TAO_ClientRequestInfo::received_exception (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->received_exception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ if (this->reply_status_ != PortableInterceptor::SYSTEM_EXCEPTION
+ && this->reply_status_ != PortableInterceptor::USER_EXCEPTION)
+ {
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
+ CORBA::COMPLETED_NO), 0);
+ }
+
+ // The spec says that if it is a user exception which can't be
+ // inserted then the UNKNOWN exception needs to be thrown with minor
+ // code 1.
+
+ CORBA::Any * temp = 0;
+
+ ACE_NEW_THROW_EX (temp,
+ CORBA::Any,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ TAO::VMCID,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK_RETURN (0);
+
+ CORBA::Any_var caught_exception = temp;
+
+ if (this->caught_exception_ != 0)
+ *temp <<= *(this->caught_exception_);
+
+ return caught_exception._retn ();
}
char *
@@ -74,7 +195,15 @@ TAO_ClientRequestInfo::received_exception_id (
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->received_exception_id (ACE_ENV_SINGLE_ARG_PARAMETER);
+ if (this->reply_status_ != PortableInterceptor::SYSTEM_EXCEPTION
+ && this->reply_status_ != PortableInterceptor::USER_EXCEPTION)
+ {
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
+ CORBA::COMPLETED_NO),
+ 0);
+ }
+
+ return CORBA::string_dup (this->caught_exception_->_rep_id ());
}
IOP::TaggedComponent *
@@ -86,8 +215,46 @@ TAO_ClientRequestInfo::get_effective_component (
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->get_effective_component (id
- ACE_ENV_ARG_PARAMETER);
+ TAO_Stub *stub =
+ this->invocation_->effective_target ()->_stubobj ();
+
+ TAO_Tagged_Components &ecs =
+ stub->profile_in_use ()->tagged_components ();
+
+ IOP::MultipleComponentProfile &components = ecs.components ();
+
+ const CORBA::ULong len = components.length ();
+ for (CORBA::ULong i = 0; i < len; ++i)
+ {
+ if (components[i].tag == id)
+ {
+ IOP::TaggedComponent *tagged_component = 0;
+
+ // Only allocate a sequence if we have a tagged component
+ // that matches the given IOP::ComponentId.
+ ACE_NEW_THROW_EX (tagged_component,
+ IOP::TaggedComponent,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ TAO::VMCID,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK_RETURN (0);
+
+ IOP::TaggedComponent_var safe_tagged_component =
+ tagged_component;
+
+ (*tagged_component) = components[i]; // Deep copy
+
+ return safe_tagged_component._retn ();
+ }
+ }
+
+ // No tagged component was found that matched the given
+ // IOP::ComponentId.
+ ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28,
+ CORBA::COMPLETED_NO),
+ 0);
}
IOP::TaggedComponentSeq *
@@ -99,8 +266,56 @@ TAO_ClientRequestInfo::get_effective_components (
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->get_effective_components (id
- ACE_ENV_ARG_PARAMETER);
+ TAO_Stub *stub =
+ this->invocation_->target ()->_stubobj ();
+
+ TAO_Tagged_Components &ecs =
+ stub->profile_in_use ()->tagged_components ();
+
+ IOP::MultipleComponentProfile &components = ecs.components ();
+
+ IOP::TaggedComponentSeq *tagged_components = 0;
+ IOP::TaggedComponentSeq_var safe_tagged_components;
+
+ const CORBA::ULong len = components.length ();
+ for (CORBA::ULong i = 0; i < len; ++i)
+ {
+ if (components[i].tag == id)
+ {
+ if (tagged_components == 0)
+ {
+ // Only allocate a sequence if we have tagged components
+ // to place into the sequence.
+ ACE_NEW_THROW_EX (tagged_components,
+ IOP::TaggedComponentSeq,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ TAO::VMCID,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK_RETURN (0);
+
+ safe_tagged_components = tagged_components;
+ }
+
+ const CORBA::ULong old_len = safe_tagged_components->length ();
+ safe_tagged_components->length (old_len + 1);
+
+ safe_tagged_components[old_len] = components[i]; // Deep copy
+ }
+ }
+
+ if (tagged_components == 0)
+ {
+ // No tagged component sequence was allocated, meaning no tagged
+ // components were found that matched the given
+ // IOP::ComponentId.
+ ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28,
+ CORBA::COMPLETED_NO),
+ 0);
+ }
+
+ return safe_tagged_components._retn ();
}
CORBA::Policy_ptr
@@ -111,8 +326,21 @@ TAO_ClientRequestInfo::get_request_policy (CORBA::PolicyType type
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Policy::_nil ());
- return this->info_->get_request_policy (type
- ACE_ENV_ARG_PARAMETER);
+ // @@ Do we need to look anywhere else for the request policies?
+
+#if TAO_HAS_CORBA_MESSAGING == 1
+ return this->invocation_->target ()->_get_policy (type
+ ACE_ENV_ARG_PARAMETER);
+#else
+ ACE_UNUSED_ARG (type);
+
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (
+ CORBA::SystemException::_tao_minor_code (
+ TAO::VMCID,
+ ENOTSUP),
+ CORBA::COMPLETED_NO),
+ 0);
+#endif /* TAO_HAS_CORBA_MESSAGING == 1 */
}
void
@@ -125,10 +353,15 @@ TAO_ClientRequestInfo::add_request_service_context (
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
- this->info_->add_request_service_context (service_context,
- replace
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ // Get the service context from the list
+ TAO_Service_Context &service_context_list =
+ this->invocation_->request_service_context ();
+
+ if (service_context_list.set_context (service_context, replace) == 0)
+ {
+ ACE_THROW (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 15,
+ CORBA::COMPLETED_NO));
+ }
}
CORBA::ULong
@@ -138,7 +371,83 @@ TAO_ClientRequestInfo::request_id (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->request_id (ACE_ENV_SINGLE_ARG_PARAMETER);
+ // @todo We may have to worry about AMI once we support interceptors
+ // in AMI requests since the Invocation object no longer
+ // exists once an AMI request has been made. In that case,
+ // the reply dispatcher address should be used.
+
+ // The request ID must be unique across all outstanding requests.
+ // To avoid synchronization overhead, the address of this Invocation
+ // object is used as the request ID. This guarantees that the
+ // request ID is unique without being forced to acquire a lock.
+ //
+ // For 64-bit platforms, we right shift 8 bits and then use the
+ // lower 32 bits of that shifted value. Rather than losing the
+ // upper 32 bits of significant digits by taking the lower 32 bits,
+ // we only lose the upper 24 by doing the shift. Basically, the
+ // resulting request ID will comprised of bits 8 through 39. This is
+ // made possible by the fact that this Invocation object is large
+ // enough to increase the likelihood that those bits (0 through 39)
+ // are unique. In particular, this->buffer_ is 512 bytes
+ // (ACE_CDR::DEFAULT_BUFSIZE) long by default; implying that
+ // dropping the lower 8 bits of the this Invocation object's 64 bit
+ // address (i.e. 256 bytes) is not a problem.
+
+ CORBA::ULong id = 0;
+
+ // Note that we reinterpret_cast to an "unsigned long" instead of
+ // CORBA::ULong since we need to first cast to an integer large
+ // enough to hold an address to avoid compile-time warnings on some
+ // 64-bit platforms.
+
+ // 32 bit address
+ if (sizeof (this) == 4)
+ id =
+ static_cast<CORBA::ULong> (
+ reinterpret_cast<ptrdiff_t> (this->invocation_));
+
+ // 64 bit address -- bits 8 through 39 (see notes above!)
+ // In this case, we make sure this object is large enough to safely
+ // do the right shift. This is necessary since the size of the
+ // buffer that makes this object is configurable.
+ else if (sizeof (this) == 8
+ && sizeof (*(this->invocation_)) > 256 /* 2 << 8 */)
+ id =
+ (static_cast<CORBA::ULong> (
+ reinterpret_cast<ptrdiff_t> (this->invocation_)) >> 8) & 0xFFFFFFFFu;
+
+ // 64 bit address -- lower 32 bits
+ else if (sizeof (this) == 8)
+ id =
+ static_cast<CORBA::ULong> (
+ reinterpret_cast<ptrdiff_t> (this->invocation_)) & 0xFFFFFFFFu;
+
+ // @@ The following request ID generator prevents the
+ // PortableInterceptor::ClientRequestInterceptor::send_request()
+ // interception point from occuring before the call to connect,
+ // thus preventing us from adding an optimization that itself
+ // prevents a connection from being unnecessarily performed.
+ // Thus, the ClientRequestInfo object is forced to have its own
+ // request ID generator in order to make it possible to implement
+ // the above optimization.
+ //
+ // Ideally, this request ID generator should go away, especially
+ // since it adds a lock to the critical path.
+ // else // Fallback
+ // id = this->invocation_->request_id ();
+
+ else
+ {
+ if (TAO_debug_level > 0)
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) ClientRequestInfo::request_id() failed\n"
+ "(%P|%t) since its request ID generator is not\n"
+ "(%P|%t) supported on this platform.\n"));
+
+ ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ }
+
+ return id;
}
char *
@@ -148,7 +457,7 @@ TAO_ClientRequestInfo::operation (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return CORBA::string_dup (this->invocation_->operation_name ());
}
Dynamic::ParameterList *
@@ -158,7 +467,7 @@ TAO_ClientRequestInfo::arguments (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->invocation_->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
}
Dynamic::ExceptionList *
@@ -168,7 +477,7 @@ TAO_ClientRequestInfo::exceptions (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->exceptions (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->invocation_->exceptions (ACE_ENV_SINGLE_ARG_PARAMETER);
}
Dynamic::ContextList *
@@ -178,7 +487,9 @@ TAO_ClientRequestInfo::contexts (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->contexts (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
+ CORBA::COMPLETED_NO),
+ 0);
}
Dynamic::RequestContext *
@@ -188,7 +499,9 @@ TAO_ClientRequestInfo::operation_context (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->operation_context (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
+ CORBA::COMPLETED_NO),
+ 0);
}
CORBA::Any *
@@ -198,7 +511,7 @@ TAO_ClientRequestInfo::result (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->result (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->invocation_->result (ACE_ENV_SINGLE_ARG_PARAMETER);
}
CORBA::Boolean
@@ -208,7 +521,7 @@ TAO_ClientRequestInfo::response_expected (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->response_expected (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->invocation_->response_expected ();
}
Messaging::SyncScope
@@ -218,7 +531,7 @@ TAO_ClientRequestInfo::sync_scope (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->sync_scope (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->invocation_->sync_scope ();
}
PortableInterceptor::ReplyStatus
@@ -228,7 +541,15 @@ TAO_ClientRequestInfo::reply_status (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (PortableInterceptor::SYSTEM_EXCEPTION);
- return this->info_->reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ if (this->reply_status_ == -1)
+ {
+ // A reply hasn't been received yet.
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
+ CORBA::COMPLETED_NO),
+ -1);
+ }
+
+ return this->reply_status_;
}
CORBA::Object_ptr
@@ -238,7 +559,17 @@ TAO_ClientRequestInfo::forward_reference (ACE_ENV_SINGLE_ARG_DECL)
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
- return this->info_->forward_reference (ACE_ENV_SINGLE_ARG_PARAMETER);
+ if (this->reply_status_ != PortableInterceptor::LOCATION_FORWARD)
+ {
+ ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
+ CORBA::COMPLETED_NO),
+ CORBA::Object::_nil ());
+ }
+
+ // TAO::Invocation_Base::forward_reference() already duplicates the
+ // reference before returning it so there is no need to duplicate it
+ // here.
+ return this->invocation_->forwarded_reference ();
}
CORBA::Any *
@@ -250,8 +581,8 @@ TAO_ClientRequestInfo::get_slot (PortableInterceptor::SlotId id
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->get_slot (id
- ACE_ENV_ARG_PARAMETER);
+ return this->rs_pi_current_.get_slot (id
+ ACE_ENV_ARG_PARAMETER);
}
IOP::ServiceContext *
@@ -263,8 +594,13 @@ TAO_ClientRequestInfo::get_request_service_context (
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->get_request_service_context (id
- ACE_ENV_ARG_PARAMETER);
+ // Get the service context from the list
+ TAO_Service_Context &service_context_list =
+ this->invocation_->request_service_context ();
+
+ return this->get_service_context_i (service_context_list,
+ id
+ ACE_ENV_ARG_PARAMETER);
}
IOP::ServiceContext *
@@ -276,20 +612,39 @@ TAO_ClientRequestInfo::get_reply_service_context (
this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- return this->info_->get_reply_service_context (id
- ACE_ENV_ARG_PARAMETER);
-}
-
-// -------------------------------------------------------------------
+ // Get the service context from the list
+ TAO_Service_Context &service_context_list =
+ this->invocation_->reply_service_context ();
+ return this->get_service_context_i (service_context_list,
+ id
+ ACE_ENV_ARG_PARAMETER);
+}
-TAO_ClientRequestInfo_Guard::~TAO_ClientRequestInfo_Guard (void)
+void
+TAO_ClientRequestInfo::reply_status (TAO::Invocation_Status invoke_status)
{
- // Restore the previous request information into the TSS object.
- // Note that no TSS access occurs here.
- if (this->info_ != 0)
- this->info_->info (this->previous_info_);
+ switch (invoke_status)
+ {
+ case TAO::TAO_INVOKE_SUCCESS:
+ this->reply_status_ = PortableInterceptor::SUCCESSFUL;
+ break;
+ case TAO::TAO_INVOKE_RESTART:
+ if (this->invocation_->is_forwarded ())
+ this->reply_status_ = PortableInterceptor::LOCATION_FORWARD;
+ else
+ this->reply_status_ = PortableInterceptor::TRANSPORT_RETRY;
+ break;
+ case TAO::TAO_INVOKE_USER_EXCEPTION:
+ this->reply_status_ = PortableInterceptor::USER_EXCEPTION;
+ break;
+ case TAO::TAO_INVOKE_SYSTEM_EXCEPTION:
+ this->reply_status_ = PortableInterceptor::SYSTEM_EXCEPTION;
+ break;
+ default:
+ this->reply_status_ = PortableInterceptor::UNKNOWN;
+ break;
+ }
}
-
#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tao/ClientRequestInfo.h b/TAO/tao/ClientRequestInfo.h
index 2cf18674e14..fc8000cc0ab 100644
--- a/TAO/tao/ClientRequestInfo.h
+++ b/TAO/tao/ClientRequestInfo.h
@@ -33,37 +33,43 @@
#include "tao/ClientRequestInfoC.h"
#include "tao/ORB_Constants.h"
+#include "Invocation_Utils.h"
+#include "PIForwardRequestC.h"
+#include "PICurrent_Impl.h"
+#include "PICurrent_Copy_Callback.h"
-class TAO_ClientRequestInfo_i;
+class TAO_Service_Context;
+
+namespace TAO
+{
+ class Invocation_Base;
+}
+
+namespace Dynamic
+{
+ class ParameterList;
+ class ExceptionList;
+ typedef CORBA::StringSeq RequestContext;
+ typedef CORBA::StringSeq ContextList;
+}
+
+namespace Messaging
+{
+ typedef CORBA::Short SyncScope;
+}
/**
* @class TAO_ClientRequestInfo
*
* @brief Implementation of the PortableInterceptor::ClientRequestInfo
* interface.
- *
- * This class forwards all method calls to the underlying
- * ClientRequestInfo implementation.
- * @par
- * An instance of this class is placed in TSS, where as the underlying
- * implementation is instantiated on the stack during each CORBA
- * request. During each request invocation, a pointer to the stack
- * instantiated implementation is placed in the instance of this
- * class.
- * @par
- * This may seem unnecessary. However, it is necessary to avoid
- * instantiating an object that inherits from CORBA::Object in the
- * critical path. Such an instantiation would cause a lock to be
- * initialized (not acquired) in the critical path, which can degrade
- * performance significantly.
*/
class TAO_ClientRequestInfo
: public virtual PortableInterceptor::ClientRequestInfo,
public virtual TAO_Local_RefCounted_Object
{
public:
-
- TAO_ClientRequestInfo (void);
+ TAO_ClientRequestInfo (TAO::Invocation_Base *invocation);
/// Return an ID unique to the current request. This request ID may
/// or may not be the same as the GIOP request ID.
@@ -211,13 +217,27 @@ public:
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
- /// Set the ClientRequestInfo implementation which this class
- /// forwards all method call to.
- void info (TAO_ClientRequestInfo_i *info);
+ /**
+ * @name Stub helper methods
+ *
+ * The following methods are used in the implementation of the
+ * Stubs, they are not part of the ClientRequestInfo interface, but
+ * an extension used internally by TAO.
+ */
+ //@{
+
+ /// Change the exception status.
+ void exception (CORBA::Exception *exception);
+
+ /// Set the status of the received reply.
+ void reply_status (TAO::Invocation_Status s);
+
+ /// Extract the forward object reference from the
+ /// PortableInterceptor::ForwardRequest exception, and set the reply
+ /// status flag accordingly.
+ void forward_reference (PortableInterceptor::ForwardRequest &exc);
+ //@}
- /// Get the ClientRequestInfo implementation which this class
- /// forwards all method call to.
- TAO_ClientRequestInfo_i * info (void) const;
private:
@@ -225,49 +245,50 @@ private:
/// context of a request.
void check_validity (ACE_ENV_SINGLE_ARG_DECL);
-private:
-
- /// Pointer to the object that actually implements the
- /// ClientRequestInfo functionality.
- TAO_ClientRequestInfo_i * info_;
-};
+ /// Setup thread scope and request scope
+ /// PortableInterceptor::Current objects.
+ void setup_picurrent (void);
-// -------------------------------------------------------------------
-
-/**
- * @class TAO_ClientRequestInfo_Guard
- *
- * @brief Guard for exception safe TAO_ClientRequestInfo_i pointer
- * swapping.
- *
- * This class is used to ensure the swapping of
- * TAO_ClientRequestInfo_i pointers in a TAO_ClientRequestInfo object
- * is performed in an exception-safe manner when interception points
- * are being invoked.
- */
-class TAO_ClientRequestInfo_Guard
-{
-public:
-
- /// Constructor.
- TAO_ClientRequestInfo_Guard (TAO_ClientRequestInfo *info,
- TAO_ClientRequestInfo_i *ri);
-
- /// Destructor.
- ~TAO_ClientRequestInfo_Guard (void);
+ /// Helper method to get the request and response service contexts.
+ IOP::ServiceContext *get_service_context_i (
+ TAO_Service_Context &service_context_list,
+ IOP::ServiceId id
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
private:
+ /// Pointer to the invocation object.
+ TAO::Invocation_Base *invocation_;
+
+ /// Pointer to the caught exception.
+ CORBA::Exception *caught_exception_;
- /// Pointer to the TAO_ClientRequestInfo object upon which pointer
- /// swaps will occur.
- TAO_ClientRequestInfo * info_;
+ /// Reply status for the current request.
+ PortableInterceptor::ReplyStatus reply_status_;
- /// Pointer to the TAO_ClientRequestInfo_i object that was
- /// previously stored in the TAO_ClientRequestInfo object.
- TAO_ClientRequestInfo_i * previous_info_;
+ /// The "Request Scope Current" (RSC) object, as required by
+ /// Portable Interceptors.
+ TAO::PICurrent_Impl rs_pi_current_;
+ /// Callback object to be executed when shallow copied slot table
+ /// must be deep copied.
+ /**
+ * This callback object deep copies the slot table from the TSC to
+ * the RSC.
+ * @par
+ * As an optimization, the TSC's slot table is initially only
+ * shallowed copied to the RSC. If the TSC's slot table will be
+ * modified, e.g. via PICurrent::set_slot(), it's slot table must be
+ * deep copied to the RSC before actually modifying that slot
+ * table. This is necessary since the RSC is read-only on the
+ * client side, meaning that changes in the TSC that occur after
+ * instantiation of the RSC must not be reflected in the RSC.
+ */
+ TAO::PICurrent_Copy_Callback copy_callback_;
};
+// -------------------------------------------------------------------
+
# if defined (__ACE_INLINE__)
# include "ClientRequestInfo.inl"
# endif /* __ACE_INLINE__ */
diff --git a/TAO/tao/ClientRequestInfo.inl b/TAO/tao/ClientRequestInfo.inl
index 07eaef27c7f..59076ba692d 100644
--- a/TAO/tao/ClientRequestInfo.inl
+++ b/TAO/tao/ClientRequestInfo.inl
@@ -7,37 +7,43 @@
ACE_INLINE void
TAO_ClientRequestInfo::check_validity (ACE_ENV_SINGLE_ARG_DECL)
{
- if (this->info_ == 0)
+ if (this->invocation_ == 0)
ACE_THROW (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
CORBA::COMPLETED_NO));
}
ACE_INLINE void
-TAO_ClientRequestInfo::info (TAO_ClientRequestInfo_i *info)
+TAO_ClientRequestInfo::exception (CORBA::Exception *exception)
{
- this->info_ = info;
+ if (CORBA::SystemException::_downcast (exception) != 0)
+ this->reply_status_ = PortableInterceptor::SYSTEM_EXCEPTION;
+ else if (CORBA::UserException::_downcast (exception) != 0)
+ this->reply_status_ = PortableInterceptor::USER_EXCEPTION;
+
+ // @@ Is it possible for both of the above downcasts to fail?
+
+ this->caught_exception_ = exception;
}
-ACE_INLINE TAO_ClientRequestInfo_i *
-TAO_ClientRequestInfo::info (void) const
+ACE_INLINE void
+TAO_ClientRequestInfo::forward_reference (
+ PortableInterceptor::ForwardRequest &)
{
- return this->info_;
+ // Note that we're converting the ForwardRequest exception in to a
+ // LOCATION_FORWARD reply, so we do not set the exception status.
+ //
+ // The forward object reference is not handled here. Rather, it is
+ // handled by the TAO::Invocation_Base object so that its profiles
+ // can be added to the list of forward profiles.
+
+ this->reply_status_ = PortableInterceptor::LOCATION_FORWARD;
}
-// -------------------------------------------------------------------
-ACE_INLINE
-TAO_ClientRequestInfo_Guard::TAO_ClientRequestInfo_Guard (
- TAO_ClientRequestInfo * info,
- TAO_ClientRequestInfo_i * ri)
- : info_ (info),
- previous_info_ (0)
-{
- if (info != 0)
- {
- this->previous_info_ = info->info ();
- info->info (ri);
- }
-}
+
+
+
+
+
diff --git a/TAO/tao/ClientRequestInfo_i.cpp b/TAO/tao/ClientRequestInfo_i.cpp
deleted file mode 100644
index 54a9c0a5055..00000000000
--- a/TAO/tao/ClientRequestInfo_i.cpp
+++ /dev/null
@@ -1,579 +0,0 @@
-#include "ClientRequestInfo_i.h"
-
-#if (TAO_HAS_INTERCEPTORS == 1)
-
-#include "Invocation_Base.h"
-#include "Stub.h"
-#include "ORB_Core.h"
-#include "Profile.h"
-#include "debug.h"
-#include "Service_Context.h"
-
-# if !defined (__ACE_INLINE__)
-# include "ClientRequestInfo_i.inl"
-# endif /* !__ACE_INLINE__ */
-
-ACE_RCSID (TAO,
- ClientRequestInfo_i,
- "$Id$")
-
-TAO_ClientRequestInfo_i::TAO_ClientRequestInfo_i (TAO::Invocation_Base *inv)
- : invocation_ (inv),
- caught_exception_ (0),
- reply_status_ (-1),
- rs_pi_current_ (),
- copy_callback_ ()
-{
- this->setup_picurrent ();
-}
-
-TAO_ClientRequestInfo_i::~TAO_ClientRequestInfo_i (void)
-{
-}
-
-void
-TAO_ClientRequestInfo_i::setup_picurrent (void)
-{
- // Retrieve the thread scope current (no TSS access incurred yet).
- TAO::PICurrent *pi_current =
- this->invocation_->orb_core ()->pi_current ();
-
- // If the slot count is zero, then there is nothing to copy.
- // Prevent any copying (and hence TSS accesses) from occurring.
- if (pi_current != 0 && pi_current->slot_count () != 0)
- {
- // Retrieve the thread scope current.
- TAO::PICurrent_Impl *tsc = pi_current->tsc ();
-
- // Logically copy the TSC's slot table to the RSC.
- this->rs_pi_current_.lc_slot_table (tsc);
-
- // PICurrent will potentially have to call back on the request
- // scope current so that it can deep copy the contents of the
- // thread scope current if the contents of the thread scope
- // current are about to be modified. It is necessary to do this
- // deep copy once in order to completely isolate the request
- // scope current from the thread scope current. This is only
- // necessary, if the thread scope current is modified after its
- // contents have been *logically* copied to the request scope
- // current.
- this->copy_callback_.src_and_dst (tsc, &this->rs_pi_current_);
- tsc->copy_callback (&this->copy_callback_);
- }
-}
-
-CORBA::Object_ptr
-TAO_ClientRequestInfo_i::target (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::Object::_duplicate (this->invocation_->target ());
-}
-
-CORBA::Object_ptr
-TAO_ClientRequestInfo_i::effective_target (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::Object::_duplicate (this->invocation_->effective_target ());
-}
-
-IOP::TaggedProfile *
-TAO_ClientRequestInfo_i::effective_profile (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- IOP::TaggedProfile *tagged_profile = 0;
- ACE_NEW_THROW_EX (tagged_profile,
- IOP::TaggedProfile,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (0);
-
- IOP::TaggedProfile_var safe_tagged_profile = tagged_profile;
-
- TAO_Stub *stub =
- this->invocation_->effective_target ()->_stubobj ();
-
- IOP::TaggedProfile *ep =
- stub->profile_in_use ()->create_tagged_profile ();
-
- if (ep == 0)
- {
- ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28,
- CORBA::COMPLETED_NO),
- 0);
- }
-
- // @@BAD_PARAM exception
- tagged_profile->tag = ep->tag;
- tagged_profile->profile_data = ep->profile_data; // Deep copy
-
- return safe_tagged_profile._retn ();
-}
-
-// Use at own risk. There is no way currently of extracting an
-// exception from an Any. This method is in place just to be compliant
-// with the spec.
-CORBA::Any *
-TAO_ClientRequestInfo_i::received_exception (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->reply_status_ != PortableInterceptor::SYSTEM_EXCEPTION
- && this->reply_status_ != PortableInterceptor::USER_EXCEPTION)
- {
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
- CORBA::COMPLETED_NO), 0);
- }
-
- // The spec says that if it is a user exception which can't be
- // inserted then the UNKNOWN exception needs to be thrown with minor
- // code 1.
-
- CORBA::Any * temp = 0;
-
- ACE_NEW_THROW_EX (temp,
- CORBA::Any,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (0);
-
- CORBA::Any_var caught_exception = temp;
-
- if (this->caught_exception_ != 0)
- *temp <<= *(this->caught_exception_);
-
- return caught_exception._retn ();
-}
-
-char *
-TAO_ClientRequestInfo_i::received_exception_id (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->reply_status_ != PortableInterceptor::SYSTEM_EXCEPTION
- && this->reply_status_ != PortableInterceptor::USER_EXCEPTION)
- {
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
- CORBA::COMPLETED_NO),
- 0);
- }
-
- return CORBA::string_dup (this->caught_exception_->_rep_id ());
-}
-
-IOP::TaggedComponent *
-TAO_ClientRequestInfo_i::get_effective_component (
- IOP::ComponentId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- TAO_Stub *stub =
- this->invocation_->effective_target ()->_stubobj ();
-
- TAO_Tagged_Components &ecs =
- stub->profile_in_use ()->tagged_components ();
-
- IOP::MultipleComponentProfile &components = ecs.components ();
-
- const CORBA::ULong len = components.length ();
- for (CORBA::ULong i = 0; i < len; ++i)
- {
- if (components[i].tag == id)
- {
- IOP::TaggedComponent *tagged_component = 0;
-
- // Only allocate a sequence if we have a tagged component
- // that matches the given IOP::ComponentId.
- ACE_NEW_THROW_EX (tagged_component,
- IOP::TaggedComponent,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (0);
-
- IOP::TaggedComponent_var safe_tagged_component =
- tagged_component;
-
- (*tagged_component) = components[i]; // Deep copy
-
- return safe_tagged_component._retn ();
- }
- }
-
- // No tagged component was found that matched the given
- // IOP::ComponentId.
- ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28,
- CORBA::COMPLETED_NO),
- 0);
-}
-
-IOP::TaggedComponentSeq *
-TAO_ClientRequestInfo_i::get_effective_components (
- IOP::ComponentId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- TAO_Stub *stub =
- this->invocation_->target ()->_stubobj ();
-
- TAO_Tagged_Components &ecs =
- stub->profile_in_use ()->tagged_components ();
-
- IOP::MultipleComponentProfile &components = ecs.components ();
-
- IOP::TaggedComponentSeq *tagged_components = 0;
- IOP::TaggedComponentSeq_var safe_tagged_components;
-
- const CORBA::ULong len = components.length ();
- for (CORBA::ULong i = 0; i < len; ++i)
- {
- if (components[i].tag == id)
- {
- if (tagged_components == 0)
- {
- // Only allocate a sequence if we have tagged components
- // to place into the sequence.
- ACE_NEW_THROW_EX (tagged_components,
- IOP::TaggedComponentSeq,
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (0);
-
- safe_tagged_components = tagged_components;
- }
-
- const CORBA::ULong old_len = safe_tagged_components->length ();
- safe_tagged_components->length (old_len + 1);
-
- safe_tagged_components[old_len] = components[i]; // Deep copy
- }
- }
-
- if (tagged_components == 0)
- {
- // No tagged component sequence was allocated, meaning no tagged
- // components were found that matched the given
- // IOP::ComponentId.
- ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 28,
- CORBA::COMPLETED_NO),
- 0);
- }
-
- return safe_tagged_components._retn ();
-}
-
-CORBA::Policy_ptr
-TAO_ClientRequestInfo_i::get_request_policy (CORBA::PolicyType type
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // @@ Do we need to look anywhere else for the request policies?
-
-#if TAO_HAS_CORBA_MESSAGING == 1
- return this->invocation_->target ()->_get_policy (type
- ACE_ENV_ARG_PARAMETER);
-#else
- ACE_UNUSED_ARG (type);
-
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (
- CORBA::SystemException::_tao_minor_code (
- TAO::VMCID,
- ENOTSUP),
- CORBA::COMPLETED_NO),
- 0);
-#endif /* TAO_HAS_CORBA_MESSAGING == 1 */
-}
-
-void
-TAO_ClientRequestInfo_i::add_request_service_context (
- const IOP::ServiceContext & service_context,
- CORBA::Boolean replace
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the service context from the list
- TAO_Service_Context &service_context_list =
- this->invocation_->request_service_context ();
-
- if (service_context_list.set_context (service_context, replace) == 0)
- {
- ACE_THROW (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 15,
- CORBA::COMPLETED_NO));
- }
-}
-
-CORBA::ULong
-TAO_ClientRequestInfo_i::request_id (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // @todo We may have to worry about AMI once we support interceptors
- // in AMI requests since the Invocation object no longer
- // exists once an AMI request has been made. In that case,
- // the reply dispatcher address should be used.
-
- // The request ID must be unique across all outstanding requests.
- // To avoid synchronization overhead, the address of this Invocation
- // object is used as the request ID. This guarantees that the
- // request ID is unique without being forced to acquire a lock.
- //
- // For 64-bit platforms, we right shift 8 bits and then use the
- // lower 32 bits of that shifted value. Rather than losing the
- // upper 32 bits of significant digits by taking the lower 32 bits,
- // we only lose the upper 24 by doing the shift. Basically, the
- // resulting request ID will comprised of bits 8 through 39. This is
- // made possible by the fact that this Invocation object is large
- // enough to increase the likelihood that those bits (0 through 39)
- // are unique. In particular, this->buffer_ is 512 bytes
- // (ACE_CDR::DEFAULT_BUFSIZE) long by default; implying that
- // dropping the lower 8 bits of the this Invocation object's 64 bit
- // address (i.e. 256 bytes) is not a problem.
-
- CORBA::ULong id = 0;
-
- // Note that we reinterpret_cast to an "unsigned long" instead of
- // CORBA::ULong since we need to first cast to an integer large
- // enough to hold an address to avoid compile-time warnings on some
- // 64-bit platforms.
-
- // 32 bit address
- if (sizeof (this) == 4)
- id =
- static_cast<CORBA::ULong> (
- reinterpret_cast<ptrdiff_t> (this->invocation_));
-
- // 64 bit address -- bits 8 through 39 (see notes above!)
- // In this case, we make sure this object is large enough to safely
- // do the right shift. This is necessary since the size of the
- // buffer that makes this object is configurable.
- else if (sizeof (this) == 8
- && sizeof (*(this->invocation_)) > 256 /* 2 << 8 */)
- id =
- (static_cast<CORBA::ULong> (
- reinterpret_cast<ptrdiff_t> (this->invocation_)) >> 8) & 0xFFFFFFFFu;
-
- // 64 bit address -- lower 32 bits
- else if (sizeof (this) == 8)
- id =
- static_cast<CORBA::ULong> (
- reinterpret_cast<ptrdiff_t> (this->invocation_)) & 0xFFFFFFFFu;
-
- // @@ The following request ID generator prevents the
- // PortableInterceptor::ClientRequestInterceptor::send_request()
- // interception point from occuring before the call to connect,
- // thus preventing us from adding an optimization that itself
- // prevents a connection from being unnecessarily performed.
- // Thus, the ClientRequestInfo object is forced to have its own
- // request ID generator in order to make it possible to implement
- // the above optimization.
- //
- // Ideally, this request ID generator should go away, especially
- // since it adds a lock to the critical path.
- // else // Fallback
- // id = this->invocation_->request_id ();
-
- else
- {
- if (TAO_debug_level > 0)
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ClientRequestInfo::request_id() failed\n"
- "(%P|%t) since its request ID generator is not\n"
- "(%P|%t) supported on this platform.\n"));
-
- ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
- }
-
- return id;
-}
-
-char *
-TAO_ClientRequestInfo_i::operation (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return CORBA::string_dup (this->invocation_->operation_name ());
-}
-
-Dynamic::ParameterList *
-TAO_ClientRequestInfo_i::arguments (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->invocation_->arguments (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-Dynamic::ExceptionList *
-TAO_ClientRequestInfo_i::exceptions (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->invocation_->exceptions (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-Dynamic::ContextList *
-TAO_ClientRequestInfo_i::contexts (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
- CORBA::COMPLETED_NO),
- 0);
-}
-
-Dynamic::RequestContext *
-TAO_ClientRequestInfo_i::operation_context (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
- CORBA::COMPLETED_NO),
- 0);
-}
-
-CORBA::Any *
-TAO_ClientRequestInfo_i::result (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->invocation_->result (ACE_ENV_SINGLE_ARG_PARAMETER);
-}
-
-CORBA::Boolean
-TAO_ClientRequestInfo_i::response_expected (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->invocation_->response_expected ();
-}
-
-Messaging::SyncScope
-TAO_ClientRequestInfo_i::sync_scope (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- return this->invocation_->sync_scope ();
-}
-
-PortableInterceptor::ReplyStatus
-TAO_ClientRequestInfo_i::reply_status (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->reply_status_ == -1)
- {
- // A reply hasn't been received yet.
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
- CORBA::COMPLETED_NO),
- -1);
- }
-
- return this->reply_status_;
-}
-
-CORBA::Object_ptr
-TAO_ClientRequestInfo_i::forward_reference (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->reply_status_ != PortableInterceptor::LOCATION_FORWARD)
- {
- ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14,
- CORBA::COMPLETED_NO),
- CORBA::Object::_nil ());
- }
-
- // TAO::Invocation_Base::forward_reference() already duplicates the
- // reference before returning it so there is no need to duplicate it
- // here.
- return this->invocation_->forwarded_reference ();
-}
-
-CORBA::Any *
-TAO_ClientRequestInfo_i::get_slot (PortableInterceptor::SlotId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::InvalidSlot))
-{
- return this->rs_pi_current_.get_slot (id
- ACE_ENV_ARG_PARAMETER);
-}
-
-IOP::ServiceContext *
-TAO_ClientRequestInfo_i::get_request_service_context (
- IOP::ServiceId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the service context from the list
- TAO_Service_Context &service_context_list =
- this->invocation_->request_service_context ();
-
- return this->get_service_context_i (service_context_list,
- id
- ACE_ENV_ARG_PARAMETER);
-}
-
-
-IOP::ServiceContext *
-TAO_ClientRequestInfo_i::get_reply_service_context (
- IOP::ServiceId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Get the service context from the list
- TAO_Service_Context &service_context_list =
- this->invocation_->reply_service_context ();
-
- return this->get_service_context_i (service_context_list,
- id
- ACE_ENV_ARG_PARAMETER);
-}
-
-IOP::ServiceContext *
-TAO_ClientRequestInfo_i::get_service_context_i (
- TAO_Service_Context &service_context_list,
- IOP::ServiceId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- IOP::ServiceContext_var service_context;
-
- if (service_context_list.get_context (id, service_context.out ()) != 0)
- {
- // Found.
- return service_context._retn ();
- }
- else
- {
- // Not found.
- ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 26,
- CORBA::COMPLETED_NO),
- 0);
- }
-}
-
-void
-TAO_ClientRequestInfo_i::reply_status (TAO::Invocation_Status invoke_status)
-{
- switch (invoke_status)
- {
- case TAO::TAO_INVOKE_SUCCESS:
- this->reply_status_ = PortableInterceptor::SUCCESSFUL;
- break;
- case TAO::TAO_INVOKE_RESTART:
- if (this->invocation_->is_forwarded ())
- this->reply_status_ = PortableInterceptor::LOCATION_FORWARD;
- else
- this->reply_status_ = PortableInterceptor::TRANSPORT_RETRY;
- break;
- case TAO::TAO_INVOKE_USER_EXCEPTION:
- this->reply_status_ = PortableInterceptor::USER_EXCEPTION;
- break;
- case TAO::TAO_INVOKE_SYSTEM_EXCEPTION:
- this->reply_status_ = PortableInterceptor::SYSTEM_EXCEPTION;
- break;
- default:
- this->reply_status_ = PortableInterceptor::UNKNOWN;
- break;
- }
-}
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tao/ClientRequestInfo_i.h b/TAO/tao/ClientRequestInfo_i.h
deleted file mode 100644
index 63c0ef7aa4a..00000000000
--- a/TAO/tao/ClientRequestInfo_i.h
+++ /dev/null
@@ -1,287 +0,0 @@
-// -*- C++ -*-
-//=============================================================================
-/**
- * @file ClientRequestInfo_i.h
- *
- * $Id$
- *
- * This is the implementation of the
- * PortableInterceptor::ClientRequestInfo interface.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- * @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
- */
-//=============================================================================
-
-#ifndef TAO_CLIENT_REQUEST_INFO_I_H
-#define TAO_CLIENT_REQUEST_INFO_I_H
-
-#include /**/ "ace/pre.h"
-
-#include "TAO_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "orbconf.h"
-
-#if (TAO_HAS_INTERCEPTORS == 1)
-
-#include "Invocation_Utils.h"
-#include "PICurrent_Impl.h"
-#include "PICurrent_Copy_Callback.h"
-#include "PIForwardRequestC.h"
-
-class TAO_Service_Context;
-
-namespace TAO
-{
- class Invocation_Base;
-}
-
-namespace Dynamic
-{
- class ParameterList;
- class ExceptionList;
- typedef CORBA::StringSeq RequestContext;
- typedef CORBA::StringSeq ContextList;
-}
-
-namespace Messaging
-{
- typedef CORBA::Short SyncScope;
-}
-
-/**
- * @class TAO_ClientRequestInfo_i
- *
- * @brief Implementation of the PortableInterceptor::ClientRequestInfo
- * interface.
- */
-class TAO_Export TAO_ClientRequestInfo_i
-{
-public:
-
- /// Constructor from concrete interface.
- TAO_ClientRequestInfo_i (TAO::Invocation_Base *invocation);
-
- /// Destructor.
- ~TAO_ClientRequestInfo_i (void);
-
- /// Return an ID unique to the current request. This request ID may
- /// or may not be the same as the GIOP request ID.
- CORBA::ULong request_id (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the operation name for the current request.
- char * operation (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the list of arguments passed to the current operation.
- Dynamic::ParameterList * arguments (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the list of exceptions the current operation is capable
- /// of throwing.
- Dynamic::ExceptionList * exceptions (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- Dynamic::ContextList * contexts (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- Dynamic::RequestContext * operation_context (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the result of the current request. If there is no return
- /// value then an Any with tk_void TypeCode is returned. This is
- /// method is not valid for oneway operations.
- CORBA::Any * result (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Returns true for a two-way operation, and false otherwise.
- CORBA::Boolean response_expected (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException)) ;
-
- /// Return the sync_scope policy value for the current one-way
- /// operation. If the operation is not a one-way, a
- /// CORBA::BAD_INV_ORDER exception is thrown.
- Messaging::SyncScope sync_scope (ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the reply status for the current request. Statuses can
- /// be PortableInterceptor::SUCCESSFUL, SYSTEM_EXCEPTION,
- /// USER_EXCEPTION, LOCATION_FORWARD, TRANSPORT_RETRY, UNKNOWN
- PortableInterceptor::ReplyStatus reply_status (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// If the reply status is PortableInterceptor::LOCATION_FORWARD
- /// return the object reference to which the request was forwarded.
- CORBA::Object_ptr forward_reference (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException)) ;
-
- CORBA::Any * get_slot (
- PortableInterceptor::SlotId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException,
- PortableInterceptor::InvalidSlot));
-
- /// Return the IOP::ServiceContext with the given IOP::ServiceId
- /// from the request service context list.
- IOP::ServiceContext * get_request_service_context (
- IOP::ServiceId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the IOP::ServiceContext with the given IOP::ServiceId
- /// from the reply service context list.
- IOP::ServiceContext * get_reply_service_context (
- IOP::ServiceId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the (initial, non-forwarded, or permanently forwarded)
- /// object reference of the target.
- CORBA::Object_ptr target (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the object reference for the current target. The target
- /// may change in the even of a location forward.
- CORBA::Object_ptr effective_target (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- IOP::TaggedProfile * effective_profile (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return an Any containing the received exception, if any.
- /// Otherwise, throw a CORBA::BAD_INV_ORDER exception.
- /**
- * @note There is no trivial way to extract the exception from an Any.
- */
- CORBA::Any * received_exception (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the repository ID for the received exception.
- char * received_exception_id (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the first IOP::TaggedComponent that matches the given
- /// IOP::ComponentId in the object reference for the current
- /// target.
- IOP::TaggedComponent * get_effective_component (
- IOP::ComponentId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return all IOP::TaggedComponent(s) that match the given
- /// IOP::ComponentId in the object reference for the current
- /// target.
- IOP::TaggedComponentSeq * get_effective_components (
- IOP::ComponentId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Return the policy of the given type in effect for the current
- /// request.
- CORBA::Policy_ptr get_request_policy (
- CORBA::PolicyType type
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /// Add the IOP::ServiceContext to the request (outgoing)
- /// IOP::ServiceContextList.
- void add_request_service_context (
- const IOP::ServiceContext & service_context,
- CORBA::Boolean replace
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- /**
- * @name Stub helper methods
- *
- * The following methods are used in the implementation of the
- * Stubs, they are not part of the ClientRequestInfo interface, but
- * an extension used internally by TAO.
- */
- //@{
-
- /// Change the exception status.
- void exception (CORBA::Exception *exception);
-
- /// Set the status of the received reply.
- void reply_status (TAO::Invocation_Status s);
-
- /// Extract the forward object reference from the
- /// PortableInterceptor::ForwardRequest exception, and set the reply
- /// status flag accordingly.
- void forward_reference (PortableInterceptor::ForwardRequest &exc);
- //@}
-
-protected:
-
- /// Setup thread scope and request scope
- /// PortableInterceptor::Current objects.
- void setup_picurrent (void);
-
- /// Helper method to get the request and response service contexts.
- IOP::ServiceContext *get_service_context_i (
- TAO_Service_Context &service_context_list,
- IOP::ServiceId id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- TAO_Stub *stub (void) const;
-
-protected:
-
- /// Pointer to the invocation object.
- TAO::Invocation_Base *invocation_;
-
- /// Pointer to the caught exception.
- CORBA::Exception *caught_exception_;
-
- /// Reply status for the current request.
- PortableInterceptor::ReplyStatus reply_status_;
-
- /// The "Request Scope Current" (RSC) object, as required by
- /// Portable Interceptors.
- TAO::PICurrent_Impl rs_pi_current_;
-
- /// Callback object to be executed when shallow copied slot table
- /// must be deep copied.
- /**
- * This callback object deep copies the slot table from the TSC to
- * the RSC.
- * @par
- * As an optimization, the TSC's slot table is initially only
- * shallowed copied to the RSC. If the TSC's slot table will be
- * modified, e.g. via PICurrent::set_slot(), it's slot table must be
- * deep copied to the RSC before actually modifying that slot
- * table. This is necessary since the RSC is read-only on the
- * client side, meaning that changes in the TSC that occur after
- * instantiation of the RSC must not be reflected in the RSC.
- */
- TAO::PICurrent_Copy_Callback copy_callback_;
-
-};
-
-# if defined (__ACE_INLINE__)
-# include "ClientRequestInfo_i.inl"
-# endif /* __ACE_INLINE__ */
-
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_CLIENT_REQUEST_INFO_I_H */
diff --git a/TAO/tao/ClientRequestInfo_i.inl b/TAO/tao/ClientRequestInfo_i.inl
deleted file mode 100644
index 0418d785570..00000000000
--- a/TAO/tao/ClientRequestInfo_i.inl
+++ /dev/null
@@ -1,33 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-#include "SystemException.h"
-#include "PortableInterceptorC.h"
-
-ACE_INLINE void
-TAO_ClientRequestInfo_i::exception (CORBA::Exception *exception)
-{
- if (CORBA::SystemException::_downcast (exception) != 0)
- this->reply_status_ = PortableInterceptor::SYSTEM_EXCEPTION;
- else if (CORBA::UserException::_downcast (exception) != 0)
- this->reply_status_ = PortableInterceptor::USER_EXCEPTION;
-
- // @@ Is it possible for both of the above downcasts to fail?
-
- this->caught_exception_ = exception;
-}
-
-ACE_INLINE void
-TAO_ClientRequestInfo_i::forward_reference (
- PortableInterceptor::ForwardRequest &)
-{
- // Note that we're converting the ForwardRequest exception in to a
- // LOCATION_FORWARD reply, so we do not set the exception status.
- //
- // The forward object reference is not handled here. Rather, it is
- // handled by the TAO::Invocation_Base object so that its profiles
- // can be added to the list of forward profiles.
-
- this->reply_status_ = PortableInterceptor::LOCATION_FORWARD;
-}
diff --git a/TAO/tao/ClientRequestInterceptor_Adapter.cpp b/TAO/tao/ClientRequestInterceptor_Adapter.cpp
index 750794b1052..6460af294ee 100644
--- a/TAO/tao/ClientRequestInterceptor_Adapter.cpp
+++ b/TAO/tao/ClientRequestInterceptor_Adapter.cpp
@@ -23,27 +23,16 @@ namespace TAO
}
void
- ClientRequestInterceptor_Adapter::send_request (TAO_ClientRequestInfo_i *ri
+ ClientRequestInterceptor_Adapter::send_request (TAO_ClientRequestInfo *ri
ACE_ENV_ARG_DECL)
{
// This method implements one of the "starting" client side
// interception point.
ACE_TRY
{
- // Only perform the TSS access if interceptors were registered
- // with the ORB.
- if (this->len_ > 0)
+ for (size_t i = 0 ; i < this->interceptors_.size (); ++i)
{
- TAO_ORB_Core *orb_core = this->invocation_->orb_core ();
- this->info_ =
- orb_core->get_tss_resources ()->client_request_info_;
- }
-
- TAO_ClientRequestInfo_Guard info_guard (this->info_, ri);
-
- for (size_t i = 0 ; i < this->len_; ++i)
- {
- this->interceptors_[i]->send_request (this->info_
+ this->interceptors_[i]->send_request (ri
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -64,7 +53,7 @@ namespace TAO
}
void
- ClientRequestInterceptor_Adapter::receive_reply (TAO_ClientRequestInfo_i *ri
+ ClientRequestInterceptor_Adapter::receive_reply (TAO_ClientRequestInfo *ri
ACE_ENV_ARG_DECL)
{
// This is an "ending" interception point so we only process the
@@ -74,8 +63,6 @@ namespace TAO
// they were pushed onto the stack since this is an "ending"
// interception point.
- TAO_ClientRequestInfo_Guard info_guard (this->info_, ri);
-
// Unwind the stack.
const size_t len = this->stack_size_;
for (size_t i = 0; i < len; ++i)
@@ -87,7 +74,7 @@ namespace TAO
--this->stack_size_;
this->interceptors_[this->stack_size_]->receive_reply (
- this->info_
+ ri
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
@@ -98,7 +85,7 @@ namespace TAO
}
void
- ClientRequestInterceptor_Adapter::receive_exception (TAO_ClientRequestInfo_i *ri
+ ClientRequestInterceptor_Adapter::receive_exception (TAO_ClientRequestInfo *ri
ACE_ENV_ARG_DECL)
{
// This is an "ending" interception point so we only process the
@@ -110,8 +97,6 @@ namespace TAO
ACE_TRY
{
- TAO_ClientRequestInfo_Guard info_guard (this->info_, ri);
-
// Unwind the flow stack.
const size_t len = this->stack_size_;
for (size_t i = 0; i < len; ++i)
@@ -123,7 +108,7 @@ namespace TAO
--this->stack_size_;
this->interceptors_[this->stack_size_]->receive_exception (
- this->info_
+ ri
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
@@ -166,7 +151,7 @@ namespace TAO
}
void
- ClientRequestInterceptor_Adapter::receive_other (TAO_ClientRequestInfo_i *ri
+ ClientRequestInterceptor_Adapter::receive_other (TAO_ClientRequestInfo *ri
ACE_ENV_ARG_DECL)
{
// This is an "ending" interception point so we only process the
@@ -178,8 +163,6 @@ namespace TAO
ACE_TRY
{
- TAO_ClientRequestInfo_Guard info_guard (this->info_, ri);
-
// Unwind the stack.
const size_t len = this->stack_size_;
for (size_t i = 0; i < len; ++i)
@@ -191,7 +174,7 @@ namespace TAO
--this->stack_size_;
this->interceptors_[this->stack_size_]->receive_other (
- this->info_
+ ri
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
@@ -207,7 +190,7 @@ namespace TAO
void
ClientRequestInterceptor_Adapter::process_forward_request (
- TAO_ClientRequestInfo_i *ri,
+ TAO_ClientRequestInfo *ri,
PortableInterceptor::ForwardRequest &exc
ACE_ENV_ARG_DECL)
{
diff --git a/TAO/tao/ClientRequestInterceptor_Adapter.h b/TAO/tao/ClientRequestInterceptor_Adapter.h
index 88610590725..e2a379e027e 100644
--- a/TAO/tao/ClientRequestInterceptor_Adapter.h
+++ b/TAO/tao/ClientRequestInterceptor_Adapter.h
@@ -40,7 +40,6 @@ namespace TAO
}
class TAO_ClientRequestInfo;
-class TAO_ClientRequestInfo_i;
namespace TAO
{
@@ -78,22 +77,22 @@ namespace TAO
//@{
/// This method implements one of the "starting" client side
/// interception points.
- void send_request (TAO_ClientRequestInfo_i * ri
+ void send_request (TAO_ClientRequestInfo * ri
ACE_ENV_ARG_DECL);
/// This method implements one of the "ending" client side
/// interception point.
- void receive_reply (TAO_ClientRequestInfo_i * ri
+ void receive_reply (TAO_ClientRequestInfo * ri
ACE_ENV_ARG_DECL);
/// This method implements one of the "ending" client side
/// interception point.
- void receive_exception (TAO_ClientRequestInfo_i * ri
+ void receive_exception (TAO_ClientRequestInfo * ri
ACE_ENV_ARG_DECL);
/// This method implements one of the "ending" client side
/// interception point.
- void receive_other (TAO_ClientRequestInfo_i * ri
+ void receive_other (TAO_ClientRequestInfo * ri
ACE_ENV_ARG_DECL);
//@}
@@ -102,7 +101,7 @@ namespace TAO
/// Process the given PortableInterceptor::ForwardRequest exception,
/// i.e. invoke the receive_other() interception point, in addition
/// to notifying the Invocation object of the LOCATION_FORWARD.
- void process_forward_request (TAO_ClientRequestInfo_i * ri,
+ void process_forward_request (TAO_ClientRequestInfo * ri,
PortableInterceptor::ForwardRequest & exc
ACE_ENV_ARG_DECL);
@@ -114,25 +113,9 @@ namespace TAO
/// Pointer to the GIOP invocation object for the current request.
Invocation_Base * invocation_;
- /// Cache the length of the interceptor list so that we don't have
- /// to compute it at each stage of the current interception.
- const size_t len_;
-
/// The number of interceptors "pushed" onto the logical flow
/// stack. This is used when unwinding the flow stack.
size_t stack_size_;
-
- /// Pointer to the PortableInterceptor::ClientRequestInfo
- /// implementation.
- /**
- * @note The fact that a pointer to the
- * PortableInterceptor::ClientRequestInfo object in TSS is
- * cached here assumes that all client side interception
- * points are invoked in the same thread. This may not be the
- * case for AMI! In that case, we'll have to perform a TSS
- * access in each interception point.
- */
- TAO_ClientRequestInfo * info_;
};
}
diff --git a/TAO/tao/ClientRequestInterceptor_Adapter.inl b/TAO/tao/ClientRequestInterceptor_Adapter.inl
index 684c756edce..ca0758ef582 100644
--- a/TAO/tao/ClientRequestInterceptor_Adapter.inl
+++ b/TAO/tao/ClientRequestInterceptor_Adapter.inl
@@ -10,9 +10,7 @@ namespace TAO
Invocation_Base * invocation)
: interceptors_ (interceptors)
, invocation_ (invocation)
- , len_ (interceptors.size ())
, stack_size_ (0)
- , info_ (0)
{
}
}
diff --git a/TAO/tao/Invocation_Base.h b/TAO/tao/Invocation_Base.h
index dccb182f438..452f9436de3 100644
--- a/TAO/tao/Invocation_Base.h
+++ b/TAO/tao/Invocation_Base.h
@@ -25,7 +25,7 @@
#include "tao/Invocation_Utils.h"
#if TAO_HAS_INTERCEPTORS == 1
-#include "tao/ClientRequestInfo_i.h"
+#include "tao/ClientRequestInfo.h"
#include "tao/ClientRequestInterceptor_Adapter.h"
#endif /* TAO_HAS_INTERCEPTORS == 1 */
@@ -221,7 +221,7 @@ namespace TAO
/// The client requestor adapter and the request info object for
/// making calls on all the registered interceptors.
ClientRequestInterceptor_Adapter adapter_;
- TAO_ClientRequestInfo_i req_info_;
+ TAO_ClientRequestInfo req_info_;
#endif /*TAO_HAS_INTERCEPTORS*/
diff --git a/TAO/tao/ORB_Core_TSS_Resources.cpp b/TAO/tao/ORB_Core_TSS_Resources.cpp
index 1c3d14015aa..6569ae89110 100644
--- a/TAO/tao/ORB_Core_TSS_Resources.cpp
+++ b/TAO/tao/ORB_Core_TSS_Resources.cpp
@@ -15,22 +15,12 @@ TAO_ORB_Core_TSS_Resources::TAO_ORB_Core_TSS_Resources (void)
, orb_core_ (0)
#if TAO_HAS_INTERCEPTORS == 1
, pi_current_ ()
- , client_request_info_ (0)
#endif /* TAO_HAS_INTERCEPTORS == 1 */
{
-#if TAO_HAS_INTERCEPTORS == 1
- ACE_NEW (this->client_request_info_,
- TAO_ClientRequestInfo);
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
}
TAO_ORB_Core_TSS_Resources::~TAO_ORB_Core_TSS_Resources (void)
{
-
-#if TAO_HAS_INTERCEPTORS == 1
- CORBA::release (this->client_request_info_);
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
//@@ This is broken on platforms that use TSS emulation since this
// destructor is invoked after the ORB. Since we're under
// pressure to release a beta, we'll have to leak the TSS objects
diff --git a/TAO/tao/ORB_Core_TSS_Resources.h b/TAO/tao/ORB_Core_TSS_Resources.h
index 66dde99175a..0853605a831 100644
--- a/TAO/tao/ORB_Core_TSS_Resources.h
+++ b/TAO/tao/ORB_Core_TSS_Resources.h
@@ -29,7 +29,6 @@ class TAO_ORB_Core;
#if TAO_HAS_INTERCEPTORS == 1
#include "PICurrent_Impl.h"
-class TAO_ClientRequestInfo;
#endif /* TAO_HAS_INTERCEPTORS == 1 */
/**
@@ -90,10 +89,6 @@ public:
#if TAO_HAS_INTERCEPTORS == 1
/// The thread-specific portion of the PICurrent object.
TAO::PICurrent_Impl pi_current_;
-
- /// The PortableInterceptor::ClientRequestInfo object for the
- /// current thread.
- TAO_ClientRequestInfo *client_request_info_;
#endif /* TAO_HAS_INTERCEPTORS == 1 */
};
diff --git a/TAO/tao/tao.mpc b/TAO/tao/tao.mpc
index 59ad923e0e5..86d216cdcdf 100644
--- a/TAO/tao/tao.mpc
+++ b/TAO/tao/tao.mpc
@@ -44,7 +44,6 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
ClientRequestInfo.cpp
ClientRequestInfoA.cpp
ClientRequestInfoC.cpp
- ClientRequestInfo_i.cpp
ClientRequestInterceptor_Adapter.cpp
ClientRequestInterceptorA.cpp
ClientRequestInterceptorC.cpp
@@ -370,7 +369,6 @@ project(TAO) : acelib, core, tao_output, taodefaults, pidl, extra_core {
ClientRequestInfo.h
ClientRequestInfoC.h
ClientRequestInfoS.h
- ClientRequestInfo_i.h
ClientRequestInterceptor_Adapter.h
ClientRequestInterceptorC.h
ClientRequestInterceptorS.h