2 #include "ace/Thread_Manager.h"
4 #include "Service_Configuration_Per_ORB.h"
6 // Uncomment this line to test the SSLIOP scenario, as described in
8 // #define TEST_WITH_SSLIOP
13 // ASCII (UTF-8) encoded Service Configurator file.
14 static const ACE_TCHAR svc_conf
[] =
15 #ifdef TEST_WITH_SSLIOP
16 ACE_TEXT ("primary-ssl")
18 ACE_TEXT ("primary-csd")
20 ACE_TEXT (ACE_DEFAULT_SVC_CONF_EXT
);
26 // @brief Loading a dynamic services in a local repository, which
27 // initializes its own ORB
30 testLoadingTwoOrbs (int , ACE_TCHAR
*argv
[])
35 ACE_TEXT ("Looking for conf file %s\n"),
36 config_file_name ()));
38 // Process the Service Configurator directives in this test's
39 if (new_argv
.add (argv
) == -1
40 || new_argv
.add (ACE_TEXT ("-f")) == -1
41 || new_argv
.add (config_file_name ()) == -1)
43 ACE_ERROR ((LM_ERROR
, ACE_TEXT("ARGV initialization failed\n")));
47 if (ACE_Service_Config::instance() ->open (new_argv
.argc (),
48 new_argv
.argv ()) == -1)
51 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("No service config file found\n")));
53 ACE_ERROR ((LM_ERROR
, ACE_TEXT ("Service Config open failed: %m\n")));
58 // Since the loaded services start their own threads, wait until all of them
59 // are done to avoid pulling the rug under their feet.
60 ACE_Thread_Manager::instance ()->wait ();
65 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
67 return testLoadingTwoOrbs (argc
, argv
);