3 // =================================================================
5 * @file Current_Loader.cpp
7 * @author Iliyan Jeliazkov <iliyan@ociweb.com>
9 // =================================================================
11 #include "ace/Service_Config.h"
13 #include "tao/ORB_Constants.h"
14 #include "tao/ORBInitializer_Registry.h"
16 #if TAO_HAS_TRANSPORT_CURRENT == 1
18 #include "tao/TransportCurrent/Current_ORBInitializer.h"
19 #include "tao/TransportCurrent/Current_Loader.h"
20 #include "tao/TransportCurrent/Current_Impl.h"
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 Current_Loader::~Current_Loader ()
33 /// Initializes object when dynamic linking occurs.
35 Current_Loader::init (int, ACE_TCHAR
*[])
37 PortableInterceptor::ORBInitializer_ptr tmp
= 0;
38 ACE_NEW_THROW_EX (tmp
,
39 Current_ORBInitializer
<Current_Impl
>
40 (ACE_TEXT ("TAO::Transport::Current")),
42 (CORBA::SystemException::_tao_minor_code (TAO::VMCID
,
44 CORBA::COMPLETED_NO
));
46 PortableInterceptor::ORBInitializer_var
initializer (tmp
);
48 PortableInterceptor::register_orb_initializer (initializer
.in ());
53 } /* namespace Transport */
57 TAO_END_VERSIONED_NAMESPACE_DECL
60 #if defined (TAO_AS_STATIC_LIBS)
62 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
64 ACE_STATIC_SVC_REQUIRE (TAO_Transport_Current_Loader
)
70 int current_static_initializer ()
72 ACE_STATIC_SVC_REGISTER (TAO_Transport_Current_Loader
);
79 TAO_END_VERSIONED_NAMESPACE_DECL
82 #endif /* defined (TAO_AS_STATIC_LIBS) */
84 ACE_STATIC_SVC_DEFINE (TAO_Transport_Current_Loader
,
85 ACE_TEXT ("TAO_Transport_Current_Loader"),
87 &ACE_SVC_NAME (TAO_Transport_Current_Loader
),
88 ACE_Service_Type::DELETE_THIS
| ACE_Service_Type::DELETE_OBJ
,
91 ACE_FACTORY_NAMESPACE_DEFINE (TAO_Transport_Current
,
92 TAO_Transport_Current_Loader
,
93 TAO::Transport::Current_Loader
)
95 #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */