blob: c7f9abee77cc6eb66b5ecba335e09d4ff9119ab5 (
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
|
// $Id$
#include "ace/Service_Config.h"
#include "ace/CORBA_Handler.h"
#include "Test_i.h"
ACE_RCSID(CORBA, server, "$Id$")
#if defined (ACE_HAS_ORBIX) && (ACE_HAS_ORBIX != 0)
#if defined (ACE_HAS_MT_ORBIX) && (ACE_HAS_MT_ORBIX != 0)
typedef ACE_MT_CORBA_Handler CORBA_HANDLER;
#else
typedef ACE_ST_CORBA_Handler CORBA_HANDLER;
#endif /* ACE_HAS_MT_ORBIX */
int
main (int argc, char *argv[])
{
ACE_Service_Config daemon;
char pwd[BUFSIZ];
char app[BUFSIZ];
ACE_OS::getcwd (pwd, sizeof pwd);
ACE_OS::sprintf (app, "%s/%s", pwd, argv[0]);
if (CORBA_HANDLER::instance ()->activate_service (Test_IMPL, 0, app) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "Could not activate services for supplier\n"), -1);
TIE_Test (Test_i) test (new Test_i);
for (;;)
if (CORBA_HANDLER::instance ()->reactor ()->handle_events () == -1)
break;
return 0;
}
#endif /* ACE_HAS_ORBIX */
|