2 #include "ace/Log_Msg.h"
3 #include "ace/Thread.h"
4 #include "ace/os_include/os_pthread.h"
7 #include "ace/Log_Msg.h"
8 #include "tao/AnyTypeCode/Any.h"
9 #include "tao/Policy_Manager.h"
10 #include "tao/TimeBaseC.h"
14 #if defined (__SUNPRO_CC)
16 #endif /* __SUNPRO_CC */
17 ACE_THR_FUNC_RETURN
main_orb(void*)
23 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
);
25 TimeBase::TimeT CONNECTION_TIMEOUT
= 1000000;
26 TimeBase::TimeT ROUND_TRIP_TIMEOUT
= 1000000;
28 if (!CORBA::is_nil(orb
.in()))
30 ACE_DEBUG((LM_DEBUG
, "ORB not nil\n"));
32 CORBA::Any connection_timeout_as_any
;
33 connection_timeout_as_any
<<= CONNECTION_TIMEOUT
;
35 CORBA::Any rt_timeout_as_any
;
36 rt_timeout_as_any
<<= ROUND_TRIP_TIMEOUT
;
39 ACE_DEBUG((LM_DEBUG
, "Destroyed ORB\n"));
42 catch(const ::CORBA::Exception
& ex
)
45 ex
._tao_print_exception ("Exception caught:");
50 ACE_ERROR ((LM_ERROR
, " (%P|%t) Unknown error\n"));
57 int ACE_TMAIN(int, ACE_TCHAR
*[])
59 ACE_hthread_t thread1
;
60 # if defined (ACE_HAS_PTHREADS)
61 pthread_create(&thread1
, 0, main_orb
, 0);
63 ACE_Thread::spawn (main_orb
, 0, THR_NEW_LWP
|THR_JOINABLE
, 0, &thread1
);
65 ACE_Thread::join( thread1
);