3 #include "tao/Object.h"
5 #include "ace/Service_Config.h"
6 #include "ace/Dynamic_Service.h"
9 testCurrentORBInitializer (int argc
, ACE_TCHAR
*argv
[])
11 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
);
14 ACE_ERROR_RETURN ((LM_ERROR
, ACE_TEXT ("Unable to create orb\n")), -1);
16 CORBA::Object_var obj
=
17 orb
->resolve_initial_references ("TAO::Transport::Current");
20 ACE_ERROR_RETURN ((LM_ERROR
,
21 ACE_TEXT ("Unable to get the Transport Current\n")), -1);
24 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("testCurrentORBInitializer: OK\n")));
30 testCurrentLoader (int, char *[])
32 ACE_Service_Object
*factory
= 0;
34 factory
= ACE_Dynamic_Service
<ACE_Service_Object
>::instance
35 (ACE_TEXT ("TAO_Transport_Current_Loader"));
38 #if defined (TAO_AS_STATIC_LIBS)
42 #endif /* TAO_AS_STATIC_LIBS */
47 ACE_ERROR_RETURN ((LM_ERROR
,
48 ACE_TEXT ("Unable to instantiate TAO::Transport::Current_Factory\n")),
52 #if !defined (TAO_AS_STATIC_LIBS)
53 int ret
= ACE_Service_Config::process_directive
54 (ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE("TAO_Transport_Current_Loader",
55 "TAO_Transport_Current",
57 "_make_TAO_Transport_Current_Loader",
59 ACE_ASSERT (ret
== 0);
61 factory
= ACE_Dynamic_Service
<ACE_Service_Object
>::instance
62 (ACE_TEXT ("TAO_Transport_Current_Loader"));
64 #endif /* !TAO_AS_STATIC_LIBS */
68 // ACE_ASSERT (factory != 0);
69 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("testCurrentLoader: OK\n")));
75 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
77 return testCurrentLoader (argc
, argv
)
78 || testCurrentORBInitializer (argc
, argv
);