1 // file : RolyPoly/ORB_Initializer.cpp
2 // author : Boris Kolpackov <boris@dre.vanderbilt.edu>
5 #include "tao/PI/ORBInitInfo.h"
6 #include "tao/ORB_Core.h"
8 #include "ORB_Initializer.h"
9 #include "ReplicaController.h"
12 ORB_Initializer::pre_init (PortableInterceptor::ORBInitInfo_ptr
)
17 ORB_Initializer::post_init (PortableInterceptor::ORBInitInfo_ptr info
)
21 state_slot_id (info
->allocate_slot_id ());
23 // Register replica controller as server request interceptor.
25 TAO_ORBInitInfo
* tao_info
= dynamic_cast<TAO_ORBInitInfo
*> (info
);
27 CORBA::ORB_var
orb (tao_info
->orb_core ()->orb ());
29 PortableInterceptor::ServerRequestInterceptor_var interceptor
;
32 PortableInterceptor::ServerRequestInterceptor
*tmp_interceptor
= 0;
34 ACE_NEW_THROW_EX (tmp_interceptor
,
35 ReplicaController (orb
.in ()),
37 CORBA::SystemException::_tao_minor_code (
40 CORBA::COMPLETED_NO
));
43 interceptor
= tmp_interceptor
;
46 info
->add_server_request_interceptor (interceptor
.in ());