1 #include "ace/Thread_Hook.h"
3 #include "ace/Log_Msg.h"
5 #include "SecurityContext.h"
8 class HA_ThreadHook
: public ACE_Thread_Hook
11 virtual ACE_THR_FUNC_RETURN
start (ACE_THR_FUNC func
, void* arg
)
13 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT("(%t) New Thread Spawned\n")));
15 // Create the context on the thread's own stack.
16 ACE_TSS
<SecurityContext
> secCtx
;
17 // Special initialization.
18 add_sec_context_thr (secCtx
);
23 void add_sec_context_thr (ACE_TSS
<SecurityContext
> &secCtx
);
28 HA_ThreadHook::add_sec_context_thr(ACE_TSS
<SecurityContext
> &secCtx
)
34 class HA_CommandHandler
: public ACE_Task_Base
39 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("(%t) starting up\n")));
46 // Listing 2 code/ch13
47 int ACE_TMAIN (int, ACE_TCHAR
*[])
50 ACE_Thread_Hook::thread_hook (&hook
);
52 HA_CommandHandler handler
;