1 #include "ClientRequestInterceptor2.h"
2 #include "tao/CORBA_String.h"
3 #include "ace/Log_Msg.h"
4 #include "ace/OS_NS_string.h"
6 ClientRequestInterceptor2::ClientRequestInterceptor2 (
7 PortableInterceptor::SlotId id
)
13 ClientRequestInterceptor2::name ()
15 return CORBA::string_dup ("ClientRequestInterceptor2");
19 ClientRequestInterceptor2::destroy (void)
24 ClientRequestInterceptor2::send_request (
25 PortableInterceptor::ClientRequestInfo_ptr ri
)
27 CORBA::String_var op
= ri
->operation ();
29 if (ACE_OS::strcmp (op
.in (), "invoke_you") != 0)
30 return; // Don't mess with PICurrent if not invoking test method.
34 // The goal of this test is to verify that a request scope
35 // current was successfully shallow copied from a TSC that
36 // itself was shallow copied from a ServerRequestInfo's RSC.
37 // Specifically, verify that the RSC->TSC->RSC sequence of
38 // copies occurred correctly.
40 // Retrieve data from the RSC (request scope current).
41 CORBA::Long number
= 0;
44 ri
->get_slot (this->slot_id_
);
46 if (!(data
.in () >>= number
))
49 "(%P|%t) ERROR: Unable to extract data from "
50 "CORBA::Any retrieved from RSC.\n"));
52 throw CORBA::INTERNAL ();
56 "(%P|%t) Extracted <%d> from RSC slot %u\n",
60 catch (const PortableInterceptor::InvalidSlot
& ex
)
62 ex
._tao_print_exception ("Exception thrown in ""send_request()\n");
68 throw CORBA::INTERNAL ();
72 "(%P|%t) RSC->TSC->RSC copying appears to be working.\n"));
76 ClientRequestInterceptor2::send_poll (
77 PortableInterceptor::ClientRequestInfo_ptr
)
82 ClientRequestInterceptor2::receive_reply (
83 PortableInterceptor::ClientRequestInfo_ptr
)
88 ClientRequestInterceptor2::receive_exception (
89 PortableInterceptor::ClientRequestInfo_ptr
)
94 ClientRequestInterceptor2::receive_other (
95 PortableInterceptor::ClientRequestInfo_ptr
)