Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / DLL_ORB / client.cpp
blob37b51cccd96344a3f510ad85244a4539af628d0d
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)
36 ACE_ERROR_RETURN ((LM_ERROR,
37 "%p\n",
38 "ERROR: Client unable to process the "
39 "Service Configurator directive"),
40 -1);
43 ACE_DEBUG ((LM_INFO,
44 "CLIENT: CORBA-portion of the test dynamically loaded.\n"));
46 // Wait for all threads to complete.
47 ACE_Thread_Manager::instance ()->wait ();
49 ACE_DEBUG ((LM_INFO,
50 "CLIENT: Terminated successfully.\n"));
52 return 0;