2 //=============================================================================
4 * @file Activator_NT_Service.h
6 * @author Darrell Brunsch <brunsch@cs.wustl.edu>
7 * @author Jeff Parsons <parsons@cs.wustl.edu>
8 * @author John Tucker <jtucker@infoglide.com>
9 * @author Mike Vitalo <mvitalo@infoglide.com>
11 //=============================================================================
13 #ifndef Activator_NT_Service_H
14 #define Activator_NT_Service_H
16 #include "ace/config-all.h"
18 #if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_SERVICES)
20 #include "ace/NT_Service.h"
21 #include "ace/Singleton.h"
22 #include "ace/Synch.h"
23 #include "tao/orbconf.h"
25 #if !defined (ACE_LACKS_PRAGMA_ONCE)
27 #endif /* ACE_LACKS_PRAGMA_ONCE */
29 extern const ACE_TCHAR
* IMR_ACTIVATOR_SERVICE_NAME
;
30 extern const ACE_TCHAR
* IMR_ACTIVATOR_DISPLAY_NAME
;
31 extern const ACE_TCHAR
* IMR_ACTIVATOR_DESCRIPTION
;
34 * @class Activator_NT_Service
36 * @brief Allows the Implementation Repository to act as a Windows NT Service.
38 class Activator_NT_Service
: public ACE_NT_Service
41 typedef TAO_SYNCH_RECURSIVE_MUTEX MUTEX
;
43 /// We override <handle_control> because it handles stop requests
45 virtual void handle_control (DWORD control_code
);
47 /// We override <handle_exception> so a 'stop' control code can wake
48 /// the reactor off of its wait.
49 virtual int handle_exception (ACE_HANDLE h
);
51 /// This is a virtual method inherited from ACE_NT_Service.
54 friend class ACE_Singleton
<Activator_NT_Service
, MUTEX
>;
57 typedef ACE_Singleton
<Activator_NT_Service
, ACE_Mutex
> SERVICE
;
59 #endif /* ACE_WIN32 && !ACE_LACKS_WIN32_SERVICES */
61 #endif /* Activator_NT_Service_H */