2 #include "ServerRequest_Interceptor.h"
3 #include "orbsvcs/FT_CORBA_ORBC.h"
5 #include "tao/ORB_Constants.h"
6 #include "tao/AnyTypeCode/DynamicC.h"
7 #include "tao/AnyTypeCode/TypeCode.h"
9 #include "ace/Log_Msg.h"
10 #include "ace/OS_NS_string.h"
13 TAO249_ServerRequest_Interceptor::TAO249_ServerRequest_Interceptor (void)
19 TAO249_ServerRequest_Interceptor::~TAO249_ServerRequest_Interceptor (void)
25 TAO249_ServerRequest_Interceptor::name ()
27 return CORBA::string_dup ("TAO_TAO249_ServerRequest_Interceptor");
31 TAO249_ServerRequest_Interceptor::destroy ()
36 TAO249_ServerRequest_Interceptor::receive_request_service_contexts (
37 PortableInterceptor::ServerRequestInfo_ptr
43 TAO249_ServerRequest_Interceptor::receive_request (
44 PortableInterceptor::ServerRequestInfo_ptr ri
47 CORBA::String_var op
= ri
->operation ();
51 IOP::ServiceContext_var sc
=
52 ri
->get_request_service_context (IOP::FT_GROUP_VERSION
56 TAO_InputCDR
cdr (reinterpret_cast <const char*>
57 (sc
->context_data
.get_buffer ()),
58 sc
->context_data
.length ());
60 CORBA::Boolean byte_order
;
62 if ((cdr
>> ACE_InputCDR::to_boolean (byte_order
)) == 0)
64 throw CORBA::BAD_PARAM (CORBA::OMGVMCID
| 28,
69 cdr
.reset_byte_order (static_cast <int> (byte_order
));
71 Hello::normal_context_ok_
= 0;
72 Hello::extended_context_ok_
= 0;
74 if (! ACE_OS::strcmp (op
.in (), "check_normal_context"))
76 FT::FTGroupVersionServiceContext ftrsc
;
77 Hello::normal_context_ok_
= (cdr
>> ftrsc
) != 0;
79 else if (! ACE_OS::strcmp (op
.in (), "check_extended_context"))
81 FT::TagFTGroupTaggedComponent tftgtc
;
82 Hello::extended_context_ok_
= (cdr
>> tftgtc
) != 0;
85 catch (const CORBA::Exception
& ex
)
87 ACE_DEBUG ((LM_ERROR
, "Unexpected (non regression) error - test failed\n"));
88 ex
._tao_print_exception (
89 "Exception in TAO249_ServerRequest_Interceptor::receive_request\n");
98 TAO249_ServerRequest_Interceptor::send_reply (
99 PortableInterceptor::ServerRequestInfo_ptr
105 TAO249_ServerRequest_Interceptor::send_exception (
106 PortableInterceptor::ServerRequestInfo_ptr
112 TAO249_ServerRequest_Interceptor::send_other (
113 PortableInterceptor::ServerRequestInfo_ptr