Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / DLL_ORB / server.cpp
blob731ed0f5b4da716df8b5d6f561e6693b37d94fc4
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file server.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 // server module to be dynamically loaded.
21 // This is done to prevent the server binary from being forced to
22 // explicitly link to the test server module library. Hence, the
23 // server binary is completely decoupled from the test server
24 // module (and the ORB!).
26 // In the process of doing this, the Test CORBA object will be
27 // activated, and the ORB will be run.
28 if (ACE_Service_Config::process_directive (
29 ACE_DYNAMIC_SERVICE_DIRECTIVE("Server_Module",
30 "Test_Server_Module", "_make_Test_Server_Module", "")) != 0)
32 ACE_ERROR_RETURN ((LM_ERROR,
33 "%p\n",
34 "ERROR: Server unable to process the "
35 "Service Configurator directive"),
36 -1);
39 ACE_DEBUG ((LM_INFO,
40 "SERVER: CORBA-portion of the test dynamically loaded.\n"));
42 // Wait for all threads to complete.
43 ACE_Thread_Manager::instance ()->wait ();
45 ACE_DEBUG ((LM_INFO,
46 "SERVER: Terminated successfully.\n"));
48 return 0;