Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / DLL_ORB / client.cpp
blob7af41133463eb47a948f48f85ef11aaec99d7ca3
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file client.cpp
7 * @author Ossama Othman <ossama@uci.edu>
8 */
9 //=============================================================================
12 #include "ace/Service_Config.h"
13 #include "ace/Thread_Manager.h"
15 int
16 ACE_TMAIN(int, ACE_TCHAR *[])
18 // Process a Service Configurator directive that will cause the test
19 // client module to be dynamically loaded.
21 // This is done to prevent the client binary from being forced to
22 // explicitly link to the test client module library. Hence, the
23 // client binary is completely decoupled from the test client
24 // module (and the ORB!).
26 // In the process of doing this, the Test method provided by target
27 // CORBA object will be invoked.
28 if (ACE_Service_Config::process_directive (
29 ACE_DYNAMIC_SERVICE_DIRECTIVE(
30 "Client_Module",
31 "Test_Client_Module",
32 "_make_Test_Client_Module",
33 "-k file://test.ior")) != 0)
35 ACE_ERROR_RETURN ((LM_ERROR,
36 "%p\n",
37 "ERROR: Client unable to process the "
38 "Service Configurator directive"),
39 -1);
42 ACE_DEBUG ((LM_INFO,
43 "CLIENT: CORBA-portion of the test dynamically loaded.\n"));
45 // Wait for all threads to complete.
46 ACE_Thread_Manager::instance ()->wait ();
48 ACE_DEBUG ((LM_INFO,
49 "CLIENT: Terminated successfully.\n"));
51 return 0;