summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-02-12 00:34:41 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-02-12 00:34:41 +0000
commit590c24ff7dae3fe8037ba8ed886f8c799d697fdc (patch)
tree7e0d72a7c4821559aaad3428af819647046f18ad
parentb7f9d7cd9936c42376552b91e4314a5b8a9ce53d (diff)
downloadATCD-590c24ff7dae3fe8037ba8ed886f8c799d697fdc.tar.gz
ChangeLogTag:Mon Feb 11 16:32:00 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a83
-rw-r--r--TAO/tao/PICurrent.cpp94
-rw-r--r--TAO/tao/PICurrent.h35
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp3
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.h4
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/README28
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp21
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp112
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h10
9 files changed, 283 insertions, 107 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 31576013265..7012ae5b610 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,81 @@
+Mon Feb 11 16:32:00 2002 Ossama Othman <ossama@uci.edu>
+
+ * tao/PICurrent.h:
+
+ Disable the "C4251" warning in MSVC++ builds. MSVC++ is being
+ too paranoid about a class it thinks should be exported.
+
+ (Table):
+
+ The underlying slot table is now an array of CORBA::Anys. The
+ memory management headaches of using an array of pointers to
+ void were becoming too much of a hassle. This was motivated by
+ memory leak and fix reported by Grig <grig@plesk.com>.
+
+ (tsc_to_rsc_):
+
+ New flag that indicates if the TSC is to be copied to the RSC.
+ If false, then the RSC must be deep copied upon leaving the
+ request scope and entering the thread scope. This is necessary
+ since the RSC slot table is no longer available upon leaving the
+ thread scope, meaning that a logical copy is not enough.
+
+ * tao/PICurrent.cpp (~TAO_PICurrent_Impl):
+
+ No longer any need to deallocate the elements of the underlying
+ slot table since it contains "first class citizens," i.e. they
+ will automatically be cleaned up when the array is destroyed.
+
+ (get_slot):
+
+ Updated to retrieve data from an array of CORBA::Anys instead of
+ an array of pointers to void.
+
+ (set_slot, copy):
+
+ The switch to an array of CORBA::anys greatly simplifies these
+ methods. It also happens to fix a memory leak and improves the
+ efficiency of the code.
+
+ (~TAO_PICurrent_Guard):
+
+ Set the "peer" in the TSC when logically copying from the
+ contents of the TSC to the RSC. The TSC may have to callback on
+ the RSC (i.e. the "peer") if the TSC is modified after it has
+ been logically copied to the RSC. Fixes a problem where the RSC
+ and TSC were not treated as separate entities due to the logical
+ copying that occurs.
+
+ * tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp
+ (post_init):
+
+ Pass a reference to the PICurrent object down to the server
+ request interceptor created in this method. The interceptor
+ will invoke methods on the PICurrent at a later time. Saves a
+ resolve_initial_references() call in the critical path.
+
+ * tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h
+ (pi_current_):
+
+ Cache a reference to the PICurrent object.
+
+ * tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp
+ (send_reply):
+
+ Added another test that verifies that the RSC and TSC are
+ treated as a separate entities. This is necessary since TAO
+ logically copies the contents of the TSC to the RSC, and only
+ deep copies if the contents of either are about to be modified.
+
+ * tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp:
+ (send_request):
+
+ Corrected debugging output.
+
+ * tests/Portable_Interceptors/PICurrent/README:
+
+ New file that explains what the test does.
+
Mon Feb 11 18:20:33 2002 Balachandran Natarajan <bala@cs.wustl.edu>
* tests/ORT/ORT_test_IORInterceptor.h:
@@ -13,7 +91,6 @@ Mon Feb 11 18:02:18 2002 Balachandran Natarajan <bala@cs.wustl.edu>
* tests/Oneways_Invoking_Twoways/Sender_i.h:
* orbsvcs/tests/FaultTolerance/IOGR/Client_i.h:
* orbsvcs/tests/FaultTolerance/IOGR/Manager.h: More fuzz errors.
-
Mon Feb 11 17:56:14 2002 Balachandran Natarajan <bala@cs.wustl.edu>
@@ -33,8 +110,8 @@ Mon Feb 11 16:04:20 2002 Balachandran Natarajan <bala@cs.wustl.edu>
* tao/GIOP_Message_Generator_Parser_10.h:
* tao/GIOP_Message_Generator_Parser_11.h:
* tao/GIOP_Message_Generator_Parser_12.h: Removed the #pragma
- warning (push) from the above files as they are needed in the
- first place. Thanks to Ossama for pointing these out.
+ warning (push) from the above files as they are not needed in
+ the first place. Thanks to Ossama for pointing these out.
Sun Feb 10 13:16:45 2002 Carlos O'Ryan <coryan@uci.edu>
diff --git a/TAO/tao/PICurrent.cpp b/TAO/tao/PICurrent.cpp
index 54fb95901c1..415fbae3e38 100644
--- a/TAO/tao/PICurrent.cpp
+++ b/TAO/tao/PICurrent.cpp
@@ -112,9 +112,6 @@ TAO_PICurrent_Impl::TAO_PICurrent_Impl (void)
TAO_PICurrent_Impl::~TAO_PICurrent_Impl (void)
{
- size_t len = this->slot_table_.size ();
- for (size_t i = 0; i < len; ++i)
- delete (CORBA::Any *) this->slot_table_[i];
}
CORBA::Any *
@@ -131,7 +128,7 @@ TAO_PICurrent_Impl::get_slot (PortableInterceptor::SlotId id
CORBA::Any * any = 0;
- if (id >= table.size () || table[id] == 0)
+ if (id >= table.size ())
{
// In accordance with the Portable Interceptor specification,
// return an Any with a TCKind of tk_null. A default
@@ -148,10 +145,8 @@ TAO_PICurrent_Impl::get_slot (PortableInterceptor::SlotId id
return any;
}
- const CORBA::Any *data = (CORBA::Any *) table[id];
-
ACE_NEW_THROW_EX (any,
- CORBA::Any (*data), // Make a copy.
+ CORBA::Any (table[id]), // Make a copy.
CORBA::NO_MEMORY (
CORBA_SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
@@ -178,29 +173,20 @@ TAO_PICurrent_Impl::set_slot (PortableInterceptor::SlotId id,
{
// Deep copy
- Table &table = *this->lc_slot_table_;
+ const Table &table = *this->lc_slot_table_;
size_t new_size = table.size ();
- this->slot_table_.size (new_size);
+ if (this->slot_table_.size (id >= new_size ? id + 1 : new_size) != 0)
+ ACE_THROW (CORBA::INTERNAL ());
+ // Note that the number of elements to copy is bounded by the
+ // size of the source array, not the destination array.
for (size_t i = 0; i < new_size; ++i)
{
if (i == id)
continue; // Avoid copying data twice.
- const CORBA::Any *lc_data = (CORBA::Any *) table[i];
-
- CORBA::Any *any = 0;
- ACE_NEW_THROW_EX (any,
- CORBA::Any (*lc_data), // Make a copy.
- CORBA::NO_MEMORY (
- CORBA_SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- this->slot_table_[i] = any;
+ this->slot_table_[i] = table[i];
}
// Break all ties with the logically copied slot table.
@@ -210,30 +196,11 @@ TAO_PICurrent_Impl::set_slot (PortableInterceptor::SlotId id,
// If the slot table array isn't large enough, then increase its
// size. We're guaranteed not to exceed the number of allocated
// slots for the reason stated above.
- size_t old_size = this->slot_table_.size ();
- size_t new_size = id + 1;
- if (id >= old_size && this->slot_table_.size (new_size) != 0)
+ if (id >= this->slot_table_.size ()
+ && this->slot_table_.size (id + 1) != 0)
ACE_THROW (CORBA::INTERNAL ());
- // Initialize intermediate array elements to zero, since they
- // haven't been initialized yet. This ensures that garbage is not
- // returned when accessing any of those elements at a later point in
- // time.
- for (size_t i = old_size; i < id; ++i)
- this->slot_table_[i] = 0;
-
- // Now copy the data into the slot table.
- CORBA::Any * any = 0;
- ACE_NEW_THROW_EX (any,
- CORBA::Any (data), // Make a copy.
- CORBA::NO_MEMORY (
- CORBA_SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK;
-
- this->slot_table_[id] = any;
+ this->slot_table_[id] = CORBA::Any (data);
// Mark the table as being modified.
this->dirty_ = 1;
@@ -247,7 +214,8 @@ TAO_PICurrent_Impl::copy (TAO_PICurrent_Impl &rhs, CORBA::Boolean deep_copy)
if (deep_copy)
{
- size_t new_size = rhs.slot_table ().size ();
+ const Table &t = rhs.slot_table ();
+ size_t new_size = t.size ();
this->slot_table_.size (new_size);
@@ -255,11 +223,7 @@ TAO_PICurrent_Impl::copy (TAO_PICurrent_Impl &rhs, CORBA::Boolean deep_copy)
ACE_TRY
{
for (size_t i = 0; i < new_size; ++i)
- {
- this->slot_table_[i] =
- rhs.get_slot (i ACE_ENV_ARG_PARAMETER); // Deep copy
- ACE_TRY_CHECK;
- }
+ this->slot_table_[i] = t[i]; // Deep copy
}
ACE_CATCHANY
{
@@ -290,7 +254,8 @@ TAO_PICurrent_Impl::copy (TAO_PICurrent_Impl &rhs, CORBA::Boolean deep_copy)
TAO_PICurrent_Guard::TAO_PICurrent_Guard (TAO_ServerRequest &server_request,
CORBA::Boolean tsc_to_rsc)
: src_ (0),
- dest_ (0)
+ dest_ (0),
+ tsc_to_rsc_ (tsc_to_rsc)
{
// This constructor is used on the server side.
@@ -332,7 +297,34 @@ TAO_PICurrent_Guard::~TAO_PICurrent_Guard (void)
{
// This copy better be exception-safe!
this->dest_->copy (*this->src_, 0); // Logical copy
+
+ // 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.
+ //
+ // source: TSC
+ // destination: RSC
+ if (this->tsc_to_rsc_)
+ this->src_->pi_peer (this->dest_);
}
}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+template class ACE_Array_Base<CORBA::Any>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+#pragma instantiate ACE_Array_Base<CORBA::Any>
+
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+
#endif /* TAO_HAS_INTERCEPTORS == 1 */
diff --git a/TAO/tao/PICurrent.h b/TAO/tao/PICurrent.h
index 21d857d6464..fa9c922a035 100644
--- a/TAO/tao/PICurrent.h
+++ b/TAO/tao/PICurrent.h
@@ -28,13 +28,20 @@
#include "PortableInterceptorC.h"
#include "LocalObject.h"
+#if defined(_MSC_VER)
+
+# if (_MSC_VER >= 1200)
+# pragma warning(push)
+# endif /* _MSC_VER >= 1200 */
+
// This is to remove "inherits via dominance" warnings from MSVC.
// MSVC is being a little too paranoid.
-#if defined(_MSC_VER)
-#if (_MSC_VER >= 1200)
-#pragma warning(push)
-#endif /* _MSC_VER >= 1200 */
-#pragma warning(disable:4250)
+# pragma warning(disable:4250)
+
+// This disables a "may need dll-interface" warning from MSVC. It's
+// being too paranoid in this case, too.
+# pragma warning(disable:4251)
+
#endif /* _MSC_VER */
/// Forward declarations.
@@ -154,7 +161,7 @@ public:
* increase in footprint will occur due to this template
* instance.
*/
- typedef ACE_Array_Base<void *> Table;
+ typedef ACE_Array_Base<CORBA::Any> Table;
/// Constructor
TAO_PICurrent_Impl (void);
@@ -243,9 +250,10 @@ private:
*
* Since copies between the request scope current and thread scope
* current must also occur if an exception is thrown, e.g. made
- * available to the receive_exception() and send_exception()
- * interception points, the "guard" idiom is used to make this action
- * exception-safe.
+ * available to the send_exception() interception points, the "guard"
+ * idiom is used to make this action exception-safe.
+ *
+ * @note This Guard class is only used on the server side.
*/
class TAO_Export TAO_PICurrent_Guard
{
@@ -281,6 +289,15 @@ private:
/// the contents of another PICurrent's slot table.
TAO_PICurrent_Impl *dest_;
+ /// Flag that indicates if the TSC is to be copied to the RSC.
+ /**
+ * If false, then the RSC must be deep copied upon leaving the
+ * request scope and entering the thread scope. This is necessary
+ * since the RSC slot table is no longer available upon leaving the
+ * thread scope, meaning that a logical copy is not enough.
+ */
+ CORBA::Boolean tsc_to_rsc_;
+
};
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp b/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp
index 78ff5def852..a0b6c2d7213 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.cpp
@@ -102,7 +102,7 @@ ClientRequestInterceptor::send_request (
{
ACE_PRINT_EXCEPTION (ex,
"Exception thrown in "
- "receive_request_service_contexts()\n");
+ "send_request()\n");
ACE_DEBUG ((LM_DEBUG,
"Invalid slot: %u\n",
@@ -116,7 +116,6 @@ ClientRequestInterceptor::send_request (
ACE_DEBUG ((LM_INFO,
"(%P|%t) Client side RSC/TSC semantics appear "
"to be correct.\n"));
-
}
void
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.h b/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.h
index b5b017d46d7..c462e78c815 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.h
+++ b/TAO/tests/Portable_Interceptors/PICurrent/ClientRequestInterceptor.h
@@ -98,8 +98,8 @@ public:
private:
- // The PICurrent slot ID allocated to this application during ORB
- // initialization.
+ /// The PICurrent slot ID allocated to this application during ORB
+ /// initialization.
PortableInterceptor::SlotId slot_id_;
/// Reference to the PICurrent object.
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/README b/TAO/tests/Portable_Interceptors/PICurrent/README
new file mode 100644
index 00000000000..e8aa40f4809
--- /dev/null
+++ b/TAO/tests/Portable_Interceptors/PICurrent/README
@@ -0,0 +1,28 @@
+#
+# $Id$
+#
+
+This test verifies that the "PICurrent" object semantics are correct
+on both the client side and the server side. In particular, it
+attempts to make sure the request scope current (RSC) and thread scope
+current (TSC) copying semantics are correct when transitioning between
+the two scopes on both the client and server sides. This is
+accomplished by setting and getting elements of different types in the
+RSC and TSC slot tables at various points during the course of an
+invocation.
+
+Expected output is along the lines of the following:
+
+==== Running PICurrent test
+PICurrentTest::test: <IOR:010000001b000000...>
+(3384|3988) Extracted <46> from slot 0
+(3384|3988) Client side RSC/TSC semantics appear to be correct.
+(3960|1492) Inserted number <62> into RSC.
+Test method invoked.
+(3960|1492) Retrieved number <62> from TSC.
+(3960|1492) String "Drink milk!" inserted into TSC.
+(3960|1492) Retrieved "Drink milk!" from the RSC.
+(3960|1492) Server side RSC/TSC semantics appear to be correct.
+(3384|3988) Retrieved "Et tu Brute?" from the TSC.
+(3960|1492) Server is shutting down.
+Event loop finished.
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp b/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp
index c555b2f2c53..1d2edf77c01 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/ServerORBInitializer.cpp
@@ -23,12 +23,31 @@ ServerORBInitializer::post_init (
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
+ CORBA::Object_var obj =
+ info->resolve_initial_references ("PICurrent"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ PortableInterceptor::Current_var pi_current =
+ PortableInterceptor::Current::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ if (CORBA::is_nil (pi_current.in ()))
+ {
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) ERROR: Could not resolve PICurrent object.\n"));
+
+ ACE_THROW (CORBA::INTERNAL ());
+ }
+
::slot_id = info->allocate_slot_id (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
PortableInterceptor::ServerRequestInterceptor_ptr tmp;
ACE_NEW_THROW_EX (tmp,
- ServerRequestInterceptor (slot_id),
+ ServerRequestInterceptor (::slot_id,
+ pi_current.in ()),
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp b/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp
index 6a1fe16b448..e9bbaed1371 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.cpp
@@ -9,8 +9,10 @@ ACE_RCSID (PICurrent,
"$Id$")
ServerRequestInterceptor::ServerRequestInterceptor (
- PortableInterceptor::SlotId id)
- : slot_id_ (id)
+ PortableInterceptor::SlotId id,
+ PortableInterceptor::Current_ptr pi_current)
+ : slot_id_ (id),
+ pi_current_ (PortableInterceptor::Current::_duplicate (pi_current))
{
}
@@ -41,17 +43,21 @@ ServerRequestInterceptor::receive_request_service_contexts (
if (ACE_OS::strcmp (op.in (), "invoke_me") != 0)
return; // Don't mess with PICurrent if not invoking test method.
- // Insert data into the RSC (request scope current).
+ ACE_TRY
+ {
+ // Insert data into the RSC (request scope current).
- CORBA::Long number = 62;
+ CORBA::Long number = 62;
- CORBA::Any data;
- data <<= number;
+ CORBA::Any data;
+ data <<= number;
- ACE_TRY
- {
ri->set_slot (this->slot_id_, data ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Inserted number <%d> into RSC.\n",
+ number));
}
ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
{
@@ -67,10 +73,6 @@ ServerRequestInterceptor::receive_request_service_contexts (
}
ACE_ENDTRY;
ACE_CHECK;
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Inserted number <%d> into RSC.\n",
- number));
}
void
@@ -95,15 +97,69 @@ ServerRequestInterceptor::send_reply (
if (ACE_OS::strcmp (op.in (), "invoke_me") != 0)
return; // Don't mess with PICurrent if not invoking test method.
- CORBA::Any_var data;
-
ACE_TRY
{
- // Retrieve the data stored in the RSC. This data should be
- // different from the original data stored into the RSC by the
- // receive_request_service_contexts() interception point.
+ CORBA::Any_var data;
+
+ // Retrieve the data stored in the RSC. This data (a string)
+ // should be different from the original data (a CORBA::Long)
+ // stored into the RSC by the receive_request_service_contexts()
+ // interception point.
data = ri->get_slot (this->slot_id_ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
+
+ // The original data in the RSC was of type CORBA::Long. If the
+ // following extraction from the CORBA::Any fails, then the
+ // original data in the RSC was not replaced with the data in
+ // the TSC after the test method completed.
+ const char *str = 0;
+ if (data.in () >>= str)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Retrieved \"%s\" from the RSC.\n",
+ str));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Unable to extract data (a string) "
+ "from the RSC.\n"));
+
+ ACE_THROW (CORBA::INTERNAL ());
+ }
+
+ // Now verify that the RSC is truly independent of the TSC. In
+ // particular, modifying the TSC at this point should not cause
+ // the RSC to be modified.
+ CORBA::Any new_data;
+ CORBA::Long number = 19;
+
+ new_data <<= number;
+
+ // Now reset the contents of our slot in the thread-scope
+ // current (TSC).
+ this->pi_current_->set_slot (this->slot_id_,
+ new_data
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // Now retrieve the data from the RSC again. It should not have
+ // changed!
+ CORBA::Any_var data2 =
+ ri->get_slot (this->slot_id_
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ const char *str2 = 0;
+ if (!(data2.in () >>= str2)
+ || ACE_OS::strcmp (str, str2) != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) ERROR: RSC was modified after "
+ "TSC was modified.\n"));
+
+ ACE_TRY_THROW (CORBA::INTERNAL ());
+ }
}
ACE_CATCH (PortableInterceptor::InvalidSlot, ex)
{
@@ -120,25 +176,9 @@ ServerRequestInterceptor::send_reply (
ACE_ENDTRY;
ACE_CHECK;
- // The original data in the RSC was of type CORBA::Long. If the
- // following extraction from the CORBA::Any fails, then the original
- // data in the RSC was not replaced with the data in the TSC after
- // the test method completed.
- const char *str = 0;
- if (data.in () >>= str)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Retrieved \"%s\" from the RSC.\n",
- str));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) Unable to extract data (a string) "
- "from the RSC.\n"));
-
- ACE_THROW (CORBA::INTERNAL ());
- }
+ ACE_DEBUG ((LM_INFO,
+ "(%P|%t) Server side RSC/TSC semantics appear "
+ "to be correct.\n"));
}
void
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h b/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h
index 16cf93d8d9b..0ad9023de33 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h
+++ b/TAO/tests/Portable_Interceptors/PICurrent/ServerRequestInterceptor.h
@@ -46,7 +46,8 @@ class ServerRequestInterceptor
public:
/// Constructor.
- ServerRequestInterceptor (PortableInterceptor::SlotId id);
+ ServerRequestInterceptor (PortableInterceptor::SlotId id,
+ PortableInterceptor::Current_ptr pi_current);
/**
* @name Methods Required by the Server Request Interceptor
@@ -96,10 +97,13 @@ public:
private:
- // The PICurrent slot ID allocated to this application during ORB
- // initialization.
+ /// The PICurrent slot ID allocated to this application during ORB
+ /// initialization.
PortableInterceptor::SlotId slot_id_;
+ /// Reference to the PICurrent object.
+ PortableInterceptor::Current_var pi_current_;
+
};
#if defined(_MSC_VER) && (_MSC_VER >= 1200)