blob: 8cae413587638482677d092ed3b7d2fb6d0b37fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
//**************************************************************************
//
// NAME : tpr_server.cpp
// DESCRIPTION:
//
// Server mainline
//
//****************************************************************************
#define IT_EX_MACROS
#include "cubit_impl.h" // server header file
#include "tpool.h"
int
main (int argc, char** argv)
{
#ifdef Cubit_USE_BOA
Cubit_var cb = new Cubit_Impl;
cout << "Using BOA approach" << endl;
#else
Cubit_var cb = new TIE_Cubit (Cubit_Impl) (new Cubit_Impl);
cout << "Using TIE approach" << endl;
#endif /* Cubit_USE_BOA */
// Register our thread-pool dispatcher
int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS;
Thread_Pool tpool_dispatcher (n_threads);
//
// Go get some work to do....
//
IT_TRY {
CORBA::Orbix.impl_is_ready("Cubit", IT_X);
}
IT_CATCHANY {
cout << IT_X << endl;
}
IT_ENDTRY;
cout << "Cubit server is exiting." << endl;
return 0;
}
|