Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / CSD_Collocation / Collocation.cpp
blob0a2b05d4b8aa72c0d4abcd277a5fd23c3834ff06
1 #include "Collocation_Tester.h"
2 #include "tao/Strategies/advanced_resource.h"
3 #include "tao/CSD_Framework/CSD_ORBInitializer.h"
4 #include "tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.h"
5 #include "tao/CSD_ThreadPool/CSD_ThreadPool.h"
6 #include "ace/Thread_Manager.h"
8 int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
10 try
12 Collocation_Test coll_test;
14 int orig_argc = argc;
15 ACE_TCHAR **orig_argv = new ACE_TCHAR*[argc];
16 for (int i = 0; i < argc; ++i)
18 orig_argv[i] = argv[i];
21 coll_test.init (argc, argv);
22 coll_test.run ();
23 coll_test.shutdown ();
25 //reinitialize ORB to reproduce the problem
26 coll_test.init (orig_argc, orig_argv);
27 coll_test.run ();
28 coll_test.shutdown ();
30 delete[] orig_argv;
31 //this will leak if we get an exception, but it's just a small test case
33 catch (const CORBA::Exception& ex)
35 ex._tao_print_exception ("Uncaught exception: ");
38 ACE_Thread_Manager::instance()->wait();
39 return 0;