2 #include "tao/PI/ORBInitInfo.h"
3 #include "tao/TransportCurrent/Current_ORBInitializer_Base.h"
5 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
11 Current_ORBInitializer_Base::Current_ORBInitializer_Base(const ACE_TCHAR
* id
)
17 Current_ORBInitializer_Base::~Current_ORBInitializer_Base()
24 Current_ORBInitializer_Base::pre_init (
25 PortableInterceptor::ORBInitInfo_ptr info
)
27 // Narrow to a TAO_ORBInitInfo object to get access to the
28 // allocate_tss_slot_id() TAO extension.
29 TAO_ORBInitInfo_var tao_info
=
30 TAO_ORBInitInfo::_narrow (info
);
32 if (CORBA::is_nil (tao_info
.in ()))
34 if (TAO_debug_level
> 0)
35 TAOLIB_ERROR ((LM_ERROR
,
36 "TAO (%P|%t) TAO::Transport::ORBInitializer::pre_init - "
37 "Panic: unable to narrow the ORBInitInfo_ptr\n"));
39 throw ::CORBA::INTERNAL ();
42 // Reserve a TSS slot in the ORB core internal TSS resources for the
43 // thread-specific portion of the Current object.
44 size_t tss_slot
= tao_info
->allocate_tss_slot_id (0);
47 Current_var
current (this->make_current_instance (tao_info
->orb_core (),
50 info
->register_initial_reference (ACE_TEXT_ALWAYS_CHAR (this->id_
.fast_rep ()),
55 Current_ORBInitializer_Base::post_init (
56 PortableInterceptor::ORBInitInfo_ptr
)
65 TAO_END_VERSIONED_NAMESPACE_DECL