3 // =================================================================
5 * @file IIOP_Current_Loader.cpp
7 * @author Iliyan Jeliazkov <iliyan@ociweb.com>
9 // =================================================================
12 #include "ace/Service_Config.h"
13 #include "tao/ORBInitializer_Registry.h"
14 #include "tao/ORB_Constants.h"
15 #include "tao/PI/PI.h"
17 #if TAO_HAS_TRANSPORT_CURRENT == 1
19 #include "tao/TransportCurrent/Current_ORBInitializer.h"
20 #include "tao/TransportCurrent/IIOP_Current_Loader.h"
21 #include "tao/TransportCurrent/IIOP_Current_Impl.h"
23 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 /// Initializes object when dynamic linking occurs.
33 Current_Loader::init (int, ACE_TCHAR
*[])
35 PortableInterceptor::ORBInitializer_ptr tmp
= 0;
36 ACE_NEW_THROW_EX (tmp
,
37 Current_ORBInitializer
<IIOP_Current_Impl
> (ACE_TEXT ("TAO::Transport::IIOP::Current")),
38 CORBA::NO_MEMORY (CORBA::SystemException::_tao_minor_code (TAO::VMCID
,
40 CORBA::COMPLETED_NO
));
42 PortableInterceptor::ORBInitializer_var
initializer (tmp
);
44 PortableInterceptor::register_orb_initializer (initializer
.in ());
49 Current_Loader::Current_Loader ()
53 Current_Loader::~Current_Loader ()
59 TAO_END_VERSIONED_NAMESPACE_DECL
61 #if defined (TAO_AS_STATIC_LIBS)
63 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
65 ACE_STATIC_SVC_REQUIRE (TAO_Transport_IIOP_Current_Loader
)
73 int current_static_initializer ()
75 ACE_STATIC_SVC_REGISTER (TAO_Transport_IIOP_Current_Loader
);
81 TAO_END_VERSIONED_NAMESPACE_DECL
84 #endif /* defined (TAO_AS_STATIC_LIBS) */
86 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
88 ACE_STATIC_SVC_DEFINE (TAO_Transport_IIOP_Current_Loader
,
89 ACE_TEXT ("TAO_Transport_IIOP_Current_Loader"),
91 &ACE_SVC_NAME (TAO_Transport_IIOP_Current_Loader
),
92 ACE_Service_Type::DELETE_THIS
| ACE_Service_Type::DELETE_OBJ
,
95 ACE_FACTORY_NAMESPACE_DEFINE (TAO_Transport_Current
,
96 TAO_Transport_IIOP_Current_Loader
,
97 TAO::Transport::IIOP::Current_Loader
)
98 TAO_END_VERSIONED_NAMESPACE_DECL
99 #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */