2 #include "ClientORBInitializer.h"
3 #include "ClientRequestInterceptor.h"
5 #include "tao/ORB_Constants.h"
7 #include "ace/Log_Msg.h"
9 PortableInterceptor::SlotId slot_id
= 2093843211;
12 ClientORBInitializer::pre_init (
13 PortableInterceptor::ORBInitInfo_ptr
/* info */
19 ClientORBInitializer::post_init (
20 PortableInterceptor::ORBInitInfo_ptr info
)
22 CORBA::Object_var obj
=
23 info
->resolve_initial_references ("PICurrent");
25 PortableInterceptor::Current_var pi_current
=
26 PortableInterceptor::Current::_narrow (obj
.in ());
28 if (CORBA::is_nil (pi_current
.in ()))
31 "(%P|%t) ERROR: Could not resolve PICurrent object.\n"));
33 throw CORBA::INTERNAL ();
36 ::slot_id
= info
->allocate_slot_id ();
38 PortableInterceptor::ClientRequestInterceptor_ptr foo
;
39 ACE_NEW_THROW_EX (foo
,
40 ClientRequestInterceptor (::slot_id
,
43 CORBA::SystemException::_tao_minor_code (
46 CORBA::COMPLETED_NO
));
48 PortableInterceptor::ClientRequestInterceptor_var interceptor
=
51 info
->add_client_request_interceptor (interceptor
.in ());